-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
server no longer supported for toolchains up to v1.76
#18705
Comments
Indeed, the version we dropped support for was implemented in #14572 which is april last year. So that change earliest appeared in stable rust ~3 months later than that (and likely longer as I think that mightve been the time where we didnt keep up with syncs (though 1.76 being the latest to hit this is surpising still, that does sound a bit later than I'd expect). Either way I seem to have misread the date when I looked at the blame. I am not sure if we want to reverse that, as we don't really support more than a couple of last stable releases (and for 1.74 I assume more than just this is already broken in some capacity by current rust-analyzer). Generally I'd recommend to pin your rust-analyzer to some version when you are working with older toolchains like this (or use the toolchain provided |
Thank you for the quick response,
We'll do that for now. We plan on upgrading the compiler version but not in a near future.
I didn't know you could do that, will look into it, thanks ! |
VSCode rust-analyzer 0.4.2222 2024-12-18T11:02:42.016391937+08:00 ERROR Failed to run proc-macro server from path /home/wii/.rustup/toolchains/1.75-x86_64-unknown-linux-gnu/libexec/rust-analyzer-proc-macro-srv, error: Custom { kind: Other, error: "The version of the proc-macro server (2) in your Rust toolchain is too old and no longer supported by your rust-analyzer which requiresversion 4 or higher.\nThis will prevent proc-macro expansion from working. Please consider updating your toolchain or downgrading your rust-analyzer to ensure compatibility with your current toolchain." }
[Error - 11:02:43] Server process exited with code 0. Can you provide the ability to install specific versions of plugins |
I am running toolchain version 1.76.0 and facing the same issue, what is the recommended steps to deal with this thanks |
For VSCode you can install specific versions of the extension, or if you wanna use the rustup rust-analyzer you can point it to that serveer via the |
It is an annoying issue introduced with the new version. I'm using toolchain version 1.75.0 and also unexpectedly ran into this error, I would consider it a bug. |
rust-analyzer could (and is in various contexts alleged to! But I do not see evidence of that being true in practice) resolve via the In VS Code, a per-project override to use the version managed by {
"rust-analyzer.server.path": "/Users/chris/.cargo/bin/rust-analyzer"
} In Zed, the same: // Folder-specific settings
//
// For a full list of overridable settings, and general information on folder-specific settings,
// see the documentation: https://zed.dev/docs/configuring-zed#settings-files
{
"lsp": {
"rust-analyzer": {
"binary": {
"path": "/Users/chris/.cargo/bin/rust-analyzer"
}
}
}
} If you want to make |
It already does honor toolchain overrides as long as they target the same folder as your cargo workspace resides in (that is where the corresponding Cargo.toml exists), but to use the toolchain rust-analyzer, the override needs to specify the rust-analyzer component. |
These are typically automatically generated, no? Maybe rustup should default to including rust-analyzer in the component list if it doesn't already? |
That seems like a very big ask, not everyone uses rust-analyzer. |
This is helpful; is it documented in the For reference, for folks reading along, see this section of the rustup manual, which includes an example of [toolchain]
channel = "nightly-2020-07-10"
components = [ "rustfmt", "rustc-dev" ]
targets = [ "wasm32-unknown-unknown", "thumbv2-none-eabi" ]
profile = "minimal" As documented here, the [toolchain]
channel = "1.75.0" # or some other pre-1.76 version
components = ["rust-analyzer"] That being said, |
Hello,
We use the toolchain 1.74 for rust projects and after the latest update to version (0.3.2220) we got an error when starting the server:
After a bit of research, I found this PR #18670 that contains the new error message and it says:
The error seems to come from this change, but the drop of support seems to go well beyond the 1.66 version.
After some more testing, I was able to get the error up to v1.76.
This version was out in February of this year.
The argument in the PR was:
But the version 1.74 is a few months old and now unsupported with this PR.
Do you plan on keeping the server this way ? It could also be cool to have the
minimum supported rust toolchain
for a given version of the server.Steps to reproduce
rust-analyzer
v0.3.2220
to your IDE (here I use VSCodium but any will do)cargo new test
cd test
rustup override set 1.76
The text was updated successfully, but these errors were encountered: