You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Expected:
Since we did a cargo clean of package p1 in between runs of cargo check, I'd expect that the second run should invoke rustc.
Actual:
rustc is only invoked the fist time
Notes:
Doing a full clean (without --package) behaves as expected (rustc invoked both times).
If I don't declare any features in Cargo.toml, then it behaves as expected.
This problem is especially evident if there's a warning inside some #[cfg(test)] code. Once you've compiled once, you can't get the warning back without either (a) editing the file or (b) doing a full clean. i.e. cleaning just the local package then doing a new cargo check isn't sufficient.
Tested on:
cargo 1.26.0-nightly (008c369 2018-04-13)
The text was updated successfully, but these errors were encountered:
This problem is especially evident if there's a warning inside some #[cfg(test)] code. Once you've compiled once, you can't get the warning back without either (a) editing the file or (b) doing a full clean. i.e. cleaning just the local package then doing a new cargo check isn't sufficient.
This also applies to linting - my CI runs were spuriously giving lint errors, which I realized was because clippy was not re-running.
Perhaps the cause here is the same as described in #3530:
My hypothesis (which @alexcrichton confirmed) is that each generates a distinct fingerprint, and cargo clean -p foo is looking for a version with no arguments.
At least I think that's what's happening.
Setup:
Then run:
Expected:
Since we did a cargo clean of package p1 in between runs of cargo check, I'd expect that the second run should invoke rustc.
Actual:
rustc is only invoked the fist time
Notes:
Doing a full clean (without --package) behaves as expected (rustc invoked both times).
If I don't declare any features in Cargo.toml, then it behaves as expected.
This problem is especially evident if there's a warning inside some #[cfg(test)] code. Once you've compiled once, you can't get the warning back without either (a) editing the file or (b) doing a full clean. i.e. cleaning just the local package then doing a new cargo check isn't sufficient.
Tested on:
cargo 1.26.0-nightly (008c369 2018-04-13)
The text was updated successfully, but these errors were encountered: