Problem
I'm using sccache
to help improve CI times for a crate. However, my cargo clippy
jobs report 0 attempts against the cache (via sccache --show-stats
) even though there are compilation rules being performed. Same pattern works for my actual builds.
Steps
Should show non-zero stats.
Possible Solution(s)
Call rustc through clippy the same way compiler commands are called.
Notes
Output of cargo version
:
cargo 1.38.0 (23ef9a4ef 2019-08-20)
Clippy itself uses RUSTC_WRAPPER
. We are looking to change that in #7533, which should fix sccache caching for dependencies. Caching for the root crates probably still won't work, though I'm not sure what the behavior will be. Closing in favor of https://github.com/rust-lang/rust-clippy/issues/3840 and #7533, which should address this.
Clippy itself uses
RUSTC_WRAPPER
. We are looking to change that in #7533, which should fix sccache caching for dependencies. Caching for the root crates probably still won't work, though I'm not sure what the behavior will be. Closing in favor of rust-lang/rust-clippy#3840 and #7533, which should address this.
@ehuss, I haven't looked in depth through what #7533 is doing, but when I build it and use it to run clippy, nothing is being cached. Are there further steps than addressing the RUSTC_WRAPPER
issue for clippy to be able to use sccache?
Clippy will also need to be updated to use it.