A diagnostic's clauses have a fixed order, and a stable kind waits for the docs it would link to

This commit is contained in:
Joseph Ferano 2026-09-25 09:41:24 +07:00
parent ff89f25e48
commit 836185a174
2 changed files with 7 additions and 4 deletions

View File

@ -76,6 +76,8 @@ named. Beyond that:
history. Never "X is now Y", never "X was renamed", never our rationale. If
`defvar` no longer exists, the message says `defvar` does not exist — not that
it became something else.
- The clauses come in one order: what the compiler understood, then what
conflicts with it, then the fix — "expected i32, found string".
- Every suggestion a message prints must compile.
- An assertion about the compiler's own invariants is prefixed `internal:` and
says it is a compiler bug. A user never caused one.

View File

@ -2069,10 +2069,11 @@ understood, say what conflicts, name the fix. Two behaviour changes came with it
an unannotated two-name parameter vector compiles as two dyn parameters, and a
=defn= named after a builtin stopped being unreachable.
** TODO Three structural diagnostics questions are still the author's
Printing the stable kind at the end of the first line, the understood-then-
conflicted clause order as a writing rule, and non-cascading multiple errors. Each
needs a decision rather than work.
** WAIT Every diagnostic carries a stable kind at the end of its first line
Decided 2026-09-25: wanted, in the shape =... found string [type-mismatch]=. Waits
for the documentation rewrite, which is what a kind would link to. The clause
order — understood, then the conflict, then the fix — is a rule in =CLAUDE.md=,
and reporting every error in a form is its own entry under the Editor heading.
** DONE docs/BUILT.md still describes (Handle T) and the pool as built
CLOSED: [2026-09-25]