Andrew Kelley 572cb24d1a progress towards semantic error serialization
Introduces std.zig.ErrorBundle which is a trivially serializeable set
of compilation errors. This is in the standard library so that both
the compiler and the build runner can use it. The idea is they will
use it to communicate compilation errors over a binary protocol.

The binary encoding of ErrorBundle is a bit problematic - I got a little
too aggressive with compaction. I need to change it in a follow-up
commit to use some indirection in the error message list, otherwise
iteration is too unergonomic. In fact it's so problematic right now that
the logic getAllErrorsAlloc() actually fails to produce a viable
ErrorBundle because it puts SourceLocation data in between the root
level ErrorMessage data.

This commit has a simplification - redundant logic for rendering AST
errors to stderr has been removed in favor of moving the logic for
lowering AST errors into AstGen. So even if we get parse errors, the
errors will get lowered into ZIR before being reported. I believe this
will be useful when working on --autofix. Either way, some redundant
brittle logic was happily deleted.

In Compilation, updateSubCompilation() is improved to properly perform
error reporting when a sub-compilation object fails. It no longer dumps
directly to stderr; instead it populates an ErrorBundle object, which
gets added to the parent one during getAllErrorsAlloc().

In package fetching code, instead of dumping directly to stderr, it now
populates an ErrorBundle object, and gets properly reported at the CLI
layer of abstraction.
2023-03-15 10:48:12 -07:00
..
2023-03-15 10:48:12 -07:00
2023-03-05 02:59:01 -05:00
2023-03-15 10:48:12 -07:00
2022-12-13 13:14:20 +02:00
2022-11-04 00:09:27 +03:30
2023-02-18 19:17:21 -07:00
2023-03-03 02:37:45 -05:00
2022-12-13 13:14:20 +02:00
2023-03-03 02:37:45 -05:00
2023-02-20 09:09:05 +11:00
2023-03-15 10:48:12 -07:00
2023-03-01 12:21:53 -05:00
2022-09-11 23:18:43 -04:00
2023-03-09 14:55:13 -06:00
2023-02-17 09:08:41 -07:00
2022-04-15 17:01:01 -05:00
2023-03-09 14:55:13 -06:00