Cargo: RUSTC_WRAPPER not used in cargo clippy?

Created on 1 Nov 2019  路  3Comments  路  Source: rust-lang/cargo

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

  1. Install sccache
  2. RUSTC_WRAPPER=sccache cargo clippy
  3. sccache --show-stats

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)

C-bug

All 3 comments

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.

Was this page helpful?
0 / 5 - 0 ratings