Skip to content

Commit

Permalink
Upgrade ruby-lsp requirement to v0.19
Browse files Browse the repository at this point in the history
  • Loading branch information
vinistock committed Oct 2, 2024
1 parent 51df5ac commit ba2e34a
Show file tree
Hide file tree
Showing 5 changed files with 642 additions and 323 deletions.
8 changes: 4 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ PATH
remote: .
specs:
ruby-lsp-rails (0.3.16)
ruby-lsp (>= 0.18.4, < 0.19.0)
ruby-lsp (>= 0.19.0, < 0.20.0)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -148,7 +148,7 @@ GEM
parser (3.3.1.0)
ast (~> 2.4.1)
racc
prism (1.0.0)
prism (1.1.0)
psych (5.1.2)
stringio
public_suffix (5.0.5)
Expand Down Expand Up @@ -228,9 +228,9 @@ GEM
rubocop (~> 1.51)
rubocop-sorbet (0.8.3)
rubocop (>= 0.90.0)
ruby-lsp (0.18.4)
ruby-lsp (0.19.0)
language_server-protocol (~> 3.17.0)
prism (~> 1.0)
prism (>= 1.1, < 2.0)
rbs (>= 3, < 4)
sorbet-runtime (>= 0.5.10782)
ruby-progressbar (1.13.0)
Expand Down
6 changes: 5 additions & 1 deletion lib/ruby_lsp/ruby_lsp_rails/addon.rb
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ def rails_runner_client
sig { override.params(global_state: GlobalState, message_queue: Thread::Queue).void }
def activate(global_state, message_queue)
@global_state = global_state
$stderr.puts("Activating Ruby LSP Rails add-on v#{VERSION}")
$stderr.puts("Activating Ruby LSP Rails add-on v#{version}")
register_additional_file_watchers(global_state: global_state, message_queue: message_queue)
@global_state.index.register_enhancement(IndexingEnhancement.new)

Expand All @@ -60,6 +60,10 @@ def activate(global_state, message_queue)
def deactivate
@rails_runner_client.shutdown
end
sig { override.returns(String) }
def version
VERSION
end

# Creates a new CodeLens listener. This method is invoked on every CodeLens request
sig do
Expand Down
2 changes: 2 additions & 0 deletions lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ def handle_association(index, owner, node, file_path)
name_arg.location,
name_arg.location,
nil,
index.configuration.encoding,
[RubyIndexer::Entry::Signature.new([])],
RubyIndexer::Entry::Visibility::PUBLIC,
owner,
Expand All @@ -72,6 +73,7 @@ def handle_association(index, owner, node, file_path)
name_arg.location,
name_arg.location,
nil,
index.configuration.encoding,
[RubyIndexer::Entry::Signature.new([RubyIndexer::Entry::RequiredParameter.new(name: name.to_sym)])],
RubyIndexer::Entry::Visibility::PUBLIC,
owner,
Expand Down
2 changes: 1 addition & 1 deletion ruby-lsp-rails.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ Gem::Specification.new do |spec|
Dir["lib/**/*", "LICENSE.txt", "Rakefile", "README.md"]
end

spec.add_dependency("ruby-lsp", ">= 0.18.4", "< 0.19.0")
spec.add_dependency("ruby-lsp", ">= 0.19.0", "< 0.20.0")
end
Loading

0 comments on commit ba2e34a

Please sign in to comment.