Skip to content
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

prints clippy warnigs from cache during normal "cargo build" #7867

Closed
matthiaskrgr opened this issue Feb 5, 2020 · 2 comments
Closed

prints clippy warnigs from cache during normal "cargo build" #7867

matthiaskrgr opened this issue Feb 5, 2020 · 2 comments
Labels
A-cache-messages Area: caching of compiler messages C-bug Category: bug Command-clippy

Comments

@matthiaskrgr
Copy link
Member

Problem
While building rustc, I have observed, that when running clippy (./x.py clippy) and than running a normal build afterwards (./x.py build), some of the clippy warnings will be printed from the message cache, although clippy is not executed during x.py build.

Steps

  1. x.py clippy
  2. x.py build

Looks like the clippy messages are retrieved from the cache when they are not supposed to.

Notes

Output of cargo version:
rustc repo @ 4ff8fb9cb210a9f06e0eafc364bd12de2b67f087
cargo version cargo 1.42.0-nightly (9d32b7b01 2020-01-26)

@matthiaskrgr matthiaskrgr added the C-bug Category: bug label Feb 5, 2020
@ehuss
Copy link
Contributor

ehuss commented Feb 5, 2020

I think it is because cargo clippy also enables clippy when building build dependencies. Those build dependencies are reused with cargo build. This normally doesn't come up because build dependencies are normally not local path packages.

I think with #7533 it'll get fixed because it would modify the metadata hash so that it won't share the built dependencies with cargo build.

@ehuss ehuss added Command-clippy A-cache-messages Area: caching of compiler messages labels Feb 25, 2020
@ehuss
Copy link
Contributor

ehuss commented Apr 21, 2020

Closing in favor of #8143 and rust-lang/rust-clippy#3837.

@ehuss ehuss closed this as completed Apr 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cache-messages Area: caching of compiler messages C-bug Category: bug Command-clippy
Projects
None yet
Development

No branches or pull requests

2 participants