ruby-lsp icon indicating copy to clipboard operation
ruby-lsp copied to clipboard

`--yjit` added to ruby command when not supported (with asdf usage)

Open addbrick opened this issue 9 months ago • 0 comments

Description

Reproduction steps

I am using the vscode extension for a project running ruby 2.7.7, so I am following the separate Gemfile usage. The project uses asdf to manage ruby versions. This has been working great but it broke with the vscode extension version 0.5.20.

Now when I start the extension in this project, it shows an error /Users/addisonbrickey/.asdf/installs/ruby/2.7.7/bin/ruby: invalid option --yjit (-h will show valid options) (RuntimeError).

The core of the issue is the --yjit option is being added to the ruby command even though ruby 2.7.7 does not support it. I did notice in that release a manager for asdf was introduced https://github.com/Shopify/ruby-lsp/pull/1845 in 0.5.20. My project uses asdf so I assume that is part of the issue. Can see the code building the ruby command checks the ruby version number to ensure it supports yjit option.

addbrick avatar May 09 '24 18:05 addbrick