diff --git a/doc/roadmap/DIAG.md b/doc/roadmap/DIAG.md new file mode 100644 index 00000000..4e33a5df --- /dev/null +++ b/doc/roadmap/DIAG.md @@ -0,0 +1,29 @@ +# Compiler diagnostics + +Better error messages, continuing after initial errors, etc. + +| ID | Name | Owner | Status | +|--------|---------------------------------|-------------|--------------| +| DIAG-1 | Structured error types | @LesterEvSe | Needs design | + +## Done + +Tracked in #362. + +| Change | PR | +|----------------------------------------------------------------|------| +| The parser recovers and reports several syntax errors per file | #185 | +| Every span carries its `file_id` | #363 | +| Errors are collected as values instead of `String`s | #369 | +| `Diagnostic`, rendering with `ariadne` | #370 | +| The `!` type | #417 | +| Analysis reports through `DiagnosticManager` | #418 | +| Every error inside an expression is reported | #420 | +| Analysis continues after a broken function body | #424 | +| Analysis continues after an undefined type | #430 | +| Analysis continues after a failed statement | #448 | + +On master, analysis still stops in two cases: + +- A failed item other than `main`, such as a broken `use` or a redefined alias, stops the analysis of the remaining items. +- A syntax error in any file stops the compilation before analysis. diff --git a/doc/roadmap/README.md b/doc/roadmap/README.md index d2b232bc..6aaecc14 100644 --- a/doc/roadmap/README.md +++ b/doc/roadmap/README.md @@ -36,7 +36,7 @@ Our highest priorities right now (Q4 2026) are: * the module system `MOD-1` and `MOD-2` (blocking nominal typing, which is blocking "working enums") * Bitcoin support `CFG-2` -* Compiler diagnostics `DIAG` (needs splitting into sub-features with dependencies) +* Compiler diagnostics `DIAG` * The object file format `IR-3` # All Features @@ -60,11 +60,12 @@ items. | IR-1 | Parameters and Witnesses | Coherent design for parameters, witnesses, and constants | MOD-1 | Needs design | - | | IR-2 | Canonical CMR | Simplicity expression that computes the CMR for other expressions | IR-1 | Needs design | - | | IR-3 | "Object file" format | Format for "templated Simplicity", metadata, "compiled crates" | IR-2 | Needs design | - | -| DIAG | [Compiler diganostics](DIAG.md) | Better error messages, continuing after initial errors, etc | - | - | - | +| DIAG | [Compiler diagnostics](DIAG.md) | Better error messages, continuing after initial errors, etc | - | - | - | +| DIAG-1 | Structured error types | One error type per phase; no `String` errors in the public API | - | Needs design | - | | OPT | [Optimizations](OPT.md) | Compiler optimizations | — | - | - | | OPT-1 | "Post-hoc optimizer" | Optimizer that takes an object file, improves code, outputs proofs | IR-3 | - | - | | OPT-2 | Static analyzer | Static analysis of Simplicity code | IR-3 | - | - | -| TX | [Transaction Introspection](TX.md) | Covenants, transaction introspection, multi-tx state management | — | - | - | +| TX | [Transaction Introspection](TX.md) | Covenants, transaction introspection, multi-tx state management | — | - | - | | TX-1 | Covenant Convention | "Covenant convention" as code convention, then as HL built-in | — | Needs design | — | | TX-2 | Contract self-reference | Ability to reference own code, maybe with parameters changed | IR-2, TYPE-4 | Needs design | — | | SYN | [Syntax / language features](SYN.md) | Language syntax and features | — | - | — |