-
Notifications
You must be signed in to change notification settings - Fork 30
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update index enhancement due to ruby-lsp changes #495
Conversation
026aa4b
to
1b85c99
Compare
1b85c99
to
144a687
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just needs to remove the initialize, but the rest looks good
sig { params(index: RubyIndexer::Index).void } | ||
def initialize(index) | ||
super | ||
@index = index | ||
end |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We don't need to override initialize. This is already the same in the parent class.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had tried that but it fails with:
lib/ruby_lsp/ruby_lsp_rails/indexing_enhancement.rb:64: Use of undeclared variable @index https://srb.help/6002
64 | @index.add(RubyIndexer::Entry::Method.new(
So I expect we'll need to fix ruby-lsp to use a T.let
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah, I see. You can add a shim to inform Sorbet about the T.let
.
6c51b64
to
4d4085c
Compare
4d4085c
to
6698760
Compare
Due to Shopify/ruby-lsp#2754