-
Notifications
You must be signed in to change notification settings - Fork 196
Remove YJIT setting #1427
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
Remove YJIT setting #1427
Conversation
minor === 2; | ||
|
||
if (this.supportsYjit && useYjit) { | ||
if (this.supportsYjit && major === 3 && minor === 2) { |
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.
This is strange. Am I reading this line correctly, that it only enables YJIT on Ruby 3.2 and not on any other version, like 3.3?
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.
That's correct. On 3.3 or higher, we only enable YJIT once the LSP finished booting here.
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.
Oh, I just saw the comment above this line. In that case, can't we just move the exact version check to the definition of supportsYjit
and make it:
this.supportsYjit = this.yjitEnabled && major == 3 && minor == 2;
?
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.
And maybe rename that field to reflect the new meaning as well.
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.
Yeah, that's a fair point. I'll follow up with another PR.
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.
Motivation
Starting to migrate Shopify/vscode-ruby-lsp#923 into this repo by parts.
We added the possibility to turn off YJIT (even when Ruby was compiled with support for it) just in case there was a major issue with YJIT that prevented people from using the LSP. It's been a long time and no one has ever reported any YJIT related issues that weren't fixed before Ruby releases, so keeping this setting doesn't add much value.
Implementation
Removed the setting, the related status item and command.