Skip to content

Compilation Errors ​

Every issue the compiler reports carries a source, a severity, a character range, and a stable code.

Errors appear as inline diagnostics in the editor, in the Errors tab in debug mode, and on stderr from the CLI.

Severity ​

SeverityEffect
errorThe recipe is not valid. The CLI exits 1.
warningCompilation continues; the recipe still draws.
info, hintInformational only.

A recipe with only warnings renders. The app draws whatever the compiler managed to build, so a partial graph is normal while a recipe is mid-edit.

Sources ​

SourceMeaning
SyntaxThe text does not parse, or a construct is in a place it is not allowed
ReferenceA name was used that nothing declares
ImportAn imported file could not be fetched or compiled
InternalA compiler invariant was violated — a bug worth reporting

Syntax Codes ​

CodeSeverityReported when
SYN_UNEXPECTED_TOKENerrorThe parser cannot make sense of a token: Unexpected token '…'
SYN_MISMATCHED_BRACKETerrorA bracket is unclosed, unopened, or closed by the wrong kind: Unclosed bracket '(', Unexpected closing bracket ')', Mismatched bracket '}'
SYN_MISSING_LHSerrorAn assignment has nothing on its left: Left hand side is missing
SYN_MISSING_RHSerrorAn assignment has nothing on its right: Right hand side is missing
SYN_DUPLICATE_LHS_NAMEwarningThe same name appears twice on one left-hand side: Duplicate left hand side variable 'a'
SYN_DUPLICATE_STYLE_PROPERTY_NAMEwarningA style block declares a property twice: Duplicate style property 'border-width'. The last value wins.
SYN_INVALID_GLOBAL_STYLE_KEYWORDerrorA *keyword block names something other than node, edge, or subgraph: Invalid global style binding keyword 'nodes'
SYN_RENDERER_DIRECTIVE_NOT_TOP_LEVELerrorA ^<name>{ } directive appears inside a namespace
SYN_ABOUT_NOTE_NOT_TOP_LEVELerrorA ~<name>{ } note appears inside a namespace

Bracket diagnostics are collected over the whole source when the parser enters error recovery, so an unclosed bracket is reported at the opener rather than at the end of the file.

Reference Codes ​

CodeSeverityReported when
REF_VAR_NOT_FOUNDerrorA variable is used that no assignment in scope declares: Variable 'x' not found. Raised both for call arguments and for a bare right-hand side.
REF_STYLE_TAG_NOT_FOUNDerrorA #tag is referenced that no declaration in scope provides: Style tag 'ns.local' not found. Checked in style blocks, style bindings, renderer directives, and about notes alike.

Both scenarios respect namespace scoping. A name declared inside a namespace is only reachable from outside through a qualified name. See Namespaces.

Import Codes ​

CodeSeverityReported when
IMP_MISSING_EXTENSIONerrorThe location's path does not end in .fiz: Package '…' missing file extension .fiz. Checked before any fetch, so no request is made.
IMP_FETCH_FAILEDerrorThe request did not succeed, timed out, dropped mid-body, exceeded the size cap, or the CLI was given an unreadable local file
IMP_HTML_RESPONSEerrorThe response was text/html, usually a 404 page or a repository web page instead of a raw file: Expected a fiz file but received HTML from '…'
IMP_INVALID_CONTENT_TYPEerrorThe response's content type is not on the allow-list (text/*, application/octet-stream, application/x-*, or absent): Expected a fiz file but received '…' from '…'
IMP_CIRCULARerrorThe location is already on the current import chain: Circular import detected: …

IMP_FETCH_FAILED covers several messages, since every one of them is the transport failing to hand back a file:

MessageCause
Failed to fetch package from '…': <status>The request returned a non-OK status
Failed to fetch package from '…': timed out after 10000msThe 10-second deadline expired, waiting for either the headers or the body
Package '…' exceeds the 4194304 byte import limitThe response was larger than the 4 MiB cap
Failed to read package from '…': <reason>The CLI could not read a local file

Every import failure is positioned on the import statement that caused it.

An imported package that fetches but does not compile cleanly is a separate case, reported as a warning with no code:

text
[warning] Import @0-9: Imported package 'p.fiz' reported 1 issue(s): Variable 'x' not found

The imported file's own diagnostics are not forwarded, because their offsets index that file rather than the lines present in the open document. See Imports.

Internal Codes ​

These indicate a compiler bug rather than a problem with the recipe.

CodeReported when
INT_UNKNOWN_ARG_TYPEA call argument was of a type the DAG builder does not handle
INT_INVALID_RHS_TYPEAn assignment's right-hand side was of an unhandled type
INT_UNKNOWN_STMT_TYPEA statement was of an unhandled type

CLI Output Format ​

The CLI prints one line per issue:

text
  [<severity>] <Source> @<from>-<to>: <message>

For example:

text
Compilation reported 1 issue(s):
  [error] Reference @12-18: Variable 'missing' not found

A single-character span prints as @<offset> rather than a range.