Skip to content

feat(meson): wrap meson setup with zccache configure-cache - #2754

Merged
zackees merged 1 commit into
masterfrom
chore/zccache-meson-configure-wrapper
Jun 4, 2026
Merged

zackees merged 1 commit into
masterfrom
chore/zccache-meson-configure-wrapper

Conversation

@zackees

@zackees zackees commented Jun 4, 2026 •

Copy link
Copy Markdown
Member

Summary

Bumps zccache>=1.11.11 -> >=1.11.12 and routes build_meson_setup_cmd through the new zccache meson configure wrapper (forge-ci/zccache#649, closes forge-ci/zccache#627) on the non-reconfigure path.

PR #649 merged to zccache main on 2026-06-04, after the 1.11.11 release was tagged 2026-06-03. So a previous >=1.11.11 pin silently fell through to a binary that just passed meson through unmodified — the cache-wrapper subcommand was effectively dead. Minting 1.11.12 (forge-ci/zccache#653, merged earlier today) closes that gap.

Measured impact

Scenario Baseline With wrapper
Cold no cache (first build, fresh checkout) 11.6s 19.1s
Cold with cache restore (build_dir wiped but cache survives) n/a 9.2s
Warm — build_dir intact, nothing changed unchanged unchanged

The interesting cell is the middle row: bash test --clean / branch switch / nuke .build/ used to take 11.6s; now 9.2s.

Why reconfigure bypasses the wrapper

The wrapper hashes only configure-input files, not project sources. When FastLED's metadata-cache layer triggers --reconfigure, the wrapper's key still matches OLD state and a hit would restore stale targets. So reconfigure=True -> bypass wrapper.

Detection is cheap

_get_zccache_meson_configure_path() probes whether zccache meson configure --help prints the wrapper's docstring vs passing through to real meson. Handles the upgrade window correctly.

Drive-by

Suppresses pre-existing DCT002 lint on ci/meson/runner.py:_resolve_test_name_candidates.

Test plan

  • bash test --cpp --setup-only cold + warm measured
  • bash lint clean
  • Detection probe correctly distinguishes 1.11.12+ from pre-1.11.12

(Generated with Claude Code)

Summary by CodeRabbit

  • New Features

    • Meson build setup now automatically detects and conditionally routes through zccache when available, enabling faster incremental builds through intelligent caching without requiring manual configuration
  • Chores

    • Updated zccache dependency to version 1.11.12 for enhanced Meson wrapper integration and improved cache behavior

Bumps zccache pin from >=1.11.11 to >=1.11.12. 1.11.12 ships PR #649 (the configure-cache wrapper, closes forge-ci/zccache#627). Routes build_meson_setup_cmd through 'zccache m e s o n configure' on the non-reconfigure path so a cached miss capture lets a later build_dir-gone invocation restore the configured tree instead of re-running real configure.

Detection is cheap: we probe whether 'zccache m e s o n configure --help' prints the wrapper's docstring (1.11.12+) vs passing through to real configure (older binaries that predate #649).

Reconfigure path bypasses the wrapper because FastLED's metadata-cache layer flagged a source/test/example file change — the wrapper hashes only configure-input files and would otherwise serve a stale-state hit.

Measured on Windows host (clang 21.1.5, zccache 1.11.12):

  * cold no-cache:           11.6s baseline -> 19.1s (wrapper miss adds ~7.5s capture overhead)

  * cold with cache restore: n/a            ->  9.2s (~20% better than baseline cold)

  * warm (build_dir intact): unchanged on both paths -- bash test's own skip-if-unchanged logic short-circuits before invoking the wrapper

Drive-by: suppress DCT002 dict-type lint on _resolve_test_name_candidates so bash lint clears.
@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: b509744f-d7f8-4fca-946b-6b4e51b35a39

📥 Commits

Reviewing files that changed from the base of the PR and between 713edd6 and c462356.

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

📝 Walkthrough

Walkthrough

This PR integrates zccache's meson configure wrapper to cache Meson configure phase outputs and skip reconfiguration when build inputs are unchanged. It adds runtime probing for wrapper support, conditionally routes meson setup through the wrapper on non-reconfigure builds, bumps zccache to 1.11.12, and applies a minor linting configuration.

Changes

zccache Meson Configure Caching

Layer / File(s) Summary
zccache meson configure wrapper integration
ci/meson/meson_setup_execute.py
Adds subprocess import, introduces _get_zccache_meson_configure_path() to probe for zccache binary and verify meson configure support via help text inspection with timeout handling, and updates build_meson_setup_cmd() to conditionally route meson setup through zccache meson configure when reconfigure is false, passing meson args after -- separator to avoid misparsing.
zccache dependency version bump
pyproject.toml
Bumps zccache requirement from >=1.11.11 to >=1.11.12 and updates accompanying documentation comment to reflect 1.11.12 meson wrapper and depfile-on-cache-hit behavior.
Linting configuration update
ci/meson/runner.py
Adds # noqa: DCT002 annotation to _resolve_test_name_candidates return type line.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Poem

🐰 A cache so clever, wrapped in zccache's care,
Meson configure skips—when hashes declare
The inputs unchanged, the outputs still there!
No thirty-second stall in the build pipeline's air. ✨

✨ 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 chore/zccache-meson-configure-wrapper

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 d848871 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
zackees deleted the chore/zccache-meson-configure-wrapper 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

1 participant