Repository navigation
refactor(tests): drop _project_root_fwd indirection; align test -I paths with rest of codebase - #2327
Conversation
…ibling -I spellings The test include args were chaining `meson.project_source_root() / '.' / 'src'` which produces `C:/.../fastled6/./src` with a `/./` in the middle of the path. Every other meson file uses `meson.project_source_root() / 'src'` directly, producing `C:/.../fastled6/src` — a cleaner spelling. When the test DLL links against fastled_lib / crash_handler_lib, Meson ends up putting both spellings of the same directory on the compile line as distinct -I flags. Clang keys #pragma once on the resolved path string, so two spellings of the same directory can defeat the deduplication even though they refer to the same file. This change aligns the test -I spelling with the rest of the codebase (ci/meson/native/meson.build lines 438, 469, 524 and examples/meson.build line 172 all already use the clean spelling). Note: this is a cleanup, not a #pragma once fix. The redefinition error seen when vibe.h is included via both audio_processor.h and tests/fl/audio/detector/vibe.hpp is a deeper PCH+clang issue on Windows toolchains; the defensive ifndef guard added in #2325 is the working fix. This PR just removes an unnecessary path inconsistency so the overall -I surface area is smaller and any future investigation is working from clean paths. Verified: bash test --cpp all 299/299 tests still pass. Co-Authored-By: Claude Opus 4.7 (1M context) <[email protected]>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughUpdated Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~10 minutes Poem
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ 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
_project_root_fwd = meson.project_source_root() / '.'intests/meson.build.meson.project_source_root() / 'src'directly, matching the spelling used by every other meson file in the repo.What this fixes
Before this change,
tests/meson.buildproduced:Every other meson file (
ci/meson/native/meson.buildlines 438, 469, 524;examples/meson.buildline 172) produces:When the test DLL links against
fastled_lib/crash_handler_lib, both spellings of the same directory land on the compile line as distinct-Iflags. Clang keys#pragma onceon the resolved path string, so two spellings of the same directory can defeat deduplication even though they refer to the same file.What this does NOT fix
This is a cleanup, not a
#pragma oncefix. Removing the/./did not fully resolve theVibeLevelsredefinition error that #2325 addressed; there's a deeper PCH+clang path-handling issue on Windows toolchains that the#ifndefguard in #2325 handles defensively.This PR just shrinks the
-Isurface area so any future investigation is working from clean paths.Test plan
Follow-up issues filed for the broader path-normalization effort and a proposed zccache strict-paths mode.
Generated with Claude Code
Summary by CodeRabbit