0
Fork 0
mirror of https://codeberg.org/ziglang/zig synced 2026-11-18 07:05:05 +00:00

Compilation: fix reference trace behavior without -freference-trace

When `-freference-trace` is not passed, we want to show exactly one
reference trace. Previously, we set the reference trace root in `Sema`
iff there were no other failed analyses. However, this results in an
arbitrary error being the one with the reference trace after error
sorting. It is also incompatible with incremental compilation, where
some errors might be unreferenced. Instead, set the field on all
analysis errors, and decide in `Compilation.getAllErrorsAlloc` which
reference trace[s] to actually show.
This commit is contained in:
mlugg 2025-03-30 22:59:25 +01:00
commit 70040778fb
No known key found for this signature in database
GPG key ID: 3F5B7DCCBF4AF02E
2 changed files with 22 additions and 15 deletions