Skip to content

perf(meson): adopt zccache 1.11.14 --no-walk for explicit meson.build input set - #2761

Merged
zackees merged 1 commit into
masterfrom
feat/zccache-1.11.14-no-walk
Jun 4, 2026
Merged

zackees merged 1 commit into
masterfrom
feat/zccache-1.11.14-no-walk

Conversation

@zackees

@zackees zackees commented Jun 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Pins zccache>=1.11.14 (forge-ci/zccache#660) and routes the meson-configure wrapper through the new --no-walk flag with an explicit --input-file per 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

  • The 7-entry FASTLED_MESON_BUILD_FILES tuple matches the actual set: find . -name meson.build (excluding scratch/worktree copies) returns exactly these.
  • Cache-key isolation: --no-walk mode produces an empty input_files map distinct from walked-mode, so 1.11.13 cache entries don't collide with 1.11.14 entries. Pinned upstream by no_walk_is_keyed_distinctly_from_walked in perf(m e s o n): minimal skip-list expansion + --no-walk for explicit input control (closes #659) forge-ci/zccache#660.
  • Capability detection is a one-shot --help grep for the string --no-walk — older wrappers (1.11.12 / 1.11.13) keep the previous walk-based behaviour automatically.

Upstream timeline

zccache Wrapper feature Issue
1.11.12 meson configure wrapper itself forge-ci/zccache#627 → #649
1.11.13 --input-file (caller-supplied digest sidecar) forge-ci/zccache#654 → #655
1.11.14 --no-walk + skip-list expansion (.venv, venv, .cargo) forge-ci/zccache#659 → #660

Test plan

  • bash lint passes
  • bash test --cpp smoke (one test in quick mode) — verifies the new wrapper invocation accepts the args and the cache restore path still hits
  • CI matrix passes

🤖 Generated with Claude Code

Summary by CodeRabbit

Release Notes

  • Chores
    • Updated zccache dependency to version 1.11.14 for improved build configuration handling.
    • Enhanced build system wrapper detection to support optimized configuration mode, reducing unnecessary recursive file scanning during the build setup process.

….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]>
@coderabbitai

coderabbitai Bot commented Jun 4, 2026 •

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 2433660a-ad07-4fc5-952c-d2571ae3150c

📥 Commits

Reviewing files that changed from the base of the PR and between 54e4698 and 9edc5fe.

📒 Files selected for processing (2)
  • ci/meson/meson_setup_execute.py
  • pyproject.toml

📝 Walkthrough

Walkthrough

The PR updates the Meson/zccache wrapper build tooling to detect and use the --no-walk capability introduced in zccache 1.11.14. When supported, the wrapper command construction uses explicit --input-file arguments for each known meson.build file path instead of relying on recursive directory traversal. Dependency and documentation are updated accordingly.

Changes

Meson Wrapper Capability Detection and --no-walk Support

Layer / File(s) Summary
Capability type system and meson.build file discovery
ci/meson/meson_setup_execute.py
NamedTuple import is added; FASTLED_MESON_BUILD_FILES tuple and ZccacheCapability type are introduced; _get_zccache_meson_configure_path is updated to detect --no-walk support from meson configure help output and return a capability object.
Build command construction using wrapper capability
ci/meson/meson_setup_execute.py
The command builder receives the ZccacheCapability object; when supports_no_walk is true, --no-walk and explicit --input-file arguments for each meson.build path are appended to the wrapper invocation. Sidecar hash handling and reconfigure guards remain unchanged. Docstring is updated.
Dependency version and documentation update
pyproject.toml
zccache minimum version is bumped to >=1.11.14 and inline documentation is updated to describe the --no-walk and explicit meson.build discovery behavior.

Possibly related PRs

  • FastLED/FastLED#2549: Both update zccache dependency version in pyproject.toml as part of wrapper behavior/compatibility alignment.
  • FastLED/FastLED#2616: Both update the zccache version constraint in pyproject.toml for wrapper behavior changes.
  • FastLED/FastLED#2670: Both update zccache minimum version in pyproject.toml for dependency versioning alignment.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 A wrapper awakens with logic refined,
Now --no-walk walks files we defined,
Each meson.build path in a tuple we list,
Explicit, efficient—no wandering mist! ✨

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/zccache-1.11.14-no-walk

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 3f14434 into master Jun 4, 2026
7 checks passed
@fastled-project-sync fastled-project-sync Bot moved this from Triage to Done in FastLED Tracker Jun 4, 2026
zackees added a commit that referenced this pull request Jun 5, 2026
…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]>
zackees added a commit to FastLED/fbuild that referenced this pull request Jun 5, 2026
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]>
zackees added a commit to forge-ci/soldr that referenced this pull request Jun 5, 2026
) (#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]>
@zackees
zackees deleted the feat/zccache-1.11.14-no-walk branch August 21, 2026 19:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

1 participant