Skip to content

Build: enable zccache strict path validation #2378

Closed

Description

@zackees

Context

zccache is gaining a --strict-paths mode that rejects compiler path flags which are not stable across platforms, especially relative include paths and Windows backslashes. FastLED already has Meson cleanup work in this area, but we need a tracking issue for enabling the stricter mode end-to-end once the zccache artifact is released.

Work needed

  • Release a zccache artifact containing --strict-paths / ZCCACHE_STRICT_PATHS support.
  • Bump FastLED's pinned zccache artifact/version to that release.
  • Enable strict path validation in FastLED CI, preferably with ZCCACHE_STRICT_PATHS=absolute.
  • Fix all generated compile command offenders so include, framework, forced include, PCH, and macro include paths are absolute forward-slash paths without . or .. components.
  • Add or keep a validation step that checks generated compile commands before CI compiles.

Acceptance criteria

  • FastLED CI uses the zccache release that contains strict path validation.
  • FastLED Meson builds pass with strict path validation enabled.
  • Generated compile_commands.json has no offending path flags.

Activity

  1. zackees commented on Apr 22, 2026

    @zackees
    MemberAuthor

    Implementation note from local investigation:

    • Native Meson quick/debug and WASM compile databases can be made strict-clean by disabling Meson's implicit include dirs on targets, removing /. from the canonical project include root, and post-normalizing Meson's private -I*.p scratch paths in generated build.ninja / compile_commands.json.
    • Local validation passed with uv run pytest ci/tests/test_meson_include_paths.py -q after regenerating the Meson databases.
    • FastLED should not bump its PyPI dependency until a zccache release containing ZCCACHE_STRICT_PATHS is published; PyPI currently resolves FastLED to zccache 1.3.0.
  2. zackees commented on Apr 22, 2026

    @zackees
    MemberAuthor

    Status after zccache 1.3.7 / #2380:

    • zccache 1.3.7 is published and exposes --strict-paths / ZCCACHE_STRICT_PATHS.
    • FastLED master now has the dependency floor bump in pyproject.toml.
    • Local Meson strict-path enablement has been validated with zccache 1.3.7:
      • native quick/debug Meson compile_commands.json: 0 strict path offenders
      • WASM Meson compile_commands.json: 0 strict path offenders
      • ZCCACHE_STRICT_PATHS=absolute minimal native target build reached compile/archive successfully
    • Remaining separate scope: existing .build/pio/.../compile_commands.json files produced by fbuild/PlatformIO still contain Windows-backslash -I paths. If strict mode is intended for fbuild/PlatformIO too, that normalization belongs in the fbuild/PlatformIO path producer or adapter, not the Meson-only patch.

    Next PR should be a clean branch from origin/master that enables strict mode for Meson and adds the strict compile DB validator. fbuild/PlatformIO should either get a follow-up issue/PR or be explicitly excluded from this Meson strict-mode rollout.

  3. zackees commented on May 24, 2026

    @zackees
    MemberAuthor

    Closing as completed.

    The zccache strict-paths support is now both available and enabled by default for Meson builds:

    • ci/meson/build_config.py:1971 — env.setdefault("ZCCACHE_STRICT_PATHS", "absolute")
    • ci/meson/runner.py:406 — same default applied at runner level
    • ci/tests/test_meson_include_paths.py — host-side regression test asserting no compiler flag would be rejected by ZCCACHE_STRICT_PATHS=absolute

    The remaining-scope note from the April 22 status comment (fbuild/PlatformIO compile_commands.json still contains backslash -I paths) is a separate concern that lives in the fbuild/PlatformIO path producer, not in Meson. If we want fbuild/PlatformIO strict-mode too, that should be tracked in a new issue against fbuild — leaving this one closed.

    🤖 Reviewed with Claude Code

  4. added a commit that references this issue on May 24, 2026
    05dbb63
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions