1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
//! Resource graph: flatten module bodies into their callers, expand
//! `count` / `for_each`, and emit a [`Workspace`](crate::ir::Workspace).
//!
//! Phase 5 lands module expansion (closes M2). Dependency-edge collection
//! and the secondary Parquet tables (`dependencies.parquet`,
//! `components.parquet`, `modules.parquet`) are Phase 8 / M5 work — they
//! consume the same `Workspace`, so the contract pinned here does not need
//! to change when they arrive.
//!
//! Per [15-resource-graph.md].
//!
//! ## Public surface
//!
//! - [`GraphBuilder`] / [`DefaultGraphBuilder`]: the trait + default impl that flattens module
//! bodies into their callers.
//! - [`ModuleRegistry`]: canonical-path-keyed index of local module bodies; the orchestrator (Phase
//! 5 pipeline wiring) builds this by evaluating every `DirKind::Module` directory the discoverer
//! emitted.
//! - [`GraphContext`]: per-build context (workspace root, recursion / expansion caps).
//! - [`GraphError`]: errors emitted by the graph phase. Spec § 7 `UnresolvableModuleSource` /
//! `DepthExceeded` are recorded as [`crate::Diagnostic`]s in practice (the builder method
//! signature reserves `Err` for fatal IR-construction failures).
//!
//! [15-resource-graph.md]: ../../../specs/15-resource-graph.md
pub use ;
pub use collect_edges_in_place;
pub use GraphError;
pub use ;
// `expand::expand_resource` and helpers are crate-private — only `builder`
// drives them. Tests live next to their implementation.