| 1751 | |
| 1752 | |
| 1753 | def read_quickstart_file( |
| 1754 | options: Options, stdout: TextIO |
| 1755 | ) -> dict[str, tuple[float, int, str]] | None: |
| 1756 | quickstart: dict[str, tuple[float, int, str]] | None = None |
| 1757 | if options.quickstart_file: |
| 1758 | # This is very "best effort". If the file is missing or malformed, |
| 1759 | # just ignore it. |
| 1760 | raw_quickstart: dict[str, Any] = {} |
| 1761 | try: |
| 1762 | with open(options.quickstart_file, "rb") as f: |
| 1763 | raw_quickstart = json_loads(f.read()) |
| 1764 | |
| 1765 | quickstart = {} |
| 1766 | for file, (x, y, z) in raw_quickstart.items(): |
| 1767 | quickstart[file] = (x, y, z) |
| 1768 | except Exception as e: |
| 1769 | print(f"Warning: Failed to load quickstart file: {str(e)}\n", file=stdout) |
| 1770 | return quickstart |
| 1771 | |
| 1772 | |
| 1773 | def read_deps_cache(manager: BuildManager, graph: Graph) -> dict[str, FgDepMeta] | None: |