Verify all indirect dependencies of this SCC are still reachable via direct ones. Return first unreachable dependency id, or None.
(ascc: SCC, graph: Graph, manager: BuildManager)
| 4450 | |
| 4451 | |
| 4452 | def verify_transitive_deps(ascc: SCC, graph: Graph, manager: BuildManager) -> str | None: |
| 4453 | """Verify all indirect dependencies of this SCC are still reachable via direct ones. |
| 4454 | |
| 4455 | Return first unreachable dependency id, or None. |
| 4456 | """ |
| 4457 | for id in ascc.mod_ids: |
| 4458 | st = graph[id] |
| 4459 | assert st.meta is not None, "Must be called on fresh SCCs only" |
| 4460 | if st.trans_dep_hash == st.meta.trans_dep_hash: |
| 4461 | # Import graph unchanged, skip this module. |
| 4462 | continue |
| 4463 | for dep in st.dependencies: |
| 4464 | if st.priorities.get(dep) == PRI_INDIRECT: |
| 4465 | dep_scc_id = manager.scc_by_mod_id[dep].id |
| 4466 | if dep_scc_id == ascc.id: |
| 4467 | continue |
| 4468 | if not manager.is_transitive_scc_dep(ascc.id, dep_scc_id): |
| 4469 | return dep |
| 4470 | return None |
| 4471 | |
| 4472 | |
| 4473 | def find_stale_sccs( |
no test coverage detected
searching dependent graphs…