Closed extrawurst closed 5 months ago
ok no it also does the same now in vscode when using the release of today, maybe due to https://github.com/rust-lang/rust-analyzer/issues/17378. downgrading RA in vscode from v0.3.1992
to v0.3.1983
is a workaround. how can I pick the RA version in ZED?
Do you have a mod api
declaration in the parent module?
this applies to every file in my project and yes of course this module is actually in the hierarchy, this module did not change and as stated above it must be related to the RA version v0.3.1992
(which I assume zed updated to today for me) because it also fails in vscode with that and going back to RA v0.3.1983
brings back everything as expected in vscode.
so its clearly a problem in RA.
still I would love to know how to forcefully set/downgrade the RA version in zed as in this state zed is basically bricked for me
This was caused by https://github.com/rust-lang/rust-analyzer/pull/17350. But it doesn't make RA emit a new warning, it just makes the span bigger, because the warning wasn't noticeable enough. Please make sure that there aren't any missing module declarations on the path to api
, and file a RA issue if you're sure it's a bug.
You can delete most files from your projects and most code from the remaining files. It doesn't need to build or run.
Please make sure that there aren't any missing module declarations on the path to api, and file a RA issue if you're sure it's a bug.
can you specify what you mean? the files are work and are actually in the build when I use cargo.
i suspected maybe the fact that I have this workspace structure where I have a main.rs and a lib.rs to maybe now breaking RA, so I tested against bevy_game_template
this version which was used as a template for my project here.
and indeed it breaks RA and triggers this: https://github.com/rust-lang/rust-analyzer/issues/17376
I find the same error in the lang server logs in zed. strangely though the same does not happen in my project causing the issues here
I'm also running into this as of today. It goes away once rust-analyzer has fully loaded the repository. Seems like an upstream change.
still I would love to know how to forcefully set/downgrade the RA version in zed as in this state zed is basically bricked for me
You can configure the binary manually in your Zed settings.json
:
{
"lsp": {
"rust-analyzer": {
"binary": {
"path": "/Users/thorstenball/tmp/rust-analyzer-aarch64-apple-darwin" // <-- must be absolute path
}
}
}
}
@extrawurst see also https://github.com/rust-lang/rust-analyzer/issues/17386.
yeah and that one is caused by: https://github.com/rust-lang/rust-analyzer/issues/17378
I can report that zed with the new rust-analyzer release 0.3.1995
works again for me. see https://github.com/rust-lang/rust-analyzer/issues/17378#issuecomment-2160044690.
will close this one
Check for existing issues
Describe the bug / provide steps to reproduce it
Closed source, so i cannot share a simple reproduction. I just know the same project structure works fine in vscode with rust-analyzer. zed since today suddenly stoped working.
Environment
Zed: v0.139.3 (Zed Preview) OS: macOS 14.5.0 Memory: 64 GiB Architecture: aarch64
If applicable, add mockups / screenshots to help explain present your vision of the feature
I expect to see normal syntax highlighting and code completion
If applicable, attach your
~/Library/Logs/Zed/Zed.log
file to this issue.