-
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
Rust analyzer marks proc macros as errors #12538
Comments
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
This comment was marked as resolved.
Same problem with rust-analyzer 2022-06-06, rustc 1.63.0-nightly (b31f9cc22 2022-06-15). |
@dreamerlzl you need a newer version of rust-analyzer to get support for this rustc nightly. |
@saadjhk Please try the current nightly; it should show a more detailed error message. |
Install the latest version of rust-analyzer. If you are using VSCode, download the |
As far as I can tell, the pre-release in the marketplace is from yesterday and does contain the relevant commits. |
That's strange, for me it have this issue of proc macros not being expanded, while the VSIX does not. |
@eexsty Are you using VSCode or VSCodium? |
VSCode |
Thank you flodiebold! That's the latest version one can get from homebrew(I am using mac). The log entry in lsp.log is the following
|
The diagnostics log isn't relevant. |
@Veykril Hi, thanks for your guide! However, after setting the env var, I can't find any useful info from the log. Could you please give some hint? The log itself is too long to put it here. |
There should definitely be useful information in those logs now, why is it too long? This shouldn't be logging too much |
This comment was marked as resolved.
This comment was marked as resolved.
Those The logs with that env var set should contain some |
These appear to be the errors. I have an M1 Mac pro. In particular, it looks like an architecture issue (M1 vs an assumed x86_64).
|
Ah, okay we've seen this pop up for a few people already, see #12494 (comment). (Note the error isn't really new, the diagnostic is just more visible now). |
I install the latest version (6.17) and my vscode works fine, but my neovim lsp still fails. |
Heads up, #12584 fixed an issue where we potentially did misdiagnose derive helpers as being unresolved specifically. @dreamerlzl your snippet seems to be hit by this, so the next release should fix your problem. |
The problem still occurs after updated the latest release today. |
Then there is a set up problem for you, can you set the |
I am also still seeing the issue with VSCode and the latest nightly extension.
Log shows just this:
|
That's #12450, you can add |
Hmm, I guess a bunch of people will start reporting about the proc-macros that have the annoying |
Can we just unset Also maybe we can expand the troubleshooting documentation for these errors. |
Probably? |
@brianbruggeman Is it resolved? I have the same issue. |
@ryo33 Make sure you have installed the aarch64 versions of both VSCode and Rust. |
@flodiebold Thanks! |
@ryo33 Not as far as I can tell. Just to make sure I was running an apple silicon binary, I uninstalled VSCode and Rust and then reinstalled explicit apple silicon binaries. I then reinstalled Rust Analyzer and I still see the same kinds of problems. From a DX perspective, it's sorta broken (I get real errors and then false positives): I don't know what the real errors are until I actually run a compile. It's not hard to find the real errors and fix them, but I can no longer glance at my file list and find the problem files. |
@brianbruggeman If you're still getting |
@flodiebold Thank you. My toolchain was defaulting to x86. After setting to arm and reloading, everything appears as expected. Also for the curious:
|
Since the new release is out which fixes some of these issues and provides better error messages for others, let's close this. @saadjhk If you're still experiencing issues, feel free to reopen. |
@flodiebold I still encounter the same issue on Mac M1
and I even tried to uninstall
tried the following setting and it does not help
tried reinstall rust-analyzer, does not help |
@wangjia184 You're somehow running an x64 rust-analyzer. You need to install the arm64 version. |
yep, I download t he visx file and install manually, it works. strange it does not work if installing from VSCode extension |
@wangjia184 How did you manage to solve this? I am using a Mac M1 but running
and
Can I get the arch64 version somehow using |
@AnderUstarroz something like |
@AnderUstarroz both VSCode and rust-analyzer extension must be |
Thanks to both of you @flodiebold , @wangjia184 |
rust-analyzer version:
v0.3.1091
rustc version:
rustc 1.61.0 (fe5b13d68 2022-05-18)
When using
IntEnum
proc macro rust analyzer gives the error:proc macro
IntEnum
not expanded rust-analyzer unresolved-proc-macroThe text was updated successfully, but these errors were encountered: