Skip to main content

Module dependency_cycles

Module dependency_cycles 

Expand description

dependency-cycles analysis — non-trivial strongly-connected components of the structural import graph.

A set of files that (transitively) import each other forms a cycle / tangle: none can be compiled, tested, understood, or replaced in isolation, and a change to any one can ripple to all. This is Arcan’s “Cyclic Dependency” architectural smell (Fontana et al. 2017) and the red block a Dependency-Structure-Matrix shows on the diagonal (Sangal et al. 2005). Cycles are exactly the SCCs of size ≥ 2 (Tarjan 1972), computed by the shared import_graph kernel.

Accuracy follows the import resolver’s language coverage (Rust + Python + JS/TS resolve target_path; Java imports stay unresolved), same caveat as god_classes fan-in.

Structs§

DependencyCycleRow
One member of one dependency cycle. Rows sharing a cycle_id belong to the same tangle; size is that tangle’s member count.

Functions§

run_dependency_cycles
Run the dependency-cycles analysis. Returns one row per (cycle, member file), cycles ranked by size (largest first), members sorted by path.