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

can't build with zig 0.11.0, deps hash mismatches #19

Open
phanirithvij opened this issue Jan 23, 2024 · 3 comments
Open

can't build with zig 0.11.0, deps hash mismatches #19

phanirithvij opened this issue Jan 23, 2024 · 3 comments
Assignees

Comments

@phanirithvij
Copy link

I think you should pin to a commit? As it is pointing to the master branch, as it changed there is a hash mismatch.
I tried to find the commit which gave this particular hash but finding it doesn't seem trivial.

https://github.com/zigster64/zig-zag-zoe/blame/a4314c79ac3968b532b8bb99fd379f8415056d61/build.zig.zon#L8

(devbox) ⚬ zig version
0.11.0
(devbox) ⚬ rm -rf zig-cache/ ~/.cache/zig/
(devbox) ⚬ zig build
Fetch Packages [1/2] http... /home/rithvij/Projects/htmx-star/zighx/zig-zag-zoe-hx/build.zig.zon:8:21: error: hash mismatch: expected: 1220304c177483b73776af162e589c050a54695bd10cf9c7ab913d9c3a5cae728fe3, found: 1220a06b79fe8996ccfab3017f535f0ebc4976055e5b753fdfb2d8b0830aeb2d9a32
            .hash = "1220304c177483b73776af162e589c050a54695bd10cf9c7ab913d9c3a5cae728fe3",
                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

On a side note.
I Tried changing to the suggested hash and am encountering this issue karlseguin/http.zig#29

Then tried the rm -rf zig-cache fix mentioned there with no luck, the issue still persists.

And with zig master version 0.12.0-dev, there are breaking changes in the build as usual.

⚫ zig version
0.12.0-dev.2327+b0c8a3f31
⚫ rm -rf ~/.cache/zig/ zig-cache/
⚫ zig build -Doptimize=ReleaseSmall; and notify-send 'zig build finished'
/home/rithvij/Projects/htmx-star/zighx/zig-zag-zoe-hx/build.zig.zon:1:2: error: missing top-level 'paths' field
.{
 ^
@zigster64
Copy link
Owner

Thanks for raising that !

will look into it and sort it out.

I did get a build compiling ok with 0.12 and httpz latest, but gameplay was broken so haven’t pushed that to master yet. Might be related to non-blocking io .. not sure yet.

hopefully get some time to sort it out, update docs, debug it and pin the versions. I should probably add some decent unit tests too ! Slacker that I am.

yeah, build changes have been fun :)

@zigster64 zigster64 self-assigned this Jan 23, 2024
@zigster64
Copy link
Owner

zigster64 commented Jan 24, 2024

I have patched up the build to work with 0.12.dev, and tested it against http.zig official (blocking branch only)

Seems broken with the master (non-blocking experimental async) branch of http.zig, but the original blocking IO branch of http.zig is fine

Please check that out at your leisure and see if it works for you

In the meantime, will use this as an opportunity to test/debug the async branch of http.zig using this demo game as a reference. Excellent !

@zigster64
Copy link
Owner

After a quick chat with Karl ...

https://github.com/zigster64/zig-zag-zoe/releases/tag/v0.12.2139-async

This builds against latest master of http.zig, which uses non-blocking / async IO. Just needed a minor tweak at this end to run the SSE event handler inside its own thread.

So there are 2 releases now, using zig 0.12.dev that reference the official http.zig repo

One does purely blocking IO and threads
The other does async IO with threads for the SSE stuff only

:)

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

No branches or pull requests

2 participants