solargraph 0.41.0 → 0.41.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +7 -0
- data/lib/.rubocop.yml +1 -1
- data/lib/solargraph/api_map.rb +1 -1
- data/lib/solargraph/bench.rb +5 -1
- data/lib/solargraph/language_server/host/diagnoser.rb +9 -1
- data/lib/solargraph/language_server/message/text_document/hover.rb +1 -1
- data/lib/solargraph/library.rb +2 -1
- data/lib/solargraph/version.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: e4533d6cac061c01e292b70313f68a9de816c8af4ca6d34ddf7bde467d0428b0
|
|
4
|
+
data.tar.gz: 1fd4959f4e1652c8725fcc79f5da92df9f91a90eb5462879f87c30c0c8f2ada2
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 48b7f57a7b84140cb4ff9b1f2428fb1dfe2c814ef9fca26585bec17ea61a122a8755ab60e8da52969942c5ab674501332f6fc0655fcceb77606f1ab353899a4b
|
|
7
|
+
data.tar.gz: cd817d200a9579e66f612a100b17096fb56eb468c356de4c75d7c5d0f5621f6e734596f9babe809398f26bd2bcc2226bf424215393fe03626adf03f856eb24b9
|
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,10 @@
|
|
|
1
|
+
## 0.41.2 - June 9, 2021
|
|
2
|
+
- Rescue InvalidOffset in async diagnosis
|
|
3
|
+
- Remove erroneous escaping from Hover
|
|
4
|
+
|
|
5
|
+
## 0.41.1 - May 31, 2021
|
|
6
|
+
- ApiMap handles required bundles (#443)
|
|
7
|
+
|
|
1
8
|
## 0.41.0 - May 30, 2021
|
|
2
9
|
- Chain constant at last double colon with more than two nested namespaces
|
|
3
10
|
- Fill Integer#times return type (#440)
|
data/lib/.rubocop.yml
CHANGED
data/lib/solargraph/api_map.rb
CHANGED
|
@@ -80,7 +80,7 @@ module Solargraph
|
|
|
80
80
|
external_requires.push req unless result
|
|
81
81
|
end
|
|
82
82
|
end
|
|
83
|
-
br = @required.include?('bundler/require') ? bench.
|
|
83
|
+
br = @required.include?('bundler/require') ? require_from_bundle(bench.directory) : {}
|
|
84
84
|
@required.merge br.keys
|
|
85
85
|
yard_map.change(external_requires, br, bench.gemnames)
|
|
86
86
|
@store = Store.new(yard_map.pins + implicit.pins + pins)
|
data/lib/solargraph/bench.rb
CHANGED
|
@@ -15,13 +15,17 @@ module Solargraph
|
|
|
15
15
|
# @return [Set<String>]
|
|
16
16
|
attr_reader :gemnames
|
|
17
17
|
|
|
18
|
+
# @return [String]
|
|
19
|
+
attr_reader :directory
|
|
20
|
+
|
|
18
21
|
# @param source_maps [Array<SourceMap>, Set<SourceMap>]
|
|
19
22
|
# @param load_paths [Array<String>, Set<String>]
|
|
20
23
|
# @param gemnames [Array<String>, Set<String>]
|
|
21
|
-
def initialize source_maps: [], load_paths: [], gemnames: []
|
|
24
|
+
def initialize source_maps: [], load_paths: [], gemnames: [], directory: ''
|
|
22
25
|
@source_maps = source_maps.to_set
|
|
23
26
|
@load_paths = load_paths.to_set
|
|
24
27
|
@gemnames = gemnames.to_set
|
|
28
|
+
@directory = directory
|
|
25
29
|
end
|
|
26
30
|
end
|
|
27
31
|
end
|
|
@@ -62,7 +62,15 @@ module Solargraph
|
|
|
62
62
|
end
|
|
63
63
|
current = mutex.synchronize { queue.shift }
|
|
64
64
|
return if queue.include?(current)
|
|
65
|
-
|
|
65
|
+
begin
|
|
66
|
+
host.diagnose current
|
|
67
|
+
rescue InvalidOffsetError
|
|
68
|
+
# @todo This error can occur when the Source is out of sync with
|
|
69
|
+
# with the ApiMap. It's probably not the best way to handle it,
|
|
70
|
+
# but it's quick and easy.
|
|
71
|
+
Logging.logger.warn "Deferring diagnosis due to invalid offset: #{current}"
|
|
72
|
+
mutex.synchronize { queue.push current }
|
|
73
|
+
end
|
|
66
74
|
end
|
|
67
75
|
|
|
68
76
|
private
|
|
@@ -17,7 +17,7 @@ module Solargraph
|
|
|
17
17
|
if !this_link.nil? && this_link != last_link
|
|
18
18
|
parts.push this_link
|
|
19
19
|
end
|
|
20
|
-
parts.push "
|
|
20
|
+
parts.push "`#{pin.detail}`" unless pin.is_a?(Pin::Namespace) || pin.detail.nil?
|
|
21
21
|
parts.push pin.documentation unless pin.documentation.nil? || pin.documentation.empty?
|
|
22
22
|
unless parts.empty?
|
|
23
23
|
data = parts.join("\n\n")
|
data/lib/solargraph/library.rb
CHANGED
data/lib/solargraph/version.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.41.
|
|
4
|
+
version: 0.41.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Fred Snyder
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2021-
|
|
11
|
+
date: 2021-06-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: backport
|