Skip to content

Commit 7fed5a2

Browse files
authored
Bump ruby-lsp to v0.24.0 (#625)
1 parent 6741da8 commit 7fed5a2

File tree

9 files changed

+2543
-854
lines changed

9 files changed

+2543
-854
lines changed

Gemfile.lock

Lines changed: 44 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ PATH
22
remote: .
33
specs:
44
ruby-lsp-rails (0.4.5)
5-
ruby-lsp (>= 0.23.18, < 0.24.0)
5+
ruby-lsp (>= 0.24.0, < 0.25.0)
66

77
GEM
88
remote: https://rubygems.org/
@@ -79,9 +79,9 @@ GEM
7979
tzinfo (~> 2.0, >= 2.0.5)
8080
uri (>= 0.13.1)
8181
ast (2.4.3)
82-
base64 (0.2.0)
83-
benchmark (0.4.0)
84-
bigdecimal (3.1.9)
82+
base64 (0.3.0)
83+
benchmark (0.4.1)
84+
bigdecimal (3.2.2)
8585
builder (3.3.0)
8686
concurrent-ruby (1.3.5)
8787
connection_pool (2.5.3)
@@ -102,7 +102,7 @@ GEM
102102
pp (>= 0.6.0)
103103
rdoc (>= 4.0.0)
104104
reline (>= 0.4.2)
105-
json (2.12.1)
105+
json (2.12.2)
106106
language_server-protocol (3.17.0.5)
107107
lint_roller (1.1.0)
108108
logger (1.7.0)
@@ -145,7 +145,7 @@ GEM
145145
nokogiri (1.18.8-x86_64-linux-musl)
146146
racc (~> 1.4)
147147
parallel (1.27.0)
148-
parser (3.3.7.1)
148+
parser (3.3.8.0)
149149
ast (~> 2.4.1)
150150
racc
151151
pp (0.6.2)
@@ -158,7 +158,7 @@ GEM
158158
puma (6.6.0)
159159
nio4r (~> 2.0)
160160
racc (1.8.1)
161-
rack (3.1.15)
161+
rack (3.1.16)
162162
rack-session (2.1.1)
163163
base64 (>= 0.1.0)
164164
rack (>= 3.0.0)
@@ -196,63 +196,71 @@ GEM
196196
thor (~> 1.0, >= 1.2.2)
197197
zeitwerk (~> 2.6)
198198
rainbow (3.1.1)
199-
rake (13.2.1)
200-
rbi (0.2.4)
199+
rake (13.3.0)
200+
rbi (0.3.3)
201201
prism (~> 1.0)
202+
rbs (>= 3.4.4)
202203
sorbet-runtime (>= 0.5.9204)
203-
rbs (3.9.4)
204+
rbs (4.0.0.dev.4)
204205
logger
206+
prism (>= 1.3.0)
205207
rdoc (6.14.0)
206208
erb
207209
psych (>= 4.0.0)
208210
regexp_parser (2.10.0)
209211
reline (0.6.1)
210212
io-console (~> 0.5)
211-
rubocop (1.73.2)
213+
require-hooks (0.2.2)
214+
rexml (3.4.1)
215+
rubocop (1.76.0)
212216
json (~> 2.3)
213217
language_server-protocol (~> 3.17.0.2)
214218
lint_roller (~> 1.1.0)
215219
parallel (~> 1.10)
216220
parser (>= 3.3.0.2)
217221
rainbow (>= 2.2.2, < 4.0)
218222
regexp_parser (>= 2.9.3, < 3.0)
219-
rubocop-ast (>= 1.38.0, < 2.0)
223+
rubocop-ast (>= 1.45.0, < 2.0)
220224
ruby-progressbar (~> 1.7)
221225
unicode-display_width (>= 2.4.0, < 4.0)
222-
rubocop-ast (1.38.1)
223-
parser (>= 3.3.1.0)
224-
rubocop-minitest (0.37.1)
226+
rubocop-ast (1.45.0)
227+
parser (>= 3.3.7.2)
228+
prism (~> 1.4)
229+
rubocop-minitest (0.38.1)
225230
lint_roller (~> 1.1)
226-
rubocop (>= 1.72.1, < 2.0)
231+
rubocop (>= 1.75.0, < 2.0)
227232
rubocop-ast (>= 1.38.0, < 2.0)
228233
rubocop-rake (0.7.1)
229234
lint_roller (~> 1.1)
230235
rubocop (>= 1.72.1)
231-
rubocop-shopify (2.16.0)
236+
rubocop-shopify (2.17.1)
232237
rubocop (~> 1.62)
233-
rubocop-sorbet (0.8.9)
234-
rubocop (>= 1)
235-
ruby-lsp (0.23.23)
238+
rubocop-sorbet (0.10.2)
239+
lint_roller
240+
rubocop (>= 1.75.2)
241+
ruby-lsp (0.24.0)
236242
language_server-protocol (~> 3.17.0)
237243
prism (>= 1.2, < 2.0)
238244
rbs (>= 3, < 5)
239245
sorbet-runtime (>= 0.5.10782)
240246
ruby-progressbar (1.13.0)
241247
ruby2_keywords (0.0.5)
242248
securerandom (0.4.1)
243-
sorbet (0.5.12087)
244-
sorbet-static (= 0.5.12087)
245-
sorbet-runtime (0.5.12087)
246-
sorbet-static (0.5.12087-aarch64-linux)
247-
sorbet-static (0.5.12087-universal-darwin)
248-
sorbet-static (0.5.12087-x86_64-linux)
249-
sorbet-static-and-runtime (0.5.12087)
250-
sorbet (= 0.5.12087)
251-
sorbet-runtime (= 0.5.12087)
252-
spoom (1.5.4)
249+
sorbet (0.5.12157)
250+
sorbet-static (= 0.5.12157)
251+
sorbet-runtime (0.5.12157)
252+
sorbet-static (0.5.12157-aarch64-linux)
253+
sorbet-static (0.5.12157-universal-darwin)
254+
sorbet-static (0.5.12157-x86_64-linux)
255+
sorbet-static-and-runtime (0.5.12157)
256+
sorbet (= 0.5.12157)
257+
sorbet-runtime (= 0.5.12157)
258+
spoom (1.7.2)
253259
erubi (>= 1.10.0)
254260
prism (>= 0.28.0)
255-
rbi (>= 0.2.3)
261+
rbi (>= 0.3.3)
262+
rbs (>= 4.0.0.dev.4)
263+
rexml (>= 3.2.6)
256264
sorbet-static-and-runtime (>= 0.5.10187)
257265
thor (>= 0.19.2)
258266
sqlite3 (2.6.0-aarch64-linux-gnu)
@@ -263,14 +271,15 @@ GEM
263271
sqlite3 (2.6.0-x86_64-linux-gnu)
264272
sqlite3 (2.6.0-x86_64-linux-musl)
265273
stringio (3.1.7)
266-
tapioca (0.16.11)
274+
tapioca (0.17.1)
267275
benchmark
268276
bundler (>= 2.2.25)
269277
netrc (>= 0.11.0)
270278
parallel (>= 1.21.0)
271-
rbi (~> 0.2)
279+
rbi (>= 0.3.1)
280+
require-hooks (>= 0.2.2)
272281
sorbet-static-and-runtime (>= 0.5.11087)
273-
spoom (>= 1.2.0)
282+
spoom (>= 1.7.0)
274283
thor (>= 1.2.0)
275284
yard-sorbet
276285
thor (1.3.2)
@@ -284,7 +293,7 @@ GEM
284293
unicode-emoji (4.0.4)
285294
uri (1.0.3)
286295
useragent (0.16.11)
287-
websocket-driver (0.7.7)
296+
websocket-driver (0.8.0)
288297
base64
289298
websocket-extensions (>= 0.1.0)
290299
websocket-extensions (0.1.5)

lib/ruby_lsp/ruby_lsp_rails/completion.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ def handle_active_record_where_completions(node:, receiver:)
3636
resolved_class = @client.model(receiver.name.to_s)
3737
return if resolved_class.nil?
3838

39-
arguments = @node_context.call_node.arguments&.arguments
39+
arguments = @node_context.call_node&.arguments&.arguments
4040
indexed_call_node_args = {} #: Hash[String, Prism::Node]
4141

4242
if arguments

lib/ruby_lsp/ruby_lsp_rails/hover.rb

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -29,18 +29,20 @@ def initialize(client, response_builder, node_context, global_state, dispatcher)
2929
#: (Prism::ConstantPathNode node) -> void
3030
def on_constant_path_node_enter(node)
3131
entries = @index.resolve(node.slice, @nesting)
32-
return unless entries
32+
item = entries&.first
33+
return unless item
3334

34-
name = entries.first.name
35+
name = item.name
3536
generate_column_content(name)
3637
end
3738

3839
#: (Prism::ConstantReadNode node) -> void
3940
def on_constant_read_node_enter(node)
4041
entries = @index.resolve(node.name.to_s, @nesting)
41-
return unless entries
42+
item = entries&.first
43+
return unless item
4244

43-
generate_column_content(entries.first.name)
45+
generate_column_content(item.name)
4446
end
4547

4648
private

lib/ruby_lsp/ruby_lsp_rails/rails_test_style.rb

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def resolve_test_commands(items)
5353
#: (ResponseBuilders::TestCollection response_builder, GlobalState global_state, Prism::Dispatcher dispatcher, URI::Generic uri) -> void
5454
def initialize(response_builder, global_state, dispatcher, uri)
5555
@parent_stack = [response_builder] #: Array[(Requests::Support::TestItem | ResponseBuilders::TestCollection)?]
56-
super(response_builder, global_state, dispatcher, uri)
56+
super(response_builder, global_state, uri)
5757

58-
dispatcher.register(
59-
self,
58+
register_events(
59+
dispatcher,
6060
:on_class_node_enter,
6161
:on_call_node_enter,
6262
:on_def_node_enter,

lib/ruby_lsp/ruby_lsp_rails/server.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def route_location(name)
401401

402402
#: (String) -> Hash[Symbol | String, untyped]?
403403
def resolve_database_info_from_model(model_name)
404-
const = ActiveSupport::Inflector.safe_constantize(model_name)
404+
const = ActiveSupport::Inflector.safe_constantize(model_name) # rubocop:disable Sorbet/ConstantsFromStrings
405405
return unless active_record_model?(const)
406406

407407
info = {
@@ -420,7 +420,7 @@ def resolve_database_info_from_model(model_name)
420420

421421
#: (Hash[Symbol | String, untyped]) -> Hash[Symbol | String, untyped]?
422422
def resolve_association_target(params)
423-
const = ActiveSupport::Inflector.safe_constantize(params[:model_name])
423+
const = ActiveSupport::Inflector.safe_constantize(params[:model_name]) # rubocop:disable Sorbet/ConstantsFromStrings
424424
return unless active_record_model?(const)
425425

426426
association_klass = const.reflect_on_association(params[:association_name].intern).klass

ruby-lsp-rails.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
2424
Dir["lib/**/*", "LICENSE.txt", "Rakefile", "README.md"]
2525
end
2626

27-
spec.add_dependency("ruby-lsp", ">= 0.23.18", "< 0.24.0")
27+
spec.add_dependency("ruby-lsp", ">= 0.24.0", "< 0.25.0")
2828
end

0 commit comments

Comments
 (0)