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

Build errors on Zig master #1

Open
sonro opened this issue Jul 24, 2024 · 2 comments
Open

Build errors on Zig master #1

sonro opened this issue Jul 24, 2024 · 2 comments

Comments

@sonro
Copy link

sonro commented Jul 24, 2024

This is due to the zig-clap dependency. If you want to support the master Zig branch, zig-clap will need to be bumped. I checked and init still builds on v0.13.0.

Zig version: 0.14.0-dev.541+2e8acdf6f
OS: Ubuntu 24.04 LTS x86_64
Kernel: 6.8.0-38-generic
CPU: Intel i7-3520M (2) @ 2.893GHz

/home/user/.cache/zig/p/12207ee987ce045596cb992cfb15b0d6d9456e50d4721c3061c69dabc2962053644d/build.zig:78:13: error: expected type '*const fn (*Build.Step, Build.Step.MakeOptions) anyerror!void', found '*const fn (*Build.Step, Progress.Node) anyerror!void'
            }
            ^
/home/user/.cache/zig/p/12207ee987ce045596cb992cfb15b0d6d9456e50d4721c3061c69dabc2962053644d/build.zig:78:13: note: pointer type child 'fn (*Build.Step, Progress.Node) anyerror!void' cannot cast into pointer type child 'fn (*Build.Step, Build.Step.MakeOptions) anyerror!void'
/home/user/.cache/zig/p/12207ee987ce045596cb992cfb15b0d6d9456e50d4721c3061c69dabc2962053644d/build.zig:78:13: note: parameter 1 'Progress.Node' cannot cast into 'Build.Step.MakeOptions'
/home/user/.zvm/master/lib/std/Build/Step.zig:71:25: note: struct declared here
pub const MakeOptions = struct {
                        ^~~~~~
/home/user/.zvm/master/lib/std/Progress.zig:80:18: note: struct declared here
pub const Node = struct {
                 ^~~~~~
referenced by:
    build: /home/user/.cache/zig/p/12207ee987ce045596cb992cfb15b0d6d9456e50d4721c3061c69dabc2962053644d/build.zig:47:30
    runBuild__anon_18138: /home/user/.zvm/master/lib/std/Build.zig:2148:33
    dependencyInner__anon_16273: /home/user/.zvm/master/lib/std/Build.zig:2129:29
    dependency__anon_15439: /home/user/.zvm/master/lib/std/Build.zig:1986:35
    build: /home/user/xDev/sore/init/build.zig:15:30
    runBuild__anon_10322: /home/user/.zvm/master/lib/std/Build.zig:2148:33
    main: /home/user/.zvm/master/lib/compiler/build_runner.zig:313:29
    posixCallMainAndExit: /home/user/.zvm/master/lib/std/start.zig:561:37
    _start: /home/user/.zvm/master/lib/std/start.zig:386:40
    comptime_0: /home/user/.zvm/master/lib/std/start.zig:97:54
@lawrence-laz
Copy link
Owner

I tried updating to latest zig-clap, but it's not compatible with the tagged zig 0.13.0.

I'd like to support both: the latest tagged version and master branch.

Not sure what is the best way to approach this

I might tag current version as 0.13.0 compatible and then keep the init/main compatible with zig/master

@sonro
Copy link
Author

sonro commented Jul 25, 2024

I might tag current version as 0.13.0 compatible and then keep the init/main compatible with zig/master

That sounds reasonable, however you would have to check it still builds every day when Zig master changes. Plus you'll have to watch zig-clap for any breaking changes.

That can be automated of course but might not be worth the effort to set up.

The alternative is just documenting that init is only compatible with 0.13.0. Then updating it with the next tagged Zig.

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