Documentation
¶
Overview ¶
Package check runs the compile-time checks over a parsed stack: reference and type resolution, literal constraint evaluation, and @for-each nesting. The compiler runs every check; a factory binary's validate command re-runs the reference check on demand. Construction builds the stack's dependency graph once, and the graph is shared with whoever goes on to execute the stack.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Checker ¶
type Checker struct {
// contains filtered or unexported fields
}
Checker runs the compile-time checks over parsed, validated factory source. Construction builds the dependency graph and the scope tables for every composite call site once; each check method walks them and returns its own diagnostics. The graph is exposed so callers executing the factory share the structure the checks ran against.
func NewSyntax ¶ added in v0.8.0
func NewSyntax( body syntax.FactoryBody, libs map[string]*runtime.Library, assetCatalog *asset.Catalog, rootAssetSetID string, ) *Checker
NewSyntax builds the check state from a typed factory or composite body.
func NewSyntaxWithLibraryConfigSchemas ¶ added in v0.10.0
func NewSyntaxWithLibraryConfigSchemas( body syntax.FactoryBody, libs map[string]*runtime.Library, libraryConfigSchemas map[string]runtime.LibraryConfigSchema, assetCatalog *asset.Catalog, rootAssetSetID string, ) *Checker
NewSyntaxWithLibraryConfigSchemas builds check state with schema dependencies.
func (*Checker) ForEachNesting ¶
ForEachNesting reports any node declaring @for-each whose enclosing composite chain already iterates: no fan-out exists for an iteration nested inside another, and a body that never reads @each would otherwise quietly plan a single instance where several were declared. The compile command runs this with every composite body the stack reaches expanded, so the factory binary never holds the construct.
func (*Checker) LiteralConstraints ¶
LiteralConstraints reports cross-field violations that can be decided without stack inputs or upstream outputs. Missing required inputs are left to the type checker.
func (*Checker) References ¶
References reports references that cannot resolve to an input binding, node address, or active for-each binding, along with the type errors the resolved schemas expose. A non-nil observe receives every inferred expression with its type; the residual-Unknown harness reads the stream.