Skip to content

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

Merged
merged 1 commit into from
Feb 28, 2024
Merged

Remove YJIT setting #1427

merged 1 commit into from
Feb 28, 2024

Conversation

vinistock
Copy link
Member

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.

@vinistock vinistock self-assigned this Feb 28, 2024
@vinistock vinistock requested a review from a team as a code owner February 28, 2024 21:18
@vinistock vinistock requested review from andyw8 and egiurleo February 28, 2024 21:18
@vinistock vinistock merged commit a92a6f1 into main Feb 28, 2024
@vinistock vinistock deleted the vs/remove_yjit_setting branch February 28, 2024 21:50
@vinistock vinistock added enhancement New feature or request vscode This pull request should be included in the VS Code extension's release notes labels Feb 28, 2024
minor === 2;

if (this.supportsYjit && useYjit) {
if (this.supportsYjit && major === 3 && minor === 2) {
Copy link
Member

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?

Copy link
Member Author

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.

Copy link
Member

@paracycle paracycle Feb 28, 2024

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;

?

Copy link
Member

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.

Copy link
Member Author

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.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request vscode This pull request should be included in the VS Code extension's release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants