Get combined hash of all .cpp/.h/.hpp files in src/ and tests/ directories. Kept for backward compatibility. The combined hash is used as the marker value stored in .source_files_hash. Returns: Tuple of (hash_string, sorted_file_list)
(source_dir: Path)
| 232 | |
| 233 | |
| 234 | def get_source_files_hash(source_dir: Path) -> tuple[str, list[str]]: |
| 235 | """ |
| 236 | Get combined hash of all .cpp/.h/.hpp files in src/ and tests/ directories. |
| 237 | |
| 238 | Kept for backward compatibility. The combined hash is used as the marker |
| 239 | value stored in .source_files_hash. |
| 240 | |
| 241 | Returns: |
| 242 | Tuple of (hash_string, sorted_file_list) |
| 243 | """ |
| 244 | try: |
| 245 | src_files = _discover_files_in_dir(source_dir, "src") |
| 246 | test_files = _discover_files_in_dir(source_dir, "tests") |
| 247 | all_files = sorted(src_files + test_files) |
| 248 | return (_hash_file_list(all_files), all_files) |
| 249 | except KeyboardInterrupt as ki: |
| 250 | handle_keyboard_interrupt(ki) |
| 251 | raise |
| 252 | except Exception as e: |
| 253 | _ts_print(f"[MESON] Warning: Failed to get source file hash: {e}") |
| 254 | return ("", []) |
| 255 | |
| 256 | |
| 257 | def get_split_source_hashes(source_dir: Path) -> SplitSourceHashes: |
no test coverage detected