Skip to content

Comments

Disable preprocessor cache when doing distributed compilation#2173

Merged
sylvestre merged 2 commits intomozilla:mainfrom
glandium:dist-pp
May 21, 2024
Merged

Disable preprocessor cache when doing distributed compilation#2173
sylvestre merged 2 commits intomozilla:mainfrom
glandium:dist-pp

Conversation

@glandium
Copy link
Collaborator

At the moment, it doesn't work.

@glandium glandium requested a review from sylvestre May 17, 2024 07:58
@codecov-commenter
Copy link

codecov-commenter commented May 17, 2024

Codecov Report

Attention: Patch coverage is 16.66667% with 10 lines in your changes are missing coverage. Please review.

Project coverage is 29.91%. Comparing base (0cc0c62) to head (6b2c27d).
Report is 34 commits behind head on main.

Files Patch % Lines
src/compiler/c.rs 16.66% 1 Missing and 9 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2173      +/-   ##
==========================================
- Coverage   30.91%   29.91%   -1.00%     
==========================================
  Files          53       53              
  Lines       20112    20185      +73     
  Branches     9755     9684      -71     
==========================================
- Hits         6217     6038     -179     
- Misses       7922     8228     +306     
+ Partials     5973     5919      -54     

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

@sylvestre sylvestre merged commit 5f2b5c8 into mozilla:main May 21, 2024
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 7, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 8, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 8, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 8, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 8, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 8, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 8, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 9, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 11, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 11, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Jul 11, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Aug 4, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Aug 4, 2025
ahartmetz added a commit to ahartmetz/sccache that referenced this pull request Aug 4, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
sylvestre pushed a commit that referenced this pull request Aug 4, 2025
sylvestre pushed a commit that referenced this pull request Aug 4, 2025
sylvestre pushed a commit that referenced this pull request Aug 4, 2025
Under the following conditions:
- Build with preprocessor cache mode enabled
- Distributed build
- Preprocessor cache hit
- Main cache miss
the compile that was run as "fallback" after the cache miss did
not have preprocessed sources passed to it since skipping the
preprocessing step is the whole point of preprocessor cache mode.
But local preprocessing is what enables distributed compilation.
To fix this, when the problem occurs, recursively re-invoke
get_cached_or_compile() with ForceRecache so that the
preprocessor cache hit is (mostly) ignored, which makes
get_cached_or_compile() invoke the local preprocessing codepath,
which yields code suitable for distributed compilation.
tottoto added a commit to tottoto/sccache that referenced this pull request Feb 6, 2026
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.

3 participants