rust-lang / rust-lang/rust-analyzer
vscode strange error toolchain mixed from windows and macos.
Open
Nobody has claimed this yet.
C-bug
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
I use VScode with the rust-analyzer plugin installed, while using ssh to connect from windows to macos.
It looks like it tries to use the windows toolchain mixed with macos?!
2025-01-05T18:32:44.731679+01:00 ERROR FetchWorkspaceError: rust-analyzer failed to load workspace: Failed to load the project at /Users/josef/Documents/rust-api-server/Cargo.toml: Failed to query rust toolchain version at /Users/josef/Documents/rust-api-server, is your toolchain setup correctly?: cd "/Users/josef/Documents/rust-api-server" && RUSTUP_TOOLCHAIN="stable-msvc" "/Users/josef/.cargo/bin/cargo" "--version" failed, exit status: 1
stderr:
info: syncing channel updates for 'stable-aarch64-apple-darwin-msvc'
info: latest update on 2024-11-28, rust version 1.83.0 (90b35a623 2024-11-26)
error: target 'aarch64-apple-darwin-msvc' not found in channel. Perhaps check https://doc.rust-lang.org/nightly/rustc/platform-support.html for available targets
2025-01-05T18:32:45.010743+01:00 ERROR FetchWorkspaceError: rust-analyzer failed to load workspace: Failed to load the project at /Users/josef/Documents/rust-api-server/Cargo.toml: Failed to query rust toolchain version at /Users/josef/Documents/rust-api-server, is your toolchain setup correctly?: cd "/Users/josef/Documents/rust-api-server" && RUSTUP_TOOLCHAIN="stable-msvc" "/Users/josef/.cargo/bin/cargo" "--version" failed, exit status: 1
stderr:
info: syncing channel updates for 'stable-aarch64-apple-darwin-msvc'
info: latest update on 2024-11-28, rust version 1.83.0 (90b35a623 2024-11-26)
error: target 'aarch64-apple-darwin-msvc' not found in channel. Perhaps check https://doc.rust-lang.org/nightly/rustc/platform-support.html for available targets
2025-01-05T18:33:26.236888+01:00 ERROR notification handler failed handler=textDocument/didSave error=file not found: /Users/josef/Documents/rust-api-server/Cargo.toml
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported rust-analyzer failure in VS Code while connecting over SSH from Windows to macOS. Compare the remote environment and selected toolchain with the logged RUSTUP_TOOLCHAIN, cargo path, and target; done means the workspace loads without mixing Windows and macOS toolchain settings.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100