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

Function _compute_js_glue_fingerprint

ci/wasm_build.py:215–232  ·  view source on GitHub ↗

Fingerprint only sources that can affect generated JS glue.

()

Source from the content-addressed store, hash-verified

213
214
215def _compute_js_glue_fingerprint() -> str:
216 """Fingerprint only sources that can affect generated JS glue."""
217 global _cached_js_fingerprint, _cached_js_fingerprint_time
218 now = time.monotonic()
219 if _cached_js_fingerprint is not None and (now - _cached_js_fingerprint_time) < 0.5:
220 return _cached_js_fingerprint
221
222 digest = hashlib.md5(usedforsecurity=False)
223 for path in _iter_js_affecting_files():
224 try:
225 st = path.stat()
226 digest.update(f"{path}:{st.st_mtime:.6f}:{st.st_size}".encode())
227 except OSError:
228 digest.update(f"{path}:MISSING".encode())
229
230 _cached_js_fingerprint = digest.hexdigest()
231 _cached_js_fingerprint_time = now
232 return _cached_js_fingerprint
233
234
235def _clear_link_cache(build_dir: Path) -> None:

Callers 2

_intercept_emcc_linkFunction · 0.85

Calls 2

_iter_js_affecting_filesFunction · 0.85
updateMethod · 0.45

Tested by

no test coverage detected