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

Method save_fingerprints

ci/meson/build_optimizer.py:143–169  ·  view source on GitHub ↗

Save binary fingerprints of fastled shared library and all DLLs to the cache file. Called after each successful build to prepare for the next run's optimization.

(self, build_dir: Path)

Source from the content-addressed store, hash-verified

141 return touched
142
143 def save_fingerprints(self, build_dir: Path) -> None:
144 """
145 Save binary fingerprints of fastled shared library and all DLLs to the cache file.
146 Called after each successful build to prepare for the next run's optimization.
147 """
148 lib_path = build_dir / _LIBFASTLED_REL_PATH
149 data: dict = {
150 "libfastled_hash": "",
151 "dll_hashes": {},
152 }
153
154 if lib_path.exists():
155 data["libfastled_hash"] = _hash_file(lib_path)
156
157 dll_hashes: dict[str, str] = {}
158 for dll_path in _find_dlls(build_dir):
159 h = _hash_file(dll_path)
160 if h:
161 dll_hashes[str(dll_path)] = h
162 data["dll_hashes"] = dll_hashes
163
164 try:
165 self._cache_file.parent.mkdir(parents=True, exist_ok=True)
166 with open(self._cache_file, "w", encoding="utf-8") as f:
167 json.dump(data, f, indent=2)
168 except OSError:
169 pass
170
171
172def make_build_optimizer(

Callers 1

run_streaming_pathFunction · 0.80

Calls 3

_find_dllsFunction · 0.85
_hash_fileFunction · 0.70
dumpMethod · 0.45

Tested by

no test coverage detected