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

Function _library_is_fresh

ci/wasm_build.py:381–394  ·  view source on GitHub ↗

Check if libfastled.a is up-to-date based on source fingerprint.

(build_dir: Path)

Source from the content-addressed store, hash-verified

379
380
381def _library_is_fresh(build_dir: Path) -> bool:
382 """Check if libfastled.a is up-to-date based on source fingerprint."""
383 library_archive = build_dir / "ci" / "meson" / "wasm" / "libfastled.a"
384 fingerprint_file = build_dir / "library_src_fingerprint"
385
386 if not library_archive.exists() or not fingerprint_file.exists():
387 return False
388
389 try:
390 stored = fingerprint_file.read_text(encoding="utf-8").strip()
391 current = _compute_src_fingerprint()
392 return stored == current
393 except OSError:
394 return False
395
396
397def _save_library_fingerprint(build_dir: Path) -> None:

Callers 1

build_libraryFunction · 0.85

Calls 1

_compute_src_fingerprintFunction · 0.85

Tested by

no test coverage detected