rust-lang / rust-lang/rust-analyzer
Compile-time errors are only visible in the first project of a VSCode workspace
Open
Nobody has claimed this yet.
C-bug
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Compile-time errors are only visible in the first project of a VSCode workspace.
Steps for reproducing the issue:
- Create Rust projects and a VSCode workspace for them:
mkdir test cd test cargo new --lib lib1 echo compile-time error here >> lib1/src/lib.rs cargo new --lib lib2 echo compile-time error here >> lib2/src/lib.rs cargo new --lib lib3 echo compile-time error here >> lib3/src/lib.rs cat > test.code-workspace <<END { "folders": [ { "path": "lib1" }, { "path": "lib2" }, { "path": "lib3" } ], "settings": { "rust-analyzer.linkedProjects": [ "./Cargo.toml" ] } } END - Open
test.code-workspacein VSCode (with rust-analyzer extension installed). - Open
lib1/src/lib.rs,lib2/src/lib.rsandlib3/src/lib.rsby double-clicking them in VSCode explorer. - Compile-time error is shown only for
lib1/src/lib.rs, not forlib2/src/lib.rsorlib3/src/lib.rs.
Environment
- macOS Ventura 13.6 @ Apple Silicon M2
- VSCodium 1.83.0, release 23277
- rust-analyzer extension 0.3.1689
- rust-analyzer 1.73.0 (cc66ad46 2023-10-03)
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 issue with the provided test.code-workspace and the three lib.rs files, checking diagnostics in each project. Start by examining how rust-analyzer handles the linkedProjects workspace setting; done means compile-time errors appear for lib1, lib2, and lib3.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- devtools
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 38/100