From 8374f3e12101e08f23d2b705cc3f05aa0677d84e Mon Sep 17 00:00:00 2001 From: hl-valdemar Date: Sat, 19 Sep 2026 17:39:28 +0200 Subject: [PATCH] docs: record error-tolerant compilation policy --- docs/adr/0001-error-tolerant-compilation.md | 3 +++ 1 file changed, 3 insertions(+) create mode 100644 docs/adr/0001-error-tolerant-compilation.md diff --git a/docs/adr/0001-error-tolerant-compilation.md b/docs/adr/0001-error-tolerant-compilation.md new file mode 100644 index 0000000..4f07bcc --- /dev/null +++ b/docs/adr/0001-error-tolerant-compilation.md @@ -0,0 +1,3 @@ +# Compile through recoverable source errors + +Honey produces an executable whenever source errors can be represented safely: structurally valid syntax trees may contain typed invalid nodes carrying source spans and diagnostic identities, and semantic checking or lowering turns demanded invalid code into diagnostic runtime traps. Clean compilation returns status `0`, compilation that emits an executable with source diagnostics returns `1`, and unrecoverable infrastructure or backend failure returns `2`. This deliberately favors testing unaffected program paths over conventional fail-fast compilation; parser recovery must preserve valid surrounding syntax, while compact syntax-tree storage remains private behind typed views.