You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
"Rust Analyzer Language Server is not available. "+
"Please, ensure its [proper installation](https://rust-analyzer.github.io/manual.html#installation).",
);
}
log.info("Using server binary at",path);
if(!isValidExecutable(path)){
if(config.serverPath){
thrownewError(`Failed to execute ${path} --version. \`config.server.path\` or \`config.serverPath\` has been set explicitly.\
Consider removing this config or making a valid server binary available at that path.`);
}else{
thrownewError(`Failed to execute ${path} --version`);
}
}
In my case, I have "rust-analyzer.server.path": "rust-analyzer" and "rust-analyzer.server.extraEnv": { "RUSTUP_TOOLCHAIN": "nightly-2023-06-04" } but as this isn't getting passed, rust-analyzer (actually rustup's shim) returns this error:
INFO [11/08/2023, 12:36:15]: Starting language client
INFO [11/08/2023, 12:36:15]: Using server binary at rust-analyzer
INFO [11/08/2023, 12:36:16]: rust-analyzer --version: {
status: 1,
signal: null,
output: [
null,
'',
"error: 'rust-analyzer' is not installed for the toolchain 'stable-aarch64-apple-darwin'\n"
],
pid: 34991,
stdout: '',
stderr: "error: 'rust-analyzer' is not installed for the toolchain 'stable-aarch64-apple-darwin'\n"
}
ERROR [11/08/2023, 12:36:16]: Bootstrap error Error: Failed to execute rust-analyzer --version. `config.server.path` or `config.serverPath` has been set explicitly. Consider removing this config or making a valid server binary available at that path.
at kv (/Users/alecmocatta/.vscode/extensions/rust-lang.rust-analyzer-0.3.1615-darwin-arm64/out/main.js:40:9565)
at wa.getOrCreateClient (/Users/alecmocatta/.vscode/extensions/rust-lang.rust-analyzer-0.3.1615-darwin-arm64/out/main.js:53:2237)
at wa.start (/Users/alecmocatta/.vscode/extensions/rust-lang.rust-analyzer-0.3.1615-darwin-arm64/out/main.js:53:3494)
at /Users/alecmocatta/.vscode/extensions/rust-lang.rust-analyzer-0.3.1615-darwin-arm64/out/main.js:371:174
at a.h (/Applications/Visual Studio Code.app/Contents/Resources/app/out/vs/workbench/api/node/extensionHostProcess.js:102:77769)
INFO [11/08/2023, 12:36:19]: Extension version: 0.3.1615
Line 23 here fails due to
rust-analyzer.server.extraEnv
not being passed to the invokedrust-analyzer
.rust-analyzer/editors/code/src/bootstrap.ts
Lines 13 to 30 in 1fde334
In my case, I have
"rust-analyzer.server.path": "rust-analyzer"
and"rust-analyzer.server.extraEnv": { "RUSTUP_TOOLCHAIN": "nightly-2023-06-04" }
but as this isn't getting passed,rust-analyzer
(actually rustup's shim) returns this error:rust-analyzer version: stable / nightly / nightly-2023-06-04
rustc version: nightly-2023-06-04
relevant settings:
The text was updated successfully, but these errors were encountered: