Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zig head version breaks build.zig. #19

Closed
Tracked by #3
floooh opened this issue May 15, 2024 · 8 comments · Fixed by #20
Closed
Tracked by #3

Zig head version breaks build.zig. #19

floooh opened this issue May 15, 2024 · 8 comments · Fixed by #20
Labels
bug Something isn't working

Comments

@floooh
Copy link
Collaborator

floooh commented May 15, 2024

Just a heads up, I noticed in sokol-zig that the current Zig head version changed Build.LazyPath, and this also affects the build.zig script in sokol-d.

/Users/floh/projects/sokol-d/build.zig:61:44: error: no field named 'path' in union 'Build.LazyPath'
    lib.root_module.root_source_file = .{ .path = "src/handmade/math.zig" };

...I think this specific error can be fixed like:

lib.root_module.root_source_file = b.path("src/handmade/math.zig");

...the Emscripten stuff is a bit more complicated unfortunately, see my changes in sokol-zig:

floooh/sokol-zig@27683f5

@floooh floooh added the bug Something isn't working label May 15, 2024
@floooh
Copy link
Collaborator Author

floooh commented May 15, 2024

...btw, in sokol-zig I'm updated the branch zig-0.12.0 to the last version that worked in 0.12.0.

@floooh
Copy link
Collaborator Author

floooh commented May 15, 2024

PS: those changes actually work in zig-0.12.0 too, so no harm done.

@floooh
Copy link
Collaborator Author

floooh commented May 15, 2024

PS: as a temporary workaround in the sokol repo, I have pinned the Zig version in the Bindings CI pipeline to 0.12.0:

https://github.com/floooh/sokol/blob/7d348db1402f5ee3abc2be65db6b3cf9ef669e23/.github/workflows/gen_bindings.yml#L276-L278

The CI in the sokol-d repo will still break, but at least that way the bindings get properly updated for now.

@kassane
Copy link
Owner

kassane commented May 16, 2024

Based on PR #20 , maybe for now the ideal is to stick to v0.12.0, until the cached build (v0.13.0-master) bug is resolved.

commit: 018dc65

@floooh
Copy link
Collaborator Author

floooh commented May 16, 2024

Yeah I agree, probably better to wait a bit until zig-dev stabilizes a bit. Thanks for the CI fix!

@kassane kassane mentioned this issue May 17, 2024
13 tasks
@kassane
Copy link
Owner

kassane commented May 17, 2024

According to my tests in #21, I see differential behavior between the build and cached-build by the zig toolchain.
Therefore, once the real issue has been identified, I'll attempt to come back and evaluate if the same occurs in the 0.13.0-dev issue.

@kassane
Copy link
Owner

kassane commented May 18, 2024

@kassane
Copy link
Owner

kassane commented May 20, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants