Skip to main content

Module graph

Module graph 

Source
Expand description

The dependency build order: a depth-first topological sort that rejects cycles, so building (and evaluating) the derived measures terminates.

Nodes are indices 0..g.len(); g[u] lists u’s dependencies, in the order they are visited. The result is the DFS post-order from roots.

Functions§

build_order
The dependency build order of roots in graph g: Ok(order), the DFS post-order, holds exactly the nodes reachable from roots, each once and after all of its dependencies; Err(w), at a node w on a cycle, exactly when a cycle is reachable from roots.