Skip to content

Conversation

@plajjan
Copy link
Contributor

@plajjan plajjan commented Jan 23, 2026

All user errors are, by design and definition, only in the front passes so during the last refactoring where those were broken out and run separately from the back passes, actually handling back passes were forgotten. The only errors from back passes are compilers bugs, so we don't pipe them through in such an elaborate way as for the front passes, but I pretty much forgot about them entirely with the consequence that we ended up completely burrying them. Not only that, but we counted any back jobs regardless of actual output result (success / done) as finished and so we moved on to the final zig build even when there were module failues in the back passes. That's fixed now.

We also saw weird failures with truncated files. This comes from an error in CodeGen ( on the solver-next branch ), since Haskell is lazy and CodeGen is the last pass, its output is lazyily streamed - actually pulled out by the file, and so when we encountered the error relatively late, we ended up with truncated output. This was visible both in the .c and with --cgen - we did get slightly different locations for the truncation which I believe is related to buffering by some block size.

Error are now properly surfaced and we don't proceed with futher compilation once we encounter errors in back passes. Files are also written atomically using a temporary file + rename, so we avoid torn files overall (even if the source reason in this case is fixed too).

All user errors are, by design and definition, only in the front passes
so during the last refactoring where those were broken out and run
separately from the back passes, actually handling back passes were
forgotten. The only errors from back passes are compilers bugs, so we
don't pipe them through in such an elaborate way as for the front
passes, but I pretty much forgot about them entirely with the
consequence that we ended up completely burrying them. Not only that,
but we counted any back jobs regardless of actual output result (success
/ done) as finished and so we moved on to the final zig build even when
there were module failues in the back passes. That's fixed now.

We also saw weird failures with truncated files. This comes from an
error in CodeGen ( on the solver-next branch ), since Haskell is lazy
and CodeGen is the last pass, its output is lazyily streamed - actually
pulled out by the file, and so when we encountered the error relatively
late, we ended up with truncated output. This was visible both in the .c
and with --cgen - we did get slightly different locations for the
truncation which I believe is related to buffering by some block size.

Error are now properly surfaced and we don't proceed with futher
compilation once we encounter errors in back passes. Files are also
written atomically using a temporary file + rename, so we avoid torn
files overall (even if the source reason in this case is fixed too).
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: db7512bcbd

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@nordlander nordlander merged commit ae60798 into main Jan 23, 2026
79 of 82 checks passed
@nordlander nordlander deleted the back-errors branch January 23, 2026 22:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants