mirror of
https://codeberg.org/ziglang/zig
synced 2026-11-18 07:05:05 +00:00
This is an internal refactor to mark transitive semantic analysis errors as soon as they occur rather than relying on the root "update" function to do so. This is simpler to understand and slightly more efficient. The error surfaced in this case is renamed from `error.AnalysisFail` to `error.AlreadyReported` for consistency with the rest of the compiler. `error.AnalysisFail` is returned from the "ensure up to date" functions in `Zcu.PerThread` to indicate that the unit which was requested has failed analysis---using a different error name here is useful because it prevents `Sema` from accidentally introducing a bug by `try`ing. Alongside the above, I have also begun to store some useful debugging information (the reason for the transitive analysis error) with transitive analysis errors in compilers built with debug extensions. This information is surfaced by the incremental debug server, and was invaluable in tracking down an incremental compilation bug---details of that in the next commit.
470 lines
20 KiB
470 lines
20 KiB