rust-lang / rust-lang/rust-analyzer
VSCode Test Explorer regularly requires a full rebuild
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: rust-analyzer version: 0.3.1932-standalone (47a901b9b 2024-04-21)
rustc version: 1.77.2
editor or extension: VSCode Insiders with RA 0.3.1932
It's pretty common for running tests via the Test Explorer to require a full rebuild of all dependencies. Seems like build results are getting trampled and lost when check runs. That is, the common test - fix/save file - test - fix/save file loop seems to require a rebuild of everything at every step.
Seems to happen regardless of rust-analyzer.cargo.targetDir being set to true or not. However, "rust-analyzer.check.extraArgs": ["--target-dir", "rust-analyzer-check"] seems to mitigate it, but running cargo test from the CLI requires and forces a full rebuild.
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 test-fix/save-test loop in VSCode Test Explorer using the reported rust-analyzer and rustc versions, then compare it with cargo test from the CLI. Check behavior with rust-analyzer.cargo.targetDir enabled or disabled and with check.extraArgs set to --target-dir rust-analyzer-check. Done means repeated test runs preserve incremental build results without rebuilding all dependencies.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- build-system, devtools, testing-qa
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100