Skip to content

build: stabilize zccache compile cwd#191

Merged
zackees merged 1 commit intomainfrom
fix/zccache-cross-workspace-hit
Apr 22, 2026
Merged

build: stabilize zccache compile cwd#191
zackees merged 1 commit intomainfrom
fix/zccache-cross-workspace-hit

Conversation

@zackees
Copy link
Copy Markdown
Member

@zackees zackees commented Apr 22, 2026

Summary

  • run zccache-wrapped compiles from the workspace root inferred from .fbuild outputs
  • keep non-.fbuild output layouts on the previous inherited-CWD path
  • add an integration test that builds identical workspaces at two absolute paths and asserts the second compile is a zccache hit

zccache audit

Upstream zackees/zccache normalizes C/C++ source, include, and header paths relative to the request key_root; the daemon registers that key_root from the compile request CWD. Output paths are not part of the per-TU key. That means fbuild should invoke zccache from the project workspace root, not from a runner-specific process CWD, for cross-runner/workspace-stable keys.

Relevant upstream references:

Fixes #150

Testing

  • uv run soldr cargo fmt --all -- --check
  • uv run soldr cargo test -p fbuild-build --test zccache_hit_across_workspace_rename
  • uv run soldr cargo test -p fbuild-build zccache::tests::

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 22, 2026

Warning

Rate limit exceeded

@zackees has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 56 minutes and 10 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 56 minutes and 10 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 196684fb-b31f-420a-8e3e-d1ea80bd8477

📥 Commits

Reviewing files that changed from the base of the PR and between 888ec98 and 5fe8866.

📒 Files selected for processing (3)
  • crates/fbuild-build/src/compiler.rs
  • crates/fbuild-build/src/zccache.rs
  • crates/fbuild-build/tests/zccache_hit_across_workspace_rename.rs
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/zccache-cross-workspace-hit

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@zackees zackees merged commit ada3b60 into main Apr 22, 2026
75 of 77 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.

build: audit zccache per-TU cache keys for cross-runner stability

1 participant