Repository navigation
perf(meson): adopt zccache 1.11.14 --no-walk for explicit meson.build input set - #2761
Conversation
….build inputs Pulls zccache 1.11.14 (forge-ci/zccache#660, closes forge-ci/zccache#659) into the meson-configure wrapper path. The 1.11.14 wrapper exposes a `--no-walk` flag that disables the recursive `--source-dir` traversal — that traversal was dominated by `.venv/` (~100k Python files, ~5s on cold-with-cache reconfigures) on FastLED's tree. Changes: - `pyproject.toml`: bump `zccache>=1.11.13` -> `zccache>=1.11.14` and refresh the comment block to record the 1.11.14 rationale alongside the prior 1.11.11 / 1.11.12 / 1.11.13 history. - `ci/meson/meson_setup_execute.py`: - Introduce `FASTLED_MESON_BUILD_FILES`, the canonical 7-entry tuple naming every meson.build in the FastLED tree (top level + tests/ + tests/profile/ + examples/ + ci/meson/{native,shared,wasm}/). - Replace `_get_zccache_meson_configure_path() -> Optional[Path]` with `_get_zccache_meson_configure_path() -> Optional[ZccacheCapability]` (path + supports_no_walk flag, detected by checking `--no-walk` appears in the wrapper's `--help` text). Older wrappers (1.11.12 / 1.11.13) keep the old behaviour. - In `build_meson_setup_cmd`, when the wrapper supports `--no-walk`, add `--no-walk` and one `--input-file <path>` per entry in `FASTLED_MESON_BUILD_FILES`. The existing sidecar `--input-file` (FastLED's src/test/source hash digest) still rides alongside. Cache key behaviour: `--no-walk` produces an empty `input_files` map inside the wrapper, distinct from the walked-mode map, so cache keys between the two modes never collide. This is pinned by the upstream test `no_walk_is_keyed_distinctly_from_walked` in forge-ci/zccache#660. 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 (2)
📝 WalkthroughWalkthroughThe PR updates the Meson/zccache wrapper build tooling to detect and use the ChangesMeson Wrapper Capability Detection and --no-walk Support
Possibly related PRs
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Poem
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
…ternal cache tools (#2762) 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]>
zccache 1.11.14 ships the `meson configure --no-walk` flag (forge-ci/zccache#660, closes forge-ci/zccache#659), eliminating the recursive `--source-dir` walk that dominated the configure-cache hit path on trees with large scratch dirs. FastLED measured this end-to-end (FastLED/FastLED#2761): cold-with- cache reconfigure went from ~5.6s (1.11.13, walked hit) to 0.62s (1.11.14, no-walk hit). Bringing fbuild's published floor in line keeps both projects on a consistent wrapper feature set. The intermediate 1.11.11 / 1.11.12 / 1.11.13 picks (depfile-on- cache-hit fix, the wrapper itself, `--input-file`) are also worth floor-pinning at once rather than staircasing. Tracker: forge-ci/zccache#662 Co-authored-by: Claude Opus 4.7 <[email protected]>
) (#678) Bumps every codified mention of the managed zccache version from 1.11.8 to 1.11.14, picking up six zccache CLI releases worth of fixes plus the new `meson configure --no-walk` wrapper (forge-ci/zccache#660, closes forge-ci/zccache#659). Also bumps the soldr workspace version 0.7.51 -> 0.7.52 so release-auto cuts a new soldr ship; setup-soldr's downstream issue (forge-ci/setup-soldr#379) can then pick up the new default `soldr-version`. Notable zccache pickups since 1.11.8: - 1.11.11 — depfile-on-cache-hit fix (forge-ci/zccache#643). Without this, `deps = gcc` records `#deps 0` for every cached object and incremental builds produce stale `.obj` files after a git pull that changes transitive headers. - 1.11.12 — `meson configure` wrapper itself (forge-ci/zccache#649). - 1.11.13 — `--input-file` for the wrapper (forge-ci/zccache#655). - 1.11.14 — `--no-walk` for the wrapper (forge-ci/zccache#660). On FastLED's tree this took cold-with-cache reconfigure from ~5.6s (walked hit) to 0.62s (no-walk hit) — see FastLED/FastLED#2761. Files touched (mechanical version-string replacements only): - `Cargo.toml` — workspace version 0.7.51 -> 0.7.52 - `Cargo.lock` — regenerated via `cargo update --workspace` - `contracts/zccache-runtime.v1.json` — `zccache.managed_version` - `crates/soldr-cli/src/fetch/mod.rs` — `MANAGED_ZCCACHE_VERSION` const - `crates/soldr-cli/src/zccache.rs` — 2x test-fixture path strings - `crates/soldr-cli/tests/cli_cache.rs` — 3x assert_eq strings - `crates/soldr-cli/tests/cli_install_zccache.rs` — 2x assert_eq strings Tracker: forge-ci/zccache#662 Co-authored-by: Claude Opus 4.7 <[email protected]>
Summary
Pins
zccache>=1.11.14(forge-ci/zccache#660) and routes the meson-configure wrapper through the new--no-walkflag with an explicit--input-fileper FastLED meson.build. The wrapper no longer recursively walks--source-dir, which on FastLED's tree was dominated by traversing.venv/(~100k Python files, ~5s of wall time on cold-with-cache reconfigures).Why this is safe
FASTLED_MESON_BUILD_FILEStuple matches the actual set:find . -name meson.build(excluding scratch/worktree copies) returns exactly these.--no-walkmode produces an emptyinput_filesmap distinct from walked-mode, so 1.11.13 cache entries don't collide with 1.11.14 entries. Pinned upstream byno_walk_is_keyed_distinctly_from_walkedin perf(m e s o n): minimal skip-list expansion + --no-walk for explicit input control (closes #659) forge-ci/zccache#660.--helpgrep for the string--no-walk— older wrappers (1.11.12 / 1.11.13) keep the previous walk-based behaviour automatically.Upstream timeline
meson configurewrapper itself--input-file(caller-supplied digest sidecar)--no-walk+ skip-list expansion (.venv,venv,.cargo)Test plan
bash lintpassesbash test --cppsmoke (one test in quick mode) — verifies the new wrapper invocation accepts the args and the cache restore path still hits🤖 Generated with Claude Code
Summary by CodeRabbit
Release Notes