solargraph 0.39.5 → 0.39.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/solargraph/language_server/host.rb +1 -1
- data/lib/solargraph/parser/rubyvm/node_processors/kw_arg_node.rb +6 -1
- data/lib/solargraph/parser/rubyvm/node_processors/opt_arg_node.rb +6 -1
- data/lib/solargraph/pin/parameter.rb +1 -1
- data/lib/solargraph/shell.rb +1 -1
- data/lib/solargraph/source_map/mapper.rb +2 -0
- data/lib/solargraph/version.rb +1 -1
- data/lib/solargraph/workspace.rb +1 -1
- data/lib/solargraph/yard_map.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a81ce77f7d8227f2e1bf419edb00bbb35c104f9432f3bf9fca55453f70d118b
|
4
|
+
data.tar.gz: 3a3fa7eab3220e6933d4aa79d882caf25f2ec2a21e267b062237d4f3f1437ca2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 12fac0ebf0358c1949dde571705a5969049ff72b27d2d2385f72d1272f813ebf133a4aebb5f567462b7d31f105e4960e33fe11f87b2987b00a0a3858e7d533c7
|
7
|
+
data.tar.gz: f2562a24884685db6290dfd7c13894949dab71989466dc60ade3a3c2694c90c27ad1d110cc0001e0b03adb1aaabc4ab7ef34d3b8b6fb0ffe5fd8b268c7b70d36
|
@@ -99,7 +99,7 @@ module Solargraph
|
|
99
99
|
message = Message.select(request['method']).new(self, request)
|
100
100
|
begin
|
101
101
|
message.process
|
102
|
-
rescue
|
102
|
+
rescue StandardError => e
|
103
103
|
logger.warn "Error processing request: [#{e.class}] #{e.message}"
|
104
104
|
logger.warn e.backtrace.join("\n")
|
105
105
|
message.set_error Solargraph::LanguageServer::ErrorCodes::INTERNAL_ERROR, "[#{e.class}] #{e.message}"
|
@@ -16,7 +16,12 @@ module Solargraph
|
|
16
16
|
presence: region.closure.location.range,
|
17
17
|
decl: require_keyword?(node) ? :kwarg : :kwoptarg
|
18
18
|
)
|
19
|
-
region.closure.parameters.
|
19
|
+
idx = region.closure.parameters.find_index { |par| [:kwrestarg, :blockarg].include?(par.decl) }
|
20
|
+
if idx
|
21
|
+
region.closure.parameters.insert idx, locals.last
|
22
|
+
else
|
23
|
+
region.closure.parameters.push locals.last
|
24
|
+
end
|
20
25
|
node.children[1] && NodeProcessor.process(node.children[1], region, pins, locals)
|
21
26
|
end
|
22
27
|
|
@@ -16,7 +16,12 @@ module Solargraph
|
|
16
16
|
presence: region.closure.location.range,
|
17
17
|
decl: :optarg
|
18
18
|
)
|
19
|
-
region.closure.parameters.
|
19
|
+
idx = region.closure.parameters.find_index { |par| par.decl != :arg }
|
20
|
+
if idx
|
21
|
+
region.closure.parameters.insert idx, locals.last
|
22
|
+
else
|
23
|
+
region.closure.parameters.push locals.last
|
24
|
+
end
|
20
25
|
node.children[1] && NodeProcessor.process(node.children[1], region, pins, locals)
|
21
26
|
end
|
22
27
|
end
|
data/lib/solargraph/shell.rb
CHANGED
@@ -175,7 +175,7 @@ module Solargraph
|
|
175
175
|
puts pin_description(pin) if options[:verbose]
|
176
176
|
pin.typify api_map
|
177
177
|
pin.probe api_map
|
178
|
-
rescue
|
178
|
+
rescue StandardError => e
|
179
179
|
STDERR.puts "Error testing #{pin_description(pin)} #{pin.location ? "at #{pin.location.filename}:#{pin.location.range.start.line + 1}" : ''}"
|
180
180
|
STDERR.puts "[#{e.class}]: #{e.message}"
|
181
181
|
STDERR.puts e.backtrace.join("\n")
|
@@ -82,6 +82,8 @@ module Solargraph
|
|
82
82
|
# @param comment [String]
|
83
83
|
# @return [Integer]
|
84
84
|
def find_directive_line_number comment, tag, start
|
85
|
+
# Avoid overruning the index
|
86
|
+
return start unless start < comment.lines.length
|
85
87
|
num = comment.lines[start..-1].find_index do |line|
|
86
88
|
# Legacy method directives might be `@method` instead of `@!method`
|
87
89
|
# @todo Legacy syntax should probably emit a warning
|
data/lib/solargraph/version.rb
CHANGED
data/lib/solargraph/workspace.rb
CHANGED
@@ -170,7 +170,7 @@ module Solargraph
|
|
170
170
|
Dir.chdir base do
|
171
171
|
begin
|
172
172
|
# @type [Gem::Specification]
|
173
|
-
spec = eval(File.read(file),
|
173
|
+
spec = eval(File.read(file), TOPLEVEL_BINDING, file)
|
174
174
|
next unless Gem::Specification === spec
|
175
175
|
@gemnames.push spec.name
|
176
176
|
result.concat(spec.require_paths.map { |path| File.join(base, path) })
|
data/lib/solargraph/yard_map.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: solargraph
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.39.
|
4
|
+
version: 0.39.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Fred Snyder
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-05-
|
11
|
+
date: 2020-05-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: backport
|