rust-lang / rust-lang/rust-analyzer
Option for specifying files for buildScripts.rebuildOnSave
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.9k
- Forks
- 2.2k
- Avg merge
- 1d 12h
- Merged PRs (30d)
- 72
Description
Currently, rust-analyzer re-runs build scripts when the build script itself is updated.
However, many build scripts depend on other files and use cargo:rerun-if-changed to specify those files to Cargo.
For example, in my project I generate code based on YAML files. However, rust-analyzer won't rerun the build scripts until I save the build script itself or some other source file.
Could rust-analyzer get an option to also specify these files (probably only in local config?), or could rust-analyzer read the rerun-if-changed commands which were passed to Cargo and use those?
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 by tracing rust-analyzer's buildScripts.rebuildOnSave handling and how Cargo exposes rerun-if-changed paths. Compare adding local configuration with consuming Cargo's recorded paths; done when changes to declared dependent files trigger the build script rebuild as intended.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100