-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Regression: cannot find proc-macro-srv only on Windows #16433
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
Does this happen with the latest rust-analyzer version? Also please check your logs for any additional info, it looks like your setup causes r-a to not find your sysroot at all, do you have any relevant configs set? |
Yep, latest as offered by VS Code, this is how we discovered it today
Since I don't have a Windows setup personally, I can get logs and check settings on Monday |
I have checked the settings and it looks like it might not be a bug, at least not in the original description. We incorrectly believed that to use rust-analyzer at all with a no-std, no-rust-src toolchain, Windows users have to set Another thing we just discovered is that to suppress "can't find crate for test" we set The warnings about rust-src and test crates missing should be possible to suppress since getting rust-src etc isn't necessary and may not be possible, should I create a separate issue for that? Should I close this issue? If you want to reproduce this it should be enough to have a toolchain without rust-src and the test crate. I'm no Rust pro so I don't even know what a "test crate" is and searching the internet isn't helping |
Ah, regarding the proc-macro server you can either set the path for it directly via
In what cases specifically? This should stop giving you cargo diagnostics in unit/integration tests, benches and examples, but otherwise should still yield diagnostics. Disabling |
Oh, I see. We were testing in example code. We would still like to suppress warnings about "test crate" and still have examples work. When I have a chance I'll try this workaround instead |
rust-analyzer version: Anything since 0.3.1498. 0.3.1489 and earlier are unaffected
rustc version: reproduced with 1.67 and 1.75 on Windows. Could not reproduce with either on Linux
relevant settings: none
When cursor is moved over the sad rust-analyzer thing at the bottom in VS Code, you will see
cannot find proc-macro-srv, the workspace C:\whatever is missing a sysroot
. Repro should be as simple asand open VS Code in this directory.
It's possible that installing rust-src fixes this. Our nostd-only Rust toolchain isn't shipped with sources so this isn't an option. Though we're interested in this bug because of our nostd-only toolchain, all behavior described above this paragraph applies to Windows stable as well.
I somewhat suspect that the VS Code and Windows changes by @Veykril may be the culprit based on looking at the output of
git log --stat 2023-04-24..2023-05-01 --first-parent
The text was updated successfully, but these errors were encountered: