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

RUSTC_WRAPPER not used in cargo clippy? #7556

Closed
mathstuf opened this issue Nov 1, 2019 · 3 comments
Closed

RUSTC_WRAPPER not used in cargo clippy? #7556

mathstuf opened this issue Nov 1, 2019 · 3 comments
Labels
C-bug Category: bug

Comments

@mathstuf
Copy link
Contributor

mathstuf commented Nov 1, 2019

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 (23ef9a4 2019-08-20)

@mathstuf mathstuf added the C-bug Category: bug label Nov 1, 2019
@ehuss
Copy link
Contributor

ehuss commented Nov 1, 2019

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 ehuss closed this as completed Nov 1, 2019
@scooter-dangle
Copy link

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?

@ehuss
Copy link
Contributor

ehuss commented Dec 5, 2019

Clippy will also need to be updated to use it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

3 participants