Repository navigation
docs(build-system): document explicit-input-declaration policy for external cache tools - #2762
Conversation
…ternal cache tools Codifies the design decision behind FastLED's recent zccache work (forge-ci/zccache#654 / #659 → FastLED #2761) so future external-tool adoptions follow the same pattern. The rule: when an external tool builds its own cache key, declare inputs explicitly rather than let the tool auto-discover them. Why: zccache's `meson configure` walk traversed `.venv/` (~100k Python files, ~5s) on every cold-with-cache reconfigure. Switching to `--no-walk` + an explicit 7-entry `--input-file` list of meson.build paths, plus a sidecar carrying FastLED's `SourceHashes`, took cold- with-cache reconfigure from ~5.6s (walked hit) to 0.62s (no-walk hit) on master post-#2761. Section adds: - The rule statement with reasoning. - The two concrete instances in `ci/meson/meson_setup_execute.py` (`FASTLED_MESON_BUILD_FILES`, `_write_zccache_input_sidecar`). - A 4-step checklist for applying the policy when adopting future cache-aware tools: prefer no-walk modes, wire source-change detection via a caller-written sidecar, confirm cache-key namespacing distinguishes modes, probe by `--help` grep not version string. - A counter-example (bounded include-scan resolution) so the rule isn't over-applied to non-walking tools. Lives in the existing `## zccache` section of `agents/docs/build-system.md` rather than `external-tools.md` (which is scoped to MCP servers / Claude plugins, a different concept). Co-Authored-By: Claude Opus 4.7 <[email protected]>
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe pull request adds a new "Decision: Explicit Input Declaration Over Tool Auto-Discovery" section to the build system documentation. It specifies rules for handling zccache integration with Meson, detailing explicit input enumeration using ChangesBuild System Documentation: Cache Input Strategy
Estimated code review effort🎯 1 (Trivial) | ⏱️ ~5 minutes Poem
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
Summary
Codifies the design principle behind the recent zccache + meson-configure work (FastLED #2761, forge-ci/zccache#654 / #659) so future external-tool adoptions follow the same shape.
Rule: when an external tool builds its own cache key, declare inputs ourselves rather than let the tool auto-discover them.
Why this is worth a documented policy and not just inline comments: the principle generalizes. Any future content-addressable wrapper we adopt (zccache
exec, soldr, an alternate compile-caching layer, a generated-source pipeline) is going to ship with some kind of auto-discovery layer and some kind of "I'll declare inputs myself" escape hatch. The historical default (let the tool walk) is convenient until the walk hits.venv/. The 5s → 0.6s win on FastLED's reconfigure path is the load-bearing example.What lives in this section
FASTLED_MESON_BUILD_FILES(the 7-entry meson.build tuple, paired with--no-walk) and_write_zccache_input_sidecar(FastLED'sSourceHashesdigest fed in as one more--input-file).Lives in the existing
## zccachesection ofagents/docs/build-system.mdrather thanexternal-tools.md(the latter is scoped to MCP servers and Claude plugins, a different concept).Test plan
🤖 Generated with Claude Code
Summary by CodeRabbit