diff --git a/build.zig b/build.zig index 18766bb30..c6ae82f99 100644 --- a/build.zig +++ b/build.zig @@ -7,10 +7,10 @@ const zls_version = std.SemanticVersion{ .major = 0, .minor = 13, .patch = 0 }; const zls_version_is_tagged: bool = false; /// Specify the minimum Zig version that is required to compile and test ZLS: -/// Rename Dir.writeFile2 -> Dir.writeFile and update all callsites +/// Run: add output directory arguments /// /// Must match the `minimum_zig_version` in `build.zig.zon`. -const minimum_zig_version = "0.13.0-dev.68+b86c4bde6"; +const minimum_zig_version = "0.13.0-dev.79+6bc0cef60"; /// Specify the minimum Zig version that is required to run ZLS: /// Release 0.12.0 @@ -290,8 +290,8 @@ pub fn build(b: *Build) !void { tests_run.has_side_effects = true; src_tests_run.has_side_effects = true; - tests_run.argv.insertSlice(0, args) catch @panic("OOM"); - src_tests_run.argv.insertSlice(0, args) catch @panic("OOM"); + tests_run.argv.insertSlice(b.allocator, 0, args) catch @panic("OOM"); + src_tests_run.argv.insertSlice(b.allocator, 0, args) catch @panic("OOM"); const merge_step = std.Build.Step.Run.create(b, "merge kcov"); merge_step.has_side_effects = true; diff --git a/build.zig.zon b/build.zig.zon index bac386ab0..7f9f0b8ce 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -3,16 +3,16 @@ // Must match the `zls_version` in `build.zig` .version = "0.13.0-dev", // Must match the `minimum_zig_version` in `build.zig` - .minimum_zig_version = "0.13.0-dev.68+b86c4bde6", - // whenever the dependencies are updated, run `zon2nix > deps.nix` + .minimum_zig_version = "0.13.0-dev.79+6bc0cef60", + // whenever the dependencies are updated, run `nix run github:acristoffers/zon2nix > deps.nix` .dependencies = .{ .known_folders = .{ - .url = "https://github.com/ziglibs/known-folders/archive/bf79988adcfce166f848e4b11e718c1966365329.tar.gz", - .hash = "12201314cffeb40c5e4e3da166217d2c74628c74486414aaf97422bcd2279915b9fd", + .url = "https://github.com/ziglibs/known-folders/archive/0ad514dcfb7525e32ae349b9acc0a53976f3a9fa.tar.gz", + .hash = "12209cde192558f8b3dc098ac2330fc2a14fdd211c5433afd33085af75caa9183147", }, .diffz = .{ - .url = "https://github.com/ziglibs/diffz/archive/e10bf15962e45affb3fcd7d9a950977a69c901b3.tar.gz", - .hash = "12200d71e4b7029ea56a429e24260c6c0e85a3069b0d4ba85eace21a0fd75910aa64", + .url = "https://github.com/ziglibs/diffz/archive/ef45c00d655e5e40faf35afbbde81a1fa5ed7ffb.tar.gz", + .hash = "1220102cb2c669d82184fb1dc5380193d37d68b54e8d75b76b2d155b9af7d7e2e76d", }, }, .paths = .{""}, diff --git a/deps.nix b/deps.nix index 7795c78f8..bde518896 100644 --- a/deps.nix +++ b/deps.nix @@ -4,17 +4,17 @@ linkFarm "zig-packages" [ { - name = "12200d71e4b7029ea56a429e24260c6c0e85a3069b0d4ba85eace21a0fd75910aa64"; + name = "1220102cb2c669d82184fb1dc5380193d37d68b54e8d75b76b2d155b9af7d7e2e76d"; path = fetchzip { - url = "https://github.com/ziglibs/diffz/archive/e10bf15962e45affb3fcd7d9a950977a69c901b3.tar.gz"; - hash = "sha256-yVFPVn4jGfcoE2V4xdTqdThYPutshL6U4feDzetWgFw="; + url = "https://github.com/ziglibs/diffz/archive/ef45c00d655e5e40faf35afbbde81a1fa5ed7ffb.tar.gz"; + hash = "sha256-5/3W0Xt9RjsvCb8Q4cdaM8dkJP7CdFro14JJLCuqASo="; }; } { - name = "12201314cffeb40c5e4e3da166217d2c74628c74486414aaf97422bcd2279915b9fd"; + name = "12209cde192558f8b3dc098ac2330fc2a14fdd211c5433afd33085af75caa9183147"; path = fetchzip { - url = "https://github.com/ziglibs/known-folders/archive/bf79988adcfce166f848e4b11e718c1966365329.tar.gz"; - hash = "sha256-Q7eMdyScqj8qEiAHg1BnGRTsWSQOKWWTc6hUYHNlgGg="; + url = "https://github.com/ziglibs/known-folders/archive/0ad514dcfb7525e32ae349b9acc0a53976f3a9fa.tar.gz"; + hash = "sha256-X+XkFj56MkYxxN9LUisjnkfCxUfnbkzBWHy9pwg5M+g="; }; } ] diff --git a/flake.lock b/flake.lock index ea13b9b02..fce01f690 100644 --- a/flake.lock +++ b/flake.lock @@ -83,11 +83,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1714971268, - "narHash": "sha256-IKwMSwHj9+ec660l+I4tki/1NRoeGpyA2GdtdYpAgEw=", + "lastModified": 1715668745, + "narHash": "sha256-xp62OkRkbUDNUc6VSqH02jB0FbOS+MsfMb7wL1RJOfA=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "27c13997bf450a01219899f5a83bd6ffbfc70d3c", + "rev": "9ddcaffecdf098822d944d4147dd8da30b4e6843", "type": "github" }, "original": { @@ -130,11 +130,11 @@ ] }, "locked": { - "lastModified": 1715041400, - "narHash": "sha256-yI67g+yU2J/tjytr9cTk51feKjLc+f9+BKE1KjlMNLQ=", + "lastModified": 1715775020, + "narHash": "sha256-CCqc3c3yvXgRaTW18epSHlF2HeikwNXqxnlrRs2sl3Y=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "48bcb35d1d59509010af9a3da06af8750ab9593b", + "rev": "03303bf01701b04ec87c55ce5d8d6f5ecf86d0a7", "type": "github" }, "original": { diff --git a/src/build_runner/0.12.0.zig b/src/build_runner/0.12.0.zig index 28e195a9a..a48ad0c74 100644 --- a/src/build_runner/0.12.0.zig +++ b/src/build_runner/0.12.0.zig @@ -775,10 +775,18 @@ fn extractBuildInformation( const helper = struct { fn addStepDependencies(set: *std.AutoArrayHashMap(*Step, void), lazy_path: std.Build.LazyPath) !void { - switch (lazy_path) { - .src_path, .path, .cwd_relative, .dependency => {}, - .generated => |gen| try set.put(gen.step, {}), - .generated_dirname => |gen| try set.put(gen.generated.step, {}), + const lazy_path_updated_version = comptime std.SemanticVersion.parse("0.13.0-dev.79+6bc0cef60") catch unreachable; + if (comptime builtin.zig_version.order(lazy_path_updated_version) == .lt) { + switch (lazy_path) { + .src_path, .path, .cwd_relative, .dependency => {}, + .generated => |gen| try set.put(gen.step, {}), + .generated_dirname => |gen| try set.put(gen.generated.step, {}), + } + } else { + switch (lazy_path) { + .src_path, .cwd_relative, .dependency => {}, + .generated => |gen| try set.put(gen.file.step, {}), + } } } };