Skip to content

Fix build for Zig 0.18.0-dev.610+720939f8c - #50

Merged
MasonRemaley merged 2 commits into
mainfrom
jayschwa/naked-pkg-workaround
Oct 27, 2026
Merged

MasonRemaley merged 2 commits into
mainfrom
jayschwa/naked-pkg-workaround

Conversation

@jayschwa

Copy link
Copy Markdown
Collaborator

Zig 0.18.0-dev uses a new hash format for naked packages (no metadata) when version is present. Using version_ sidesteps that new hash format for now, keeping compatibility with older versions of Zig.

This workaround can be reverted when Zig 0.18.0 becomes the minimum supported version.

See: https://codeberg.org/ziglang/zig/pulls/37340

@jayschwa
jayschwa marked this pull request as draft October 23, 2026 20:09
@jayschwa

Copy link
Copy Markdown
Collaborator Author

Building hangs when the cache is cold, which is causing CI to fail. I will revisit this when it seems like it is fixed upstream.

@jayschwa

Copy link
Copy Markdown
Collaborator Author

Building hangs when the cache is cold, which is causing CI to fail. I will revisit this when it seems like it is fixed upstream.

Possible fix: https://codeberg.org/ziglang/zig/pulls/37391

Zig 0.18.0-dev uses a new hash format for naked packages (no metadata)
when `version` is present. Using `version_` sidesteps that new hash
format for now, keeping compatibility with older versions of Zig.

This workaround can be reverted when Zig 0.18.0 becomes the minimum
supported version.

See: https://codeberg.org/ziglang/zig/pulls/37340
@jayschwa
jayschwa force-pushed the jayschwa/naked-pkg-workaround branch from 7af6373 to ccc244b Compare October 26, 2026 21:31
@jayschwa jayschwa changed the title Fix build for Zig 0.18.0-dev.470+6817928c3 Fix build for Zig 0.18.0-dev.610+720939f8c Oct 26, 2026
@MasonRemaley MasonRemaley mentioned this pull request Oct 26, 2026
@jayschwa
jayschwa marked this pull request as ready for review October 26, 2026 21:50
- `version_` -> `upstream_version`
- replaced comment with link to issue tracking reverting this
  workaround
@MasonRemaley

Copy link
Copy Markdown
Contributor

Good idea. Made a minor stylistic change, will merge once CI passes.

@jayschwa

Copy link
Copy Markdown
Collaborator Author

I noticed that projects that depend on older versions of SDL still build successfully with Zig 0.18.0-dev. I guess Zig only gripes about the new hash format for the root module, which is a smart way of doing it. So while I think this workaround is probably still useful to have during the 0.18.0-dev cycle for working on this package, it's nice that downstream users don't necessarily need to update.

@MasonRemaley
MasonRemaley merged commit 93a5342 into main Oct 27, 2026
9 checks passed
@jayschwa
jayschwa deleted the jayschwa/naked-pkg-workaround branch October 27, 2026 03:45
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.

2 participants