rust-lang / rust-lang/rust-clippy
Cache invalidation with `cargo clippy --fix --allow-dirty --allow-staged`
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 13.5k
- Forks
- 2.2k
- Avg merge
- 2d 10h
- Merged PRs (30d)
- 32
Description
Summary
Every time I run cargo clippy --fix --allow-dirty --allow-staged, the command builds the packages are checked and built without respecting the cache. If I simply run cargo clippy, then the caching starts to work again.
Reproducer
Try to run cargo clippy --fix --allow-dirty --allow-staged twice in a large project without changing anything.
Version
rustc 1.63.0-nightly (fee3a459d 2022-06-05)
binary: rustc
commit-hash: fee3a459dd6aba8e34a5b99f0fbcb4218a1e2401
commit-date: 2022-06-05
host: x86_64-pc-windows-msvc
release: 1.63.0-nightly
LLVM version: 14.0.5
Additional Labels
@rustbot L-perf
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 running cargo clippy --fix --allow-dirty --allow-staged twice in a large unchanged project, then compare the second run with two plain cargo clippy runs. Investigate the Clippy and Cargo integration involved in fix mode and cache reuse. Done means repeated fix-mode runs respect the cache without requiring a separate plain Clippy invocation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, performance, tooling
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100