Skip to main content

Module graph

Module graph 

Source
Expand description

The class dependency graph: definition → use edges between shape classes.

Built once, from classes, before the model runs (ADR 0022). Two consumers read it: the artefact the model fetches from, and the ordering stage, which contracts it onto groups.

It is a fact about the diff, not about the grouping. The stage that used to build it worked from groups, so a symbol two classes defined produced an edge only when the model happened to merge those two classes. What depends on what cannot turn on how a label was drawn.

Extraction is a domain use case with pluggable readers (super::symbols); no indexer. It reads WHOLE FILES from the head tree, because a line inside a block comment cannot be told from code on its own. A file no reader claims contributes nothing — a guess costs more than silence. Precision is allowed to be low (ADR 0007): a wrong edge misorders, and it can never hide content. Every edge carries the symbols that produced it, so a consumer can judge one by its cause rather than take it on trust.

Structs§

ClassGraph
What each class introduces, and which classes it consumes. Both indexed by class index, parallel to Partition::classes.

Functions§

build
Build the graph over the added lines of every class: what the change introduces, and what the changed code now calls.