Expand description
Project compilation, graph assembly, and deployment analysis.
This module defines the compile contract for a Materialize project rooted on
disk. The result of compilation is an ir::graph::Project.
Compilation has two behavioral layers:
- Object compilation — each logical object is discovered from source files, parsed, validated, and normalized independently. These object-local results are the unit of parallelism and the unit of persistent cache reuse.
- Graph assembly — the current object set is assembled into a compiled project and then into a dependency-aware project graph, where cross-object constraints and deployment ordering are enforced.
The project module is organized by compiler responsibility:
compiler— compile orchestration, object validation, incremental caching, and assemblysyntax— source-file discovery, parsed input structures, parser integration, profile variants, and variable substitutionresolve— name qualification, normalization, and lowering transformsanalysis— dependency extraction, topology, deployment snapshots, dirty propagation, and graph-wide validationsir— semantic identifiers, compiled project IR, and dependency graph IR
plan_sync() is the canonical synchronous compiler entrypoint. It uses the
incremental compiler in compiler to reuse persisted object artifacts
across invocations. plan() is an async wrapper that runs this compile
contract on a blocking thread pool.
The sibling modules in analysis/ operate on the assembled project graph to
answer deployment questions such as which objects changed, which downstream
objects must be restaged, and whether runtime cluster rules are satisfied.
Modules§
- analysis 🔒
- Analyses derived from compiled project state.
- ast 🔒
- Abstract syntax types shared across project compilation and graph analysis.
- clusters 🔒
- Cluster definition loading and validation.
- compiler 🔒
- Incremental project compiler.
- error 🔒
- Error types for Materialize project operations.
- ir 🔒
- Core semantic identifiers shared across the compiler.
- network_
policies 🔒 - Network policy definition loading and validation.
- resolve 🔒
- Name resolution and lowering transforms.
- roles 🔒
- Role definition loading and validation.
- syntax 🔒
- Source-facing compiler inputs.
Structs§
- Schema
Qualifier - A
(database_name, schema_name)pair identifying a schema within a project.