ruby-lsp 0.26.0 → 0.26.1
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/VERSION +1 -1
- data/lib/ruby_indexer/lib/ruby_indexer/index.rb +3 -1
- data/lib/ruby_indexer/test/index_test.rb +3 -0
- data/lib/ruby_lsp/server.rb +6 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c80f549675508ffbb28d649de04506adabec01eac9aa4c6eee057ec848adf858
|
4
|
+
data.tar.gz: 71ea1a4d628444b98bc1173748f5aecf0d71bdc8d3dc80f33b2779c9c78d9de0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7261bf15c095154ff36152492aa252cbd84b84f6e83eb458623c7bb9790a57957885a855c2ee10683b7035267177e323c013988befc02e96f3fdf0274d2312ca
|
7
|
+
data.tar.gz: 74bcea4844e876230713400776bf7def1db44492bcf913526195b5d01919efd24ac69b517594ce2499e332184bf7ef4881e17e7694574bf4d35afabeda25b8c4
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.26.
|
1
|
+
0.26.1
|
@@ -293,11 +293,13 @@ module RubyIndexer
|
|
293
293
|
entries.concat(@entries_tree.search(name))
|
294
294
|
|
295
295
|
# Filter only constants since methods may have names that look like constants
|
296
|
-
entries.
|
296
|
+
entries.select! do |definitions|
|
297
297
|
definitions.select! do |entry|
|
298
298
|
entry.is_a?(Entry::Constant) || entry.is_a?(Entry::ConstantAlias) ||
|
299
299
|
entry.is_a?(Entry::Namespace) || entry.is_a?(Entry::UnresolvedConstantAlias)
|
300
300
|
end
|
301
|
+
|
302
|
+
definitions.any?
|
301
303
|
end
|
302
304
|
|
303
305
|
entries.uniq!
|
@@ -1993,6 +1993,9 @@ module RubyIndexer
|
|
1993
1993
|
|
1994
1994
|
candidates = @index.constant_completion_candidates("Q", [])
|
1995
1995
|
refute_includes(candidates.flat_map { |entries| entries.map(&:name) }, "Qux")
|
1996
|
+
|
1997
|
+
candidates = @index.constant_completion_candidates("Qux", [])
|
1998
|
+
assert_equal(0, candidates.length)
|
1996
1999
|
end
|
1997
2000
|
|
1998
2001
|
def test_constant_completion_candidates_for_empty_name
|
data/lib/ruby_lsp/server.rb
CHANGED
@@ -126,8 +126,12 @@ module RubyLsp
|
|
126
126
|
if message[:id]
|
127
127
|
# If a document is deleted before we are able to process all of its enqueued requests, we will try to read it
|
128
128
|
# from disk and it raise this error. This is expected, so we don't include the `data` attribute to avoid
|
129
|
-
# reporting these to our telemetry
|
130
|
-
|
129
|
+
# reporting these to our telemetry.
|
130
|
+
#
|
131
|
+
# Similarly, if we receive a location for an invalid position in the
|
132
|
+
# document, we don't report it to telemetry
|
133
|
+
case e
|
134
|
+
when Store::NonExistingDocumentError, Document::InvalidLocationError
|
131
135
|
send_message(Error.new(
|
132
136
|
id: message[:id],
|
133
137
|
code: Constant::ErrorCodes::INVALID_PARAMS,
|