oden/fine
John Doty 85ffc0c7dd [fine] All error sentinels carry diagnostics
The system has an invariant that if you ever return an error
sentinel (error environment, error type) then that sentinel is caused
by an error that was reported to the user. We have had too many bugs
over the last little while where that was not the case!

(An example is if we mis-interpret the tree by calling `nth_tree` with
the wrong index or something, and get `None`, and think "oh must be a
syntax error", but it was really just the wrong index. Then there's an
error sentinel with no error diagnostic and we don't discover the
mistake until much farther along.)

Now we enforce this by requiring that whoever constructs the error
sentinel *prove* that they can do so by providing a diagnostic. It's
less efficient but prevents the problem.

This actually uncovered a couple of latent bugs where we were
generating error sentinels instead of a more appropriate type! Whoops!
2024-03-25 08:07:18 -07:00
..
src [fine] All error sentinels carry diagnostics 2024-03-25 08:07:18 -07:00
tests [fine] All error sentinels carry diagnostics 2024-03-25 08:07:18 -07:00
build.rs [fine] Many more import-related shuffles 2024-02-15 06:12:18 -08:00
Cargo.lock [fine] Assignments! 2024-01-19 19:08:17 -08:00
Cargo.toml Configuration updates for vendoring 2024-03-08 11:04:23 -08:00
design.md [fine] Notes on patterns 2024-02-04 19:13:56 -08:00