Skip to content

fix(build): disable sccache preprocessor cache mode - #2033

Merged
mbrobbel merged 1 commit into
sirius-db:mainfrom
joosthooz:build/sccache-direct-false
Oct 6, 2026
Merged

mbrobbel merged 1 commit into
sirius-db:mainfrom
joosthooz:build/sccache-direct-false

Conversation

@joosthooz

@joosthooz joosthooz commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Fixes #2031

With SCCACHE_BASEDIRS (#631) the cache key no longer depends on the checkout path, but sccache 0.18.0's preprocessor cache mode (the default for a disk cache) stores absolute include paths in its manifests and validates against the first tree's files. Two symptoms follow when worktrees share a cache:

The upstream fix is mozilla/sccache#2868 (not yet released). So if that is included in an sccache version that we use in our env, this line can be removed again (noted in the comment).

This should fix potential build issues we actually encountered and resulted in breaking gb300 nightlies.

Checklist

  • Read CONTRIBUTING.md and ensure PR meets "reviewability" checklist
  • Cover changes with new or existing tests
  • Document configuration changes in code and summarize in the description above
  • Update human and agent documentation (README.md, docs/, skills, CLAUDE.md)

References

…EDIRS is set

With SCCACHE_BASEDIRS (sirius-db#631) the cache key no longer depends on the checkout
path, but sccache 0.18.0's preprocessor cache mode (the default for a disk
cache) stores absolute include paths in its manifests and validates against
the first tree's files. Two symptoms follow when worktrees share a cache:

- a hit can return another checkout's object file when the .cpp is identical
  but a header differs (silent wrong code; mozilla/sccache#2863), and
- the restored depfile lists the other checkout's headers, so ninja tracks
  the wrong files and header edits no longer rebuild dependents.

In a minimal repro, stock 0.18.0 returned sizeof 8 instead of 88 for the tree
with the larger struct and restored the other tree's depfile; with
SCCACHE_DIRECT=false both were correct and an identical third tree still hit
the cache. The upstream fix is mozilla/sccache#2868 (not yet released).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@joosthooz
joosthooz requested a review from a team as a code owner October 6, 2026 15:30
@joosthooz
joosthooz requested review from mike-wendt and removed request for a team October 6, 2026 15:30
@mbrobbel
mbrobbel added this pull request to the merge queue Oct 6, 2026

@mike-wendt mike-wendt left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed, thanks @joosthooz

Merged via the queue into sirius-db:main with commit 22078d0 Oct 6, 2026
19 checks passed
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.

bug: SCCACHE_BASEDIR can cause dependency problems

3 participants