Skip to content
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

Merged
merged 2 commits into from
Oct 31, 2024

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented Oct 26, 2024

@andyw8 andyw8 force-pushed the andyw8/update-index-enhancement branch from 026aa4b to 1b85c99 Compare October 31, 2024 13:57
@andyw8 andyw8 added the chore Chore task label Oct 31, 2024
@andyw8 andyw8 force-pushed the andyw8/update-index-enhancement branch from 1b85c99 to 144a687 Compare October 31, 2024 14:02
@andyw8 andyw8 marked this pull request as ready for review October 31, 2024 14:03
@andyw8 andyw8 requested a review from a team as a code owner October 31, 2024 14:03
Copy link
Member

@vinistock vinistock left a 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

Comment on lines 9 to 13
sig { params(index: RubyIndexer::Index).void }
def initialize(index)
super
@index = index
end
Copy link
Member

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.

Copy link
Contributor Author

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?

Copy link
Member

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.

@andyw8 andyw8 force-pushed the andyw8/update-index-enhancement branch from 6c51b64 to 4d4085c Compare October 31, 2024 14:30
@andyw8 andyw8 force-pushed the andyw8/update-index-enhancement branch from 4d4085c to 6698760 Compare October 31, 2024 14:31
@andyw8 andyw8 enabled auto-merge (squash) October 31, 2024 14:33
@andyw8 andyw8 merged commit 77650f0 into main Oct 31, 2024
28 checks passed
@andyw8 andyw8 deleted the andyw8/update-index-enhancement branch October 31, 2024 14:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
chore Chore task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants