Diagnostic taxonomy
Structured diagnostics (vox_compiler::typeck::Diagnostic) carry a category (DiagnosticCategory) for filtering, metrics, and documentation. Definitions live in crates/vox-compiler/src/typeck/diagnostics.rs.
| Category | When used |
|---|---|
parse | Reserved for parse-stage diagnostics when surfaced through the same struct (primary parse errors today use ParseError until unified). ParseErrorClass includes ReactiveComponentMember for unknown tokens inside a Path C / @island reactive body (stable for metrics and doc extraction). |
lowering | AST → HIR lowering shape issues (future unified messages). |
typecheck | Default: inference, unification, undefined names, arity, match exhaustiveness, etc. |
hir_invariant | Structural checks from validate_module after lowering (empty names, empty route paths, …). |
runtime_contract | Host / deploy / embedding guards (when reported via the same pipeline). |
lint | AST-level declaration lints (@index / @search_index), hook style warnings, and policy diagnostics. Severity can be warning or error (for example, db.Table.query(clause) now reports a lint-category error). |
CLI JSON diagnostics (vox check --json, shared pipeline) include a category field per row when using the structured diagnostic path.