Skip to content

Conversation

@nolanderc
Copy link
Contributor

Resolves the issues raised by @andrewrk in the original PR #19349 (reverted):

  • reduced nesting/indentation
  • use new flags --save-exact=[name]
  • use std.Uri.Component.format

/// Indicates whether the task aborted due to an out-of-memory condition.
oom_flag: bool,
/// If `use_latest_commit` was true, this will be the commit that was used.
latest_commit: ?git.Oid,
Copy link
Contributor

@rohlem rohlem May 11, 2024

Choose a reason for hiding this comment

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

This has an optional type, but is it ever null?
From a quick glance at the diff it seems to only be initialized to undefined, and only at one point assigned want_oid, which afaict is non-optional. (It's possible I missed something though.)
If there's no logical state using the null value we could make the field non-optional.

Copy link
Contributor Author

@nolanderc nolanderc May 11, 2024

Choose a reason for hiding this comment

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

Nice catch!
This was a few months ago, so my memory is a bit hazy, but I think it was made optional because not everything you can fetch is a git-repository, so the field would not necessary get initialized. But you are right, it should not be set to undefined everywhere, but null!

@andrewrk andrewrk merged commit 8f6b1f2 into ziglang:master May 11, 2024
@andrewrk
Copy link
Member

Nice, thanks for the follow-up!

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