diff --git a/build.zig.zon b/build.zig.zon index 227dae2b2..d3ecc1eee 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -3,7 +3,7 @@ // Must match the `zls_version` in `build.zig` .version = "0.14.0-dev", // Must match the `minimum_build_zig_version` in `build.zig` - .minimum_zig_version = "0.14.0-dev.2088+3f7fac5ff", + .minimum_zig_version = "0.14.0-dev.2506+32354d119", // If you do not use Nix, a ZLS maintainer can take care of this. // Whenever the dependencies are updated, run the following command: // ```bash diff --git a/flake.lock b/flake.lock index 1a00f3beb..d0f77e352 100644 --- a/flake.lock +++ b/flake.lock @@ -74,11 +74,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1733412085, - "narHash": "sha256-FillH0qdWDt/nlO6ED7h4cmN+G9uXwGjwmCnHs0QVYM=", + "lastModified": 1734323986, + "narHash": "sha256-m/lh6hYMIWDYHCAsn81CDAiXoT3gmxXI9J987W5tZrE=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "4dc2fc4e62dbf62b84132fe526356fbac7b03541", + "rev": "394571358ce82dff7411395829aa6a3aad45b907", "type": "github" }, "original": { @@ -135,11 +135,11 @@ ] }, "locked": { - "lastModified": 1733487143, - "narHash": "sha256-o4jsVKtInTA0CqwUUdcAxCYAgNLLNo30mLzz3qVc0eY=", + "lastModified": 1734437548, + "narHash": "sha256-b0mWbOhNuu9m9siL9nCFdzNFmpNPF0+KX22OECk5jpY=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "40e32dd7e083eab4340acd17de47f13d883f257f", + "rev": "007fae6a7dbbc26f0165c4590b81362597c31413", "type": "github" }, "original": { diff --git a/src/build_runner/0.12.0.zig b/src/build_runner/0.12.0.zig index d8e0ca9bd..49c5b57dd 100644 --- a/src/build_runner/0.12.0.zig +++ b/src/build_runner/0.12.0.zig @@ -41,6 +41,8 @@ const live_rebuild_processes = std.SemanticVersion.parse("0.14.0-dev.310+9d38e82b5") catch unreachable; const file_watch_windows_version = std.SemanticVersion.parse("0.14.0-dev.625+2de0e2eca") catch unreachable; +const child_type_coercion_version = + std.SemanticVersion.parse("0.14.0-dev.2506+32354d119") catch unreachable; // ----------------------------------------------------------------------------- @@ -775,20 +777,25 @@ fn workerMakeOneStep( } } -fn nextArg(args: [][:0]const u8, idx: *usize) ?[:0]const u8 { +const ArgsType = if (builtin.zig_version.order(child_type_coercion_version) == .lt) + [][:0]const u8 +else + []const [:0]const u8; + +fn nextArg(args: ArgsType, idx: *usize) ?[:0]const u8 { if (idx.* >= args.len) return null; defer idx.* += 1; return args[idx.*]; } -fn nextArgOrFatal(args: [][:0]const u8, idx: *usize) [:0]const u8 { +fn nextArgOrFatal(args: ArgsType, idx: *usize) [:0]const u8 { return nextArg(args, idx) orelse { std.debug.print("expected argument after '{s}'\n access the help menu with 'zig build -h'\n", .{args[idx.* - 1]}); process.exit(1); }; } -fn argsRest(args: [][:0]const u8, idx: usize) ?[][:0]const u8 { +fn argsRest(args: ArgsType, idx: usize) ?ArgsType { if (idx >= args.len) return null; return args[idx..]; }