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 a parsed, validated stack file. Construction builds the stack's 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 stack share the structure the checks ran against.
func New ¶
New builds the check state for a parsed stack file. libs is the imported-library table resolved for the file.
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 constraint violations that are decidable at compile time. It evaluates each library node's fields with no inputs or upstream outputs in scope and checks every constraint whose referenced fields all reduce that way (an absent field reads as null); a constraint that reads a deferred field is left for plan, which checks it once the value is known. Only Go libraries declare constraints, so a composite call site has none of its own; the nodes inside a composite body are checked against the libraries the body imports.
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.