Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Error Codes

This page lists all diagnostic codes produced by the WCL pipeline, grouped by phase.

Errors

CodePhaseDescription
E001ParseSyntax error
E002ParseUnexpected token
E003ParseUnterminated string
E010ImportFile not found
E011ImportJail escape (path outside root)
E013ImportRemote import forbidden
E014ImportMax import depth exceeded
E015ImportLibrary not found in search paths
E016ImportGlob pattern matched no files (non-optional import)
E020MacroUndefined macro
E021MacroRecursive macro expansion
E022MacroMax expansion depth exceeded
E023MacroWrong macro kind
E024MacroParameter type mismatch
E025Control FlowFor-loop iterable is not a list
E026Control FlowIf/else condition is not bool
E027Control FlowInvalid expanded identifier
E028Control FlowMax iteration count exceeded
E029Control FlowMax nesting depth exceeded
E030MergeDuplicate ID (non-partial)
E031MergeAttribute conflict in partial merge
E032MergeKind mismatch in partial merge
E033MergeMixed partial/non-partial
E034ExportDuplicate exported variable name
E035ExportRe-export of undefined name
E036ExportExport inside block
E038MergePartial let binding value must be a list
E039MergeLet binding declared as both partial and non-partial with same name
E040ScopeUndefined reference
E041ScopeCyclic dependency
E050EvalType error in expression
E051EvalDivision by zero
E052EvalUnknown function
E053EvalDeclared-but-unregistered function (from declare in library)
E054EvalIndex out of bounds
E060DecoratorUnknown decorator
E061DecoratorInvalid target
E062DecoratorMissing required parameter
E063DecoratorParameter type mismatch
E064DecoratorConstraint violation
E070SchemaMissing required field
E071SchemaAttribute type mismatch
E072SchemaUnknown attribute (closed schema)
E073SchemaValidate constraint violation
E074SchemaRef target not found
E080ValidationDocument validation failed
E090Table@table_index references nonexistent column
E091TableDuplicate value in unique table index
E092TableInline columns defined when schema is applied
E093SchemaBlock uses text block syntax but schema has no @text field
E094Schema@text field validation errors (wrong name or type)
E095SchemaChild not allowed by parent’s @children constraint
E096SchemaItem not allowed by its own @parent constraint
E097SchemaChild count below @child minimum
E098SchemaChild count above @child maximum
E099SchemaSelf-nesting exceeds @child max_depth
E100SchemaSymbol value not in declared symbol_set
E101SchemaReferenced symbol_set does not exist
E102ParseDuplicate symbol_set name
E103ParseDuplicate symbol within a symbol_set

Warnings

CodePhaseDescription
W001ScopeShadowing warning
W002ScopeUnused variable
W003MergeInline args mismatch in partial merge

Diagnostic Output Format

WCL diagnostics use a Rust-style format with source spans:

error[E070]: missing required field `port`
  --> config.wcl:12:3
   |
12 |   service svc-api {
   |   ^^^^^^^^^^^^^^^ missing field `port`
   |
   = required by schema `ServiceSchema`

warning[W001]: `port` shadows outer binding
  --> config.wcl:18:7
   |
18 |   let port = 9090
   |       ^^^^ shadows binding at config.wcl:3:5

Each diagnostic includes:

  • Severityerror or warning
  • Code — e.g. [E070]
  • Message — human-readable description
  • Location — file path, line, and column (file:line:col)
  • Source snippet — the relevant source lines with a caret pointing to the problem
  • Notes — optional additional context (prefixed with =)

Using --strict

Running wcl validate --strict promotes all warnings to errors. This is useful in CI pipelines where zero warnings are required.

wcl validate --strict config.wcl
echo $?  # 0 if no errors or warnings; 1 if any