Parse the depfile and return a list of dependency file paths.
(depfile_path: Path)
| 162 | |
| 163 | |
| 164 | def parse_depfile_inputs(depfile_path: Path) -> list[Path]: |
| 165 | """Parse the depfile and return a list of dependency file paths.""" |
| 166 | if not depfile_path.exists(): |
| 167 | return [] |
| 168 | |
| 169 | content = depfile_path.read_text(encoding="utf-8") |
| 170 | separator_idx = _find_depfile_separator(content) |
| 171 | |
| 172 | if separator_idx == -1: |
| 173 | return [] |
| 174 | |
| 175 | # Extract dependencies (everything after ": ") |
| 176 | deps_str = content[separator_idx + 2 :] |
| 177 | |
| 178 | return [Path(t) for t in _tokenize_depfile_deps(deps_str) if t] |
| 179 | |
| 180 | |
| 181 | def hash_input_files(files: list[Path]) -> str: |
no test coverage detected