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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3e8b51ca9a97aa0e855fbf1109f07733aae195eb25dba844f79840665b36ac9a
4
- data.tar.gz: 79d5c3af7ba9fb03c2da197b4213a861e366b7be5a60e677ac6ca9ae8269dbea
3
+ metadata.gz: c80f549675508ffbb28d649de04506adabec01eac9aa4c6eee057ec848adf858
4
+ data.tar.gz: 71ea1a4d628444b98bc1173748f5aecf0d71bdc8d3dc80f33b2779c9c78d9de0
5
5
  SHA512:
6
- metadata.gz: 8cb30f7427f02460320becb1b883c502ea0fbfd48f5148192e1339350e94836ed6ba825df4b4b0fe0ff8d32325d6196af6a26ef94d566e4e32ecd235d66ed821
7
- data.tar.gz: 68d5712e3ae16ecaa602eeccadcab5108d89cce1f1a282b82bd3244b3111131442ee6feda63b1e7049027624c07be25e5f3ae39a00b9df25130f12f43c2dac80
6
+ metadata.gz: 7261bf15c095154ff36152492aa252cbd84b84f6e83eb458623c7bb9790a57957885a855c2ee10683b7035267177e323c013988befc02e96f3fdf0274d2312ca
7
+ data.tar.gz: 74bcea4844e876230713400776bf7def1db44492bcf913526195b5d01919efd24ac69b517594ce2499e332184bf7ef4881e17e7694574bf4d35afabeda25b8c4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.26.0
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.each do |definitions|
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
@@ -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
- if e.is_a?(Store::NonExistingDocumentError)
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,
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby-lsp
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.26.0
4
+ version: 0.26.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Shopify