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

Add support for caching target json specs for Rust compilation. #2269

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ColinFinck
Copy link

This has been implemented in a backward-compatible way:

  • --target arguments specifying target names are still passed as arguments just like before.
  • --target arguments specifying a json file path have previously not been cached at all. The json file is now hashed like other external file dependencies.

Fixes #2174

@sylvestre
Copy link
Collaborator

Could you please add a test here to make sure we don't regress?
https://github.com/mozilla/sccache/blob/main/.github/workflows/integration-tests.yml

@codecov-commenter
Copy link

codecov-commenter commented Oct 7, 2024

Codecov Report

Attention: Patch coverage is 68.42105% with 6 lines in your changes missing coverage. Please review.

Project coverage is 40.65%. Comparing base (0cc0c62) to head (2d81c1e).
Report is 81 commits behind head on main.

Files with missing lines Patch % Lines
src/compiler/rust.rs 68.42% 5 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2269      +/-   ##
==========================================
+ Coverage   30.91%   40.65%   +9.73%     
==========================================
  Files          53       54       +1     
  Lines       20112    20767     +655     
  Branches     9755     9654     -101     
==========================================
+ Hits         6217     8442    +2225     
- Misses       7922     8154     +232     
+ Partials     5973     4171    -1802     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@ColinFinck
Copy link
Author

Hey @sylvestre, thanks a lot for your quick response! I've checked the integration-tests.yml file you gave me, but it only contains a single test for each platform/compiler, not for individual flags of the Rust compiler. I'm willing to add a test for the newly supported flag, but I need a good example on how sccache currently does per-flag tests.

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

Successfully merging this pull request may close these issues.

Caching custom Rust targets
3 participants