Skip to main content

Module graph

Module graph 

Source
Expand description

Module dependency graph with re-export chain propagation and reachability analysis.

The graph is built from resolved modules and entry points, then used to determine which files are reachable and which exports are referenced.

Re-exports§

pub use types::ExportSymbol;
pub use types::ModuleNode;
pub use types::ReExportEdge;
pub use types::ReferenceKind;
pub use types::SymbolReference;

Modules§

types
Shared graph types: module nodes, re-export edges, export symbols, and references.

Structs§

CoordinationGap
A single coordination-gap entry: a changed file exports symbols consumed by a consumer module that is NOT in the diff. Deduped per (changed, consumer) PAIR (firing-precision rule R2): one entry per distinct consumer module, the consumed-symbol names folded in, never one entry per import statement.
CoordinationGapPaths
A CoordinationGap with FileIds resolved to root-relative paths.
DirectImporterSummary
Importer details for one file that directly imports a target module.
Edge
An edge in the module graph.
FocusFileFacts
Per-file graph facts for one changed file, used by the focus map.
FocusFileFactsPaths
The same per-file facts with the FileId resolved to a root-relative, forward-slashed path string, sorted for deterministic output.
GraphReExportCycle
A re-export cycle or self-loop detected during Phase 4 chain resolution.
ImpactClosure
Result of an impact-closure computation. File partitions are FileId sets so the caller relativizes paths in its own path-space; ModuleGraph::closure_with_paths produces the root-relative path view for serialization.
ImpactClosurePaths
The same closure with FileIds resolved to root-relative, forward-slashed path strings, sorted for deterministic output.
ImportedSymbol
A symbol imported across an edge.
ImportedSymbolSummary
Symbol details for a direct import edge.
ModuleGraph
The core module dependency graph.
PartitionOrder
Result of a partition + order computation, keyed by FileId / module_dir. The caller relativizes via ModuleGraph::partition_order_with_paths for serialization, mirroring the impact_closure / closure_with_paths pair.
PartitionOrderPaths
The same partition + order with each unit’s FileIds resolved to root-relative, forward-slashed path strings, sorted for deterministic output.
ReviewUnit
A single review unit: a coherent by-module cluster of the changed set. The module_dir is the root-relative parent directory shared by files; the changed root file (one with no parent directory) clusters under the repository-root key (the empty string).
ReviewUnitPaths
A ReviewUnit with FileIds resolved to root-relative paths.