Skip to content

Conversation

@avikivity
Copy link
Contributor

On Linux, ccache is typically installed in $PATH as /usr/lib64/ccache/g++ or similar. If we keep it there, all compilations will be cached by both ccache and sccache.

While the user could easily disable ccache with CCACHE_DISABLE, it's reasonable to assume many will forget and will have their disk space doubly consumed by both caches. Better to recognize this and disable ccache under sccache.

This patch does this by removing the ccache binary paths from $PATH.

Fixes #2519

@codecov-commenter
Copy link

codecov-commenter commented Dec 20, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 71.12%. Comparing base (782b151) to head (608d5c6).

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2524      +/-   ##
==========================================
+ Coverage   71.06%   71.12%   +0.05%     
==========================================
  Files          64       64              
  Lines       35394    35465      +71     
==========================================
+ Hits        25153    25224      +71     
  Misses      10241    10241              

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

On Linux, ccache is typically installed in $PATH as /usr/lib64/ccache/g++
or similar. If we keep it there, all compilations will be cached by both
ccache and sccache.

While the user could easily disable ccache with CCACHE_DISABLE, it's
reasonable to assume many will forget and will have their disk space
doubly consumed by both caches. Better to recognize this and disable
ccache under sccache.

This patch does this by removing the ccache binary paths from $PATH.

Fixes mozilla#2519
@avikivity
Copy link
Contributor Author

update: fix rustfmt error

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.

Unwanted double-caching when ccache is also installed

2 participants