rust-analyzer icon indicating copy to clipboard operation
rust-analyzer copied to clipboard

Cargo check is not run for all crates in workspace

Open MrCasCode opened this issue 3 years ago • 1 comments

rust-analyzer version: ba3305480 2022-02-07 stable

rustc version: rustc 1.60.0-nightly (a00e130da 2022-01-29)

I have a workspace with 2 crates:

crates/
├── log_analyzer/
│   ├── src/
│   ├── Cargo.toml
├── terminal_ui/
│   ├── src/
│   ├── Cargo.toml
├── Cargo.toml

Workspace Cargo.toml


[workspace]
members=["crates/*"]

rust-analyzer settings (I've tried enabling disabling certain of these features)

"rust-analyzer.cargo.runBuildScripts": true,
"rust-analyzer.lruCapacity": 1024,
"rust-analyzer.procMacro.enable": true,
"rust-analyzer.cargo.allFeatures": true,
"rust-analyzer.experimental.procAttrMacros": false,
"rust-analyzer.inlayHints.enable": true,

Only the log_analyzer crate shows cargo check analysis, when saving a file I can see the files under this crate blinking as being processed by rust-analyzer but not on the terminal_ui crate:

image

Whereas the same code setup out of a cargo workspace folder is properly analyzed (actually copied out of the workspace, opening the problematic crate folder on vscode doesnt work neither):

image

Any ideas of what can be going on?

MrCasCode avatar Feb 10 '22 13:02 MrCasCode

Can confirm. inlay hints exist, but diagnostics are gone. auto completion, auto import seem to work. ~~Seems like VSIX's bug.~~

Turns out cargo check is broken when some parts are compiled with another version of Rust. cargo clean fixed it.

iacore avatar Jul 31 '22 23:07 iacore