-
Notifications
You must be signed in to change notification settings - Fork 1.7k
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
proc macro not expanded: failed to write request (os error 232) on Windows #16306
Comments
We really need to improve the |
Though generally that means the server crashed I think, which has me worried that the upstream server is now built without the sysroot abi after the trouble i had there last week ... |
Yup, I broke the sysroot server last week ... |
@onur-ozkan apologies for the cross-repo ping, |
Oh, nvm now I see whats going on. We changed the tool mode to Unsure how to proceed here then, should we just move the server into the Alternatively, we could try linking in the rustc_driver statically for this, as we dont use as much of it as other tools are |
Any updates to this? I'm seeing this with |
From zulip thread above, the issue may result from this PR merged on 2024-01-05, so I tried pinning the nightly toolchain before that date, and with latest rust-analyzer v0.3.1799 released on 2024-01-08, it turns out to work without the error. # rust-toolchain.toml in your project
[toolchain]
channel = "nightly-2024-01-04" or # globally override
rustup toolchain install nightly-2024-01-04
rustup default nightly-2024-01-04 P.S. it seems that this issue mainly happens on Windows. |
Thank you @zjp-CN. I will try that on my Windows machine. If the issue is not present on Linux I may also use that until it lands in latest nightly. Thanks for the quick and detailed response! |
Yes, to add context. This issue only exists on the windows toolchain because windows does not support This was fixed by #16312 (if not please tell) |
I have also encountered this exact issue using |
@spooky-th-ghost I've tested 2024-02-12 nightly RA with 1.76 stable toolchain (released on 2024-02-04) for proc macros, nothing goes wrong. |
As was said you'll need to update your rust-analyzer to a newer version./ |
I was having issues with making |
I pulled the source yesterday and built and it looks like it's version 0.0.0 |
Just downloaded the release of rust-analyzer from today and i'm still getting the same issue on proc-macros |
Then it seems like you are still somehow running an outdated server as the release build has the latest server version running.
source builds always have version 0.0.0 |
pretty lost at this point, reinstalled rustup and rust analyzer and I'm still getting the error, my current rust-analyzer version is |
I'm having the same issue on Neovim on Pop OS (Linux). proc macro I've tried everything, reinstalling, rebooting, replacing the rust-analyzer binary with the latest release. |
@benfaerber FYI if you use LSP plugins in neovim that install RA (say mason), it's likely not to use RA installed from rustup, which also cause outdated RA with newer toolchain. |
OMG I didn't realize that! Thanks for the tip, it fixed it! |
Is this issue been fixed? **PS F:\workspace\rust\test-ra> rustup update stable-x86_64-pc-windows-msvc unchanged - rustc 1.77.2 (25ef9e3d8 2024-04-09) info: cleaning up downloads & tmp directories** Here's the error message, how can I fix this issue in vscode, currently can't find a useful way. |
Updated rust version, restarted the workspace and extensions, seems to be fixed |
EDIT: Ignore this, for some reason proc macro was disabled in the settings,
|
Fixed after update VSCode |
rust-analyzer version: rust-analyzer version: 0.3.1791-standalone (9db5155 2024-01-01)
rustc version: rustc 1.77.0-nightly (595bc6f00 2024-01-05)
relevant settings: none
OS: Windows11
Reproduce:
cargo new test-ra cd test-ra cargo add serde -F derive
Found a related but closed issue: #14991
The text was updated successfully, but these errors were encountered: