-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Proc macros not expanding again in rust 1.78 #17231
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
Do you have any relevant cargo configs set in the vscode settings? I am a bit confused as to why the clippy-driver appears in your logs #17127 related |
fix: Don't emit --keep-going for custom build script commands Might be the cause for #17231
I was a bit confused to see that myself. I do have these overrides I found I needed to get the "Problems" tab to populate correctly with the clippy outputs at one point. Though they could be holdovers from a early workaround or something. "[rust]": {
"editor.defaultFormatter": "rust-lang.rust-analyzer",
"editor.formatOnSave": true
},
"rust-analyzer.cargo.features": "all",
"editor.formatOnSave": true,
"rust-analyzer.cargo.buildScripts.overrideCommand": [
"cargo",
"clippy",
"--all-features",
"--quiet",
"--workspace",
"--message-format=json",
"--all-targets",
"--",
"-D",
"warnings"
],
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.check.command": "clippy",
"rust-analyzer.check.extraArgs": [
"--quiet",
"--",
"-D",
"warnings"
], |
That |
Thank you! |
…eykril fix: Don't emit --keep-going for custom build script commands Might be the cause for rust-lang/rust-analyzer#17231
I'm still experiencing this issue in 1.79. Using rust-analyzer in neovim via rustaceanvim with default configuration. Have tried re-installing toolchains, deleting target/ directory, re-installing components via rustup but no luck anywhere. My specific error message is a bit different however: "proc-macro server's api version (4) is newer than rust-analyzer's (2)". |
That hints at your rust-analyzer installation being way too old |
I have this issue in both vscode and zed, with the latest version: 0.3.2037-standalone and I do not have a custom build command configured. |
had a simliar problem, suddenly there where a lot of proc macro feature not expanded: No proc-macros present for crate errors. |
Confirming this issue exists with RA |
rust-analyzer version: rust-analyzer version: 0.4.1959-standalone
rustc version: rustc 1.78.0 (9b00956e5 2024-04-29)
editor or extension: VS-Code 1.89.1
dc96b837cf6bb4af9cd736aa3af08cf8279f7685
x64
relevant settings: None
Appears to be the same issue as #16331 again, as mentioned in #17178.
Have tried using the pre-release and stable releases of rust-analyzer in vscode which has no effect.
This seems to be the best MWE mentioned in #16331 and the proc macro expansion still fails with this MWE.
Occurs on a brand new project and even after removing
target
directory.I haven't been able to find anything on this on the Forums, and the linked issues were asked to make a new one (e.g. this one).
Rust Analyzer Output
code snippet to reproduce:
Cargo.toml
The text was updated successfully, but these errors were encountered: