Expand description
Import dependency graph and circular-import detection.
Given a set of parsed Modules, this module builds a directed dependency
graph where each edge A → B means “module A imports symbols from module B”.
It then runs a depth-first search to detect back-edges (cycles) and returns
each cycle as an ImportCycle.
Only edges between modules that are present in the provided slice are considered; imports from modules that were not provided are ignored.
Structs§
- Import
Cycle - A circular import chain detected among a set of modules.
Functions§
- detect_
cycles - Detect circular imports among a slice of parsed modules.
- topological_
order - Compute a topological generation order for a set of modules.