parser.next's argument is not required
Closed this issue · 3 comments
haruki7049 commented
I got this error when I used 'zig build'. I think that this error is caused by zig-lang's version.
- NixOS
- zig-version: 0.10.1
The Error is below;
/home/haruki/program-dir/zpm/src/main.zig:34:37: error: member function expected 0 argument(s), found 1
const exe_name = try (parser.next(global_allocator) orelse return 1);
~~~~~~^~~~~
/nix/store/hascmdzfs9p4xvx4pzcdv36xybwy0cff-zig-0.10.1/lib/zig/std/process.zig:777:9: note: function declared here
pub fn next(self: *ArgIterator) ?([:0]const u8) {
~~~~^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
referenced by:
callMain: /nix/store/hascmdzfs9p4xvx4pzcdv36xybwy0cff-zig-0.10.1/lib/zig/std/start.zig:614:32
initEventLoopAndCallMain: /nix/store/hascmdzfs9p4xvx4pzcdv36xybwy0cff-zig-0.10.1/lib/zig/std/start.zig:548:51
remaining reference traces hidden; use '-freference-trace' to see all reference traces
error: zpm...
error: The following command exited with error code 1:
/nix/store/hascmdzfs9p4xvx4pzcdv36xybwy0cff-zig-0.10.1/bin/zig build-exe /home/haruki/program-dir/zpm/src/main.zig --cache-dir /home/haruki/program-dir/zpm/zig-cache --global-cache-dir /home/haruki/.cache/zig --name zpm --pkg-begin args /home/haruki/program-dir/zpm/lib/zig-args/args.zig --pkg-end --pkg-begin uri /home/haruki/program-dir/zpm/lib/zig-uri/uri.zig --pkg-end --pkg-begin ini /home/haruki/program-dir/zpm/lib/ini/src/ini.zig --pkg-end --enable-cache
error: the following build command failed with exit code 1:
/home/haruki/program-dir/zpm/zig-cache/o/4700338cbf518f7843a7515681e3f2ad/build /nix/store/hascmdzfs9p4xvx4pzcdv36xybwy0cff-zig-0.10.1/bin/zig /home/haruki/program-dir/zpm /home/haruki/program-dir/zpm/zig-cache /home/haruki/.cache/zig
I was newbie of zig-lang, so I want you to tell me where I missed point!!
ikskuh commented
ZPM is not required anymore and is superseeded in Zig 0.11 with the Zig package manager
ikskuh commented
You can use https://github.com/mitchellh/zig-overlay to get latest Zig in NixOS
haruki7049 commented
I SEE... I am sorry for newbie question!! I close this issue.