Skip to content

fix: restore the server binary check broken by #18281 - #23370

Merged
ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
devjgm:greg/ra-await-valid-executable
Sep 15, 2026
Merged

ChayimFriedman2 merged 1 commit into
rust-lang:masterfrom
devjgm:greg/ra-await-valid-executable

Conversation

@devjgm

@devjgm devjgm commented Sep 15, 2026

Copy link
Copy Markdown
Contributor

isValidExecutable was synchronous until #18281 made it async without updating its only caller. !isValidExecutable(...) has negated a Promise ever since, which is never false, so the check has silently done nothing for about 2 years.

A bad rust-analyzer.server.path therefore failed with

Cannot activate rust-analyzer extension: undefined

naming neither the binary nor the setting, because vscode-languageclient rejects with a string rather than an Error. The probe command still runs and still logs a warning with the real reason.

Also fixed some string messages that were hidden by the dead check:

  • missing space after --version., plus a run of indentation pulled in by a line continuation inside the template literal
  • the bootstrap notification and the trace.extension deprecation message both pointed at OUTPUT > Rust Analyzer Client, which is now called rust-analyzer Extension

This restores the pre #18281 behaviour, which I think is desirable. However, there are two (somewhat uncommon, IMO) things that can start failing again as a result of restoring this behavior:

  • a server.path that does not exit 0 on --version, even if it speaks LSP fine. Yesterday that would log the warning and continue, and would work fine. Now it will give an error, which is probably what was originally intended in Run subprocesses async in vscode extension #18281.
  • a relative server.path, since the probe runs in the extension host's working directory while the server is launched in the workspace folder.

@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2026
@rustbot

This comment has been minimized.

@ChayimFriedman2 ChayimFriedman2 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@ChayimFriedman2
ChayimFriedman2 added this pull request to the merge queue Sep 15, 2026
@ChayimFriedman2
ChayimFriedman2 removed this pull request from the merge queue due to a manual request Sep 15, 2026
@ChayimFriedman2

Copy link
Copy Markdown
Contributor

Please fix the issue link.

`isValidExecutable` was synchronous until rust-lang#18281 made
it `async` without updating its only caller. `!isValidExecutable(...)` has
negated a Promise ever since, which is never false, so the check has silently
done nothing for about 2 years.

A bad `rust-analyzer.server.path` therefore failed with

    Cannot activate rust-analyzer extension: undefined

naming neither the binary nor the setting, because vscode-languageclient
rejects with a string rather than an Error. The probe command still runs
and still logs a warning with the real reason.

Also fixed some string messages that were hidden by the dead check:

- missing space after `--version.`, plus a run of indentation pulled in by a
  line continuation inside the template literal
- the bootstrap notification and the `trace.extension` deprecation message
  both pointed at `OUTPUT > Rust Analyzer Client`, which is now called
  `rust-analyzer Extension`

This restores the behaviour from before that change, which I think is
desirable. However, there are two (somewhat uncommon, IMO) things that can
start failing _again_ as a result of restoring this behavior:

- a `server.path` that does not exit 0 on `--version`, even if it speaks LSP
  fine. Yesterday that would log the warning and continue, and would
  work fine. Now it will give an error, which is probably what was
  originally intended there.
- a relative `server.path`, since the probe runs in the extension host's
  working directory while the server is launched in the workspace
  folder.
@devjgm
devjgm force-pushed the greg/ra-await-valid-executable branch from 85b3c94 to c6219a5 Compare September 15, 2026 20:17
@devjgm

devjgm commented Sep 15, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. Link issues fixed.

@ChayimFriedman2
ChayimFriedman2 added this pull request to the merge queue Sep 15, 2026
Merged via the queue into rust-lang:master with commit fa88768 Sep 15, 2026
21 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Sep 15, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants