Skip to content

feat: command-free build#291

Merged
vitallium merged 1 commit into
mainfrom
vs/command-free-build
May 26, 2026
Merged

feat: command-free build#291
vitallium merged 1 commit into
mainfrom
vs/command-free-build

Conversation

@vitallium
Copy link
Copy Markdown
Collaborator

Zed currently has a macOS spawn bug bare executables are resolved before Command::envs is applied. So Command::new("ruby") can pick Ruby from Zed’s own process PATH, even though the child process receives the right project PATH.

That breaks Ruby language servers in projects using mise, direnv, asdf, or rbenv. The server can start under the wrong Ruby, with the wrong gems.

Resolving Ruby to an absolute path inside the extension is not a good fix. Those paths are dynamic and do not fit the extension manifest process:exec capability model.

This PR avoids the broken Command API path for language server startup by making the default build command-free (previous behavior).

Command-free launch order:

  1. Use lsp.<server>.binary.path, if configured.
  2. If use_bundler is true, run bundle exec <server>.
  3. Otherwise resolve <server> with worktree.which.
  4. Error if nothing can be launched.

use_bundler defaults

Language server Executable Default use_bundler
Ruby LSP ruby-lsp true
RuboCop rubocop true
Solargraph solargraph true
Sorbet srb true
Steep steep true
Fuzzy Ruby Server fuzzy N/A, custom resolver
Kanayago kanayago false
Herb herb true

Kanayago defaults to false because bundle exec kanayago fails when the gem is not in the project bundle. Once that process is launched, the extension cannot fall back to a direct executable.

@cla-bot cla-bot Bot added the cla-signed label May 26, 2026
@vitallium vitallium force-pushed the vs/command-free-build branch from 1901cc8 to 9fed5bb Compare May 26, 2026 15:36
@vitallium vitallium merged commit 278b9c4 into main May 26, 2026
9 checks passed
@vitallium vitallium deleted the vs/command-free-build branch May 26, 2026 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant