Load IR for an SCC of modules from the cache. Arguments and return are as compile_scc_to_ir.
(
scc: list[MypyFile], result: BuildResult, mapper: Mapper, ctx: DeserMaps
)
| 468 | |
| 469 | |
| 470 | def load_scc_from_cache( |
| 471 | scc: list[MypyFile], result: BuildResult, mapper: Mapper, ctx: DeserMaps |
| 472 | ) -> ModuleIRs: |
| 473 | """Load IR for an SCC of modules from the cache. |
| 474 | |
| 475 | Arguments and return are as compile_scc_to_ir. |
| 476 | """ |
| 477 | cache_data = { |
| 478 | k.fullname: json.loads( |
| 479 | result.manager.metastore.read(get_state_ir_cache_name(result.graph[k.fullname])) |
| 480 | )["ir"] |
| 481 | for k in scc |
| 482 | } |
| 483 | modules = deserialize_modules(cache_data, ctx) |
| 484 | load_type_map(mapper, scc, ctx) |
| 485 | return modules |
| 486 | |
| 487 | |
| 488 | def collect_source_dependencies(modules: dict[str, ModuleIR]) -> set[SourceDep]: |
no test coverage detected
searching dependent graphs…