MCPcopy Create free account
hub / github.com/FastLED/FastLED / _enforce_strict_path_violations

Function _enforce_strict_path_violations

ci/meson/path_normalization.py:252–275  ·  view source on GitHub ↗

Raise loudly when ``compile_commands.json`` still has strict-path offenders. The normalizer above is meant to leave no offenders behind; this is the fail-fast guard for issue #2378's "validation step that checks generated compile commands before CI compiles". Any violation here is a bug

(build_dir: Path)

Source from the content-addressed store, hash-verified

250
251
252def _enforce_strict_path_violations(build_dir: Path) -> None:
253 """Raise loudly when ``compile_commands.json`` still has strict-path offenders.
254
255 The normalizer above is meant to leave no offenders behind; this is the
256 fail-fast guard for issue #2378's "validation step that checks generated
257 compile commands before CI compiles". Any violation here is a bug in the
258 normalizer or a new Meson code-path that emits unnormalized flags.
259 """
260 violations = find_strict_path_violations(build_dir)
261 if not violations:
262 return
263
264 sample = violations[:10]
265 extra = len(violations) - len(sample)
266 lines = [
267 f"[MESON] ZCCACHE_STRICT_PATHS=absolute would reject {len(violations)}"
268 " compile flag(s) in compile_commands.json (issue #2378):",
269 ]
270 lines.extend(f" {flag}" for flag in sample)
271 if extra > 0:
272 lines.append(f" ... {extra} more")
273 message = "\n".join(lines)
274 _ts_print(message, file=sys.stderr)
275 raise RuntimeError(message)

Callers 2

handle_skip_meson_setupFunction · 0.90
run_meson_setup_commandFunction · 0.90

Calls 2

appendMethod · 0.45

Tested by

no test coverage detected