Account for clippy-driver having extra prefix rustc#2438
Merged
sylvestre merged 1 commit intomozilla:mainfrom Sep 22, 2025
Merged
Account for clippy-driver having extra prefix rustc#2438sylvestre merged 1 commit intomozilla:mainfrom
rustc#2438sylvestre merged 1 commit intomozilla:mainfrom
Conversation
Collaborator
|
Could you please add a test to make sure we don't regress? thanks |
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2438 +/- ##
==========================================
+ Coverage 71.47% 71.50% +0.03%
==========================================
Files 65 65
Lines 36265 36302 +37
==========================================
+ Hits 25919 25959 +40
+ Misses 10346 10343 -3 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Contributor
Author
|
I added a basic test for this. |
fcd32fe to
671928a
Compare
I noticed that we were not caching clippy calls: ``` parse_arguments: CannotCache(multiple input files): ["rustc", "--crate-name", "bots_utils", "--edition=2024", ... ``` Turns out `rustc` is interpreted as one of the source inputs, so the actual input trips sccache into thinking that there are multiple inputs, which is not supported, so the caching does not happen. In a workspace with 161 members and 1761 total crates in the dependency graph we see the following results with sccache running hot (no misses): * Before: ``` Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 24s ``` ``` Compile requests 1802 Compile requests executed 1182 Cache hits 1177 Cache hits (C/C++) 107 Cache hits (Rust) 1070 Cache misses 0 Cache hits rate 100.00 % Cache hits rate (C/C++) 100.00 % Cache hits rate (Rust) 100.00 % Cache timeouts 0 Cache read errors 0 Forced recaches 0 Cache write errors 0 Cache errors 0 Compilations 0 Compilation failures 5 Non-cacheable compilations 0 Non-cacheable calls 610 Non-compilation calls 10 Unsupported compiler calls 0 Average cache write 0.000 s Average compiler 0.000 s Average cache read hit 0.000 s Failed distributed compilations 0 Non-cacheable reasons: multiple input files 339 crate-type 222 unknown source language 23 - 12 missing input 8 -o 3 missing output_dir 3 Cache location Local disk: "/home/ivan/.cache/sccache" Use direct/preprocessor mode? yes Version (client) 0.9.1 Cache size 444 MiB Max cache size 10 GiB ``` * After: ``` Finished `dev` profile [unoptimized + debuginfo] target(s) in 1m 11s ``` ``` Compile requests 1799 Compile requests executed 1332 Cache hits 1327 Cache hits (C/C++) 107 Cache hits (Rust) 1220 Cache misses 0 Cache hits rate 100.00 % Cache hits rate (C/C++) 100.00 % Cache hits rate (Rust) 100.00 % Cache timeouts 0 Cache read errors 0 Forced recaches 0 Cache write errors 0 Cache errors 0 Compilations 0 Compilation failures 5 Non-cacheable compilations 0 Non-cacheable calls 457 Non-compilation calls 10 Unsupported compiler calls 0 Average cache write 0.000 s Average compiler 0.000 s Average cache read hit 0.000 s Failed distributed compilations 0 Non-cacheable reasons: crate-type 407 unknown source language 23 - 11 missing input 9 argument parse 4 -o 3 Cache location Local disk: "/home/ivan/.cache/sccache" Use direct/preprocessor mode? yes Version (client) 0.10.0 Cache size 444 MiB Max cache size 10 GiB ```
671928a to
d506186
Compare
Collaborator
|
thanks! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
I noticed that we were not caching clippy calls:
Turns out
rustcis interpreted as one of the source inputs, so the actual input trips sccache into thinking that there are multiple inputs, which is not supported, so the caching does not happen.In a workspace with 161 members and 1761 total crates in the dependency graph we see the following results with sccache running hot (no misses):