-
Notifications
You must be signed in to change notification settings - Fork 1.7k
unresolved-proc-macro error on all proc macro usages #11150
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
No, it should be enough. Is that your macro, or a public crate? |
I'm seeing the error from the derive macros from |
It might be worth mentioning that I'm on NixOS, using the mozilla/nixpkgs-mozilla overlay for my Rust environment, and I notice that the rust-analyzer VS Code extension sometimes does some NixOS-specific setup when it starts up. |
CC @matklad -- I'm not sure, maybe we can't load the compiled proc macro because of unresolved libraries? |
I found this in the "Log (Extension Host)" output panel:
|
That's harmless. You you search for a |
|
Just want to make it clear that the problem doesn't seem specific to any particular proc-macro, it seems to be affecting all of them. The attribute macro from |
Things to check:
(this tab will be present only if there are some logs) |
I have verbose logging enabled according to the manual. In my original project, I see lots of output in the "Rust Analyzer Language Server" logs but no errors. I made a new test project with the same Rust version and configuration, added
And no other errors in "Rust Analyzer Language Server Trace" or "Rust Analyzer Client". After reloading the VS Code window, the RA extension no longer shows an error status, but I'm still getting |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
If there's any additional information or investigation I can provide to help diagnose this issue please let me know. |
I have the same issue with spacemacs + lsp RA |
I am experiencing the same issue |
Does anyone have a test case they make public? |
@lnicola I have filed another issue with reproduction repo. My case is slightly different as proc-macros from |
I'm unable to reproduce my original issue, so I think this has been fixed. |
rust-analyzer version:
3d63abf1d 2022-01-01 nightly
rustc version:
rustc 1.57.0 (f1edd0429 2021-11-29)
I've verified that proc macro support is enabled by looking at the client logs:
However, I'm still getting the
unresolved-proc-macro
error that macros are not being expanded. Is there something else that has to be enabled or installed to turn this on? The User Manual doesn't mention anything else. It does say "can also indicate project setup problems" but doesn't indicate what those might be.The text was updated successfully, but these errors were encountered: