rust-lang / rust-lang/rust-analyzer
Spurious rebuilds when VSCode opened through symlink
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
If VSCode is opened via something like:
$ code some_symlink_to_project
saving any Rust source file in the project (presumably it's the cargo check functionality being triggered) will result in spurious rebuilds when you run cargo build from the command line, despite the dependencies being unchanged.
I have a full, turn-key reproducer here: https://github.com/cstrahan-blueshift/vscode_rust_rebuild_repro
rust-analyzer version: 0.3.1266-standalone
rustc version: rustc 1.65.0 (897e37553 2022-11-02)
relevant settings: N/A
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
Start with the linked turn-key reproducer and reproduce the sequence of opening the project through a symlink, saving a Rust source file, and running cargo build. Trace the rust-analyzer cargo check interaction involved in the rebuild, and consider the issue done when unchanged dependencies no longer cause spurious rebuilds in that reproducer.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust, vscode
- Domain
- build-system, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100