Description
Ruby LSP Information
The version 1.17.0 of the gem rubocop defines a new module RubyLsp::Rubocop. (link) that breaks several lines of code of the gem ruby-lsp.
Reproduction steps
In my Gemfile.lock:
- rubocop (1.70.0)
- ruby-lsp (0.23.4)
- Start the Ruby LSP using VSCode
- It fails with the following message:
Error processing initialized: .bundle/ruby/3.1.0/gems/ruby-lsp-0.23.4/lib/ruby_lsp/requests/support/rubocop_runner.rb:86:in
'initialize':uninitialized constant RubyLsp::RuboCop::Cop (NameError)
Fix
Replace all the Rubocop references within the namespace RubyLsp using the top-level namespace operand :: That's already the case on some instructions but not everywhere.
So basically RuboCop::Cop should be replaced by ::RuboCop::Cop. I will try to provide a PR.
Description
Ruby LSP Information
The version 1.17.0 of the gem
rubocopdefines a new module RubyLsp::Rubocop. (link) that breaks several lines of code of the gemruby-lsp.Reproduction steps
In my Gemfile.lock:
Fix
Replace all the
Rubocopreferences within the namespaceRubyLspusing the top-level namespace operand::That's already the case on some instructions but not everywhere.So basically
RuboCop::Copshould be replaced by::RuboCop::Cop. I will try to provide a PR.