Skip to main content

Module diagnostics

Module diagnostics 

Source
Expand description

Canonical diagnostic model, factories, and analysis pipeline.

Runtime-neutral and wasm-safe: shared between CLI (src/main/tty_render), the playground (src/playground.rs), and the LSP server.

Entry point: analyze_source — source in, AnalysisReport out.

Schema: JSON emitted via AnalysisReport::to_json carries schema_version: 1. See docs/diagnostics-schema.md.

Re-exports§

pub use analyze::AnalyzeOptions;
pub use analyze::analyze_source;
pub use factories::from_check_finding;
pub use factories::from_type_error;
pub use factories::needs_format_diagnostic;
pub use factories::replay_effect_error_diagnostic;
pub use factories::replay_output_mismatch_diagnostic;
pub use factories::unused_binding_diagnostic;
pub use factories::verify_mismatch_diagnostic;
pub use factories::verify_runtime_error_diagnostic;
pub use factories::verify_unexpected_err_diagnostic;
pub use model::AnalysisReport;
pub use model::AnnotatedRegion;
pub use model::Diagnostic;
pub use model::RelatedSpan;
pub use model::Repair;
pub use model::SCHEMA_VERSION;
pub use model::Severity;
pub use model::SourceLine;
pub use model::Span;
pub use model::Underline;
pub use model::json_escape;

Modules§

analyze
Single-file analysis pipeline.
classify
Classifiers and source-extraction helpers shared by factories.
context
File-local context analysis.
factories
Factory functions — convert internal error types to canonical Diagnostic.
model
Canonical diagnostic data model.
verify_run
Execute verify blocks via the VM and surface results as canonical Diagnostics. Shared by CLI (aver verify), LSP, and the playground Verify panel so every consumer sees identical outcomes for identical source.
vm_verify
Oracle-aware VM verify runner. Shared between aver verify (bin) and aver audit (lib diagnostics::analyze) so every consumer sees the same case-pass/fail outcomes for a given source.
why
File-local “why” summary: per-function justification signals plus aggregate line counts. Shared by CLI aver why and the playground Why panel — single analysis, two renderers.