Skip to content

Avoid Cargo's caching if any lint crates changed #190

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
xFrednet opened this issue Jul 18, 2023 · 0 comments · Fixed by #211
Closed

Avoid Cargo's caching if any lint crates changed #190

xFrednet opened this issue Jul 18, 2023 · 0 comments · Fixed by #211
Assignees
Labels
A-driver Area: Driver or something related to the internal working of a driver. C-bug Category: Something isn't working D-rustc-driver Driver: Rustc Driver
Milestone

Comments

@xFrednet
Copy link
Member

Cargo includes an automatic caching mechanism, that avoids running the rustc diver if nothing changed. This mechanism doesn't account for potential changes inside the loaded lint crates.

AFAIK, it's possible to add more files to the cache check. If we add the compiled lint crates, it might just work itself out :)

This bug was extracted from: #189

Feedback loop

I had to run cargo clean each time I change the lint and want to check how it works. My feedback loop was:

  1. Change the custom lint's code.
  2. Run cargo clean
  3. Run cargo marker

If I omit the step 2 I still see the output from the old version of my lint code.

I remember there was a different problem in cargo-clippy a long ago, which was also worked around with cargo clean to bust the incremental compilation cache (rust-lang/rust-clippy#2604 (comment)). It isn't what happens here, but I hope marker won't have the same caveat.

@xFrednet xFrednet added C-bug Category: Something isn't working D-rustc-driver Driver: Rustc Driver A-driver Area: Driver or something related to the internal working of a driver. labels Jul 18, 2023
@xFrednet xFrednet added this to the v0.2.0 milestone Jul 25, 2023
@xFrednet xFrednet self-assigned this Aug 2, 2023
@bors bors bot closed this as completed in 4105783 Aug 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-driver Area: Driver or something related to the internal working of a driver. C-bug Category: Something isn't working D-rustc-driver Driver: Rustc Driver
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant