yoda-language-server 0.8.0 → 0.9.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +9 -0
- data/client/vscode/package-lock.json +902 -811
- data/client/vscode/package.json +17 -7
- data/client/vscode/src/check-versions.ts +55 -0
- data/client/vscode/src/config.ts +8 -1
- data/client/vscode/src/extension.ts +4 -3
- data/client/vscode/src/install-tools.ts +56 -16
- data/client/vscode/src/language-server.ts +5 -0
- data/client/vscode/src/test/runTest.ts +1 -1
- data/client/vscode/src/test/suite/hover.test.ts +13 -25
- data/client/vscode/src/test/suite/index.ts +1 -2
- data/client/vscode/src/utils.ts +11 -0
- data/lib/yoda/instrument.rb +7 -0
- data/lib/yoda/server/concurrent_writer.rb +1 -1
- data/lib/yoda/server/lifecycle_handler.rb +101 -78
- data/lib/yoda/server/notifier.rb +2 -55
- data/lib/yoda/store/registry/library_registry.rb +2 -0
- data/lib/yoda/version.rb +1 -1
- metadata +4 -1
data/lib/yoda/server/notifier.rb
CHANGED
@@ -10,19 +10,18 @@ module Yoda
|
|
10
10
|
def busy(type:, id: nil)
|
11
11
|
failed = false
|
12
12
|
event(type: type, phase: :begin, id: id)
|
13
|
-
start_progress(id: id, title: type)
|
14
13
|
yield
|
15
14
|
rescue => e
|
16
15
|
Logger.warn(e.full_message)
|
17
16
|
failed = true
|
17
|
+
event(type: type, phage: :failed, id: id)
|
18
18
|
raise e
|
19
19
|
ensure
|
20
20
|
event(type: type, phase: :end, id: id)
|
21
|
-
failed ? cancel_progress(id: id) : done_progress(id: id)
|
22
21
|
end
|
23
22
|
|
24
23
|
# @param params [Hash]
|
25
|
-
def event(params)
|
24
|
+
def event(**params)
|
26
25
|
write(method: 'telemetry/event', params: params)
|
27
26
|
end
|
28
27
|
|
@@ -121,58 +120,6 @@ module Yoda
|
|
121
120
|
)
|
122
121
|
end
|
123
122
|
|
124
|
-
# @param id [String, Symbol]
|
125
|
-
# @param title [String]
|
126
|
-
# @param calcellable [Boolean]
|
127
|
-
# @param message [String, nil]
|
128
|
-
# @param percentage [Integer]
|
129
|
-
def start_progress(id:, title:, cancellable: false, message: nil, percentage: 0)
|
130
|
-
write(
|
131
|
-
method: 'window/progress/start',
|
132
|
-
params: {
|
133
|
-
id: id,
|
134
|
-
title: title,
|
135
|
-
calcellable: cancellable,
|
136
|
-
message: message,
|
137
|
-
percentage: percentage,
|
138
|
-
}
|
139
|
-
)
|
140
|
-
end
|
141
|
-
|
142
|
-
# @param id [String, Symbol]
|
143
|
-
# @param message [String, nil]
|
144
|
-
# @param percentage [Integer, nil]
|
145
|
-
def report_progress(id:, message: nil, percentage: nil)
|
146
|
-
write(
|
147
|
-
method: 'window/progress/report',
|
148
|
-
params: {
|
149
|
-
id: id,
|
150
|
-
message: message,
|
151
|
-
percentage: percentage,
|
152
|
-
}
|
153
|
-
)
|
154
|
-
end
|
155
|
-
|
156
|
-
# @param id [String, Symbol]
|
157
|
-
def done_progress(id:)
|
158
|
-
write(
|
159
|
-
method: 'window/progress/done',
|
160
|
-
params: {
|
161
|
-
id: id,
|
162
|
-
}
|
163
|
-
)
|
164
|
-
end
|
165
|
-
|
166
|
-
# @param id [String, Symbol]
|
167
|
-
def cancel_progress(id:)
|
168
|
-
write(
|
169
|
-
method: 'window/progress/cancel',
|
170
|
-
params: {
|
171
|
-
id: id,
|
172
|
-
}
|
173
|
-
)
|
174
|
-
end
|
175
|
-
|
176
123
|
private
|
177
124
|
|
178
125
|
def write(params)
|
@@ -8,8 +8,10 @@ module Yoda
|
|
8
8
|
namespace = adapter.namespace(library.name)
|
9
9
|
|
10
10
|
if namespace.empty?
|
11
|
+
Instrument.instance.build_library_registry(name: library.name, version: library.version, message: "Building registry for #{library.name} (#{library.version})")
|
11
12
|
patch = library.create_patch
|
12
13
|
patch && compress_and_save(patch: patch, adapter: namespace)
|
14
|
+
Instrument.instance.build_library_registry(name: library.name, version: library.version, message: "Finished to build registry for #{library.name} (#{library.version})")
|
13
15
|
end
|
14
16
|
|
15
17
|
new(id: library.id, adapter: namespace)
|
data/lib/yoda/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: yoda-language-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.9.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomoya Chiba
|
@@ -287,6 +287,7 @@ files:
|
|
287
287
|
- ".github/workflows/test.yml"
|
288
288
|
- ".gitignore"
|
289
289
|
- ".rspec"
|
290
|
+
- CHANGELOG.md
|
290
291
|
- Gemfile
|
291
292
|
- LICENSE.txt
|
292
293
|
- README.md
|
@@ -309,6 +310,7 @@ files:
|
|
309
310
|
- client/vscode/README.md
|
310
311
|
- client/vscode/package-lock.json
|
311
312
|
- client/vscode/package.json
|
313
|
+
- client/vscode/src/check-versions.ts
|
312
314
|
- client/vscode/src/config.ts
|
313
315
|
- client/vscode/src/extension.ts
|
314
316
|
- client/vscode/src/install-tools.ts
|
@@ -319,6 +321,7 @@ files:
|
|
319
321
|
- client/vscode/src/test/suite/completion.test.ts
|
320
322
|
- client/vscode/src/test/suite/hover.test.ts
|
321
323
|
- client/vscode/src/test/suite/index.ts
|
324
|
+
- client/vscode/src/utils.ts
|
322
325
|
- client/vscode/testFixture/completion.rb
|
323
326
|
- client/vscode/tsconfig.json
|
324
327
|
- client/vscode/vsc-extension-quickstart.md
|