rust-lang / rust-lang/rust-analyzer
Cargo check is not run for all crates in workspace
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
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:

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):

Any ideas of what can be going on?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the report with the workspace Cargo.toml and the crates/* members in VS Code, comparing analysis for log_analyzer and terminal_ui. Start by checking why only one crate receives cargo check analysis; done means both workspace crates are analyzed consistently, with a regression test if the relevant test location can be identified.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100