Skip to main content

Module graph

Module graph 

Source
Expand description

Dependency-aware project graph.

Project is the final output of compilation — the result type of compile_sync. It combines a hierarchical view of the project with a flat dependency graph:

  • databases — the database > schema > object hierarchy used for iteration, deployment ordering, and module-statement execution.
  • dependency_graph — a flat adjacency list (ObjectId → {ObjectId}) used for topological sort, change propagation, and reverse-dependency lookups.
  • external_dependencies — objects referenced by the project but not defined in it (e.g., pre-existing sources). These appear as values in dependency_graph entries but are excluded from topological sorts and deployment.
  • cluster_dependencies and replacement_schemas — deployment metadata extracted during graph assembly.

Invariant: every ObjectId reachable through databases has an entry in dependency_graph. External dependencies appear only in dependency-set values and in the external_dependencies set.

Structs§

Database
A database containing schemas with dependency information.
DatabaseObject
A database object with its dependencies.
Project
A project graph with full dependency tracking.
Schema
A schema containing objects with dependency information.

Enums§

ModStatement
A module-level statement with context about where it should be executed.
SchemaType
The type of objects contained in a schema.