diff --git a/.gitignore b/.gitignore index 08009fd1d..022992fa1 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,4 @@ .zig-cache/ zig-out/ +zig-pkg/ result -*.zlsreplay - -# Remove on the next lunar eclipse or whatever -zig-cache diff --git a/build.zig b/build.zig index 23a2b3d6f..06acd0fa3 100644 --- a/build.zig +++ b/build.zig @@ -6,10 +6,10 @@ const zls_version = std.SemanticVersion.parse(@import("build.zig.zon").version) const minimum_build_zig_version = @import("build.zig.zon").minimum_zig_version; /// Specify the minimum Zig version that is usable with ZLS: -/// std.Thread sync primitives roundup +/// std.Threaded: replace more kernel32 functions with ntdll /// /// A breaking change to the Zig Build System should be handled by updating ZLS's build runner (see src\build_runner) -const minimum_runtime_zig_version = "0.16.0-dev.2475+e7e700334"; +const minimum_runtime_zig_version = "0.16.0-dev.2535+b5bd49460"; const release_targets = [_]std.Target.Query{ .{ .cpu_arch = .aarch64, .os_tag = .linux }, diff --git a/build.zig.zon b/build.zig.zon index b4d6f4135..499eda875 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -10,7 +10,7 @@ // nix flake update --commit-lock-file // ``` // If you do not use Nix, a ZLS maintainer can take care of this. - .minimum_zig_version = "0.16.0-dev.2510+bcb5218a2", + .minimum_zig_version = "0.16.0-dev.2535+b5bd49460", // If you do not use Nix, a ZLS maintainer can take care of this. // Whenever the dependencies are updated, run the following command: // ```bash @@ -19,8 +19,8 @@ // The `deps.nix` should also be updated to not fetch `tracy`. .dependencies = .{ .known_folders = .{ - .url = "https://github.com/ziglibs/known-folders/archive/82027007c0eb199a3242c167a5cffd83b6ee571b.tar.gz", - .hash = "known_folders-0.0.0-Fy-PJqHJAAB43zDJmOdlr3nViu69IFI9pNFt7hkHjKk4", + .url = "https://github.com/ziglibs/known-folders/archive/d002ad87b1f8c238eb080c185bb0b93cfd946b9d.tar.gz", + .hash = "known_folders-0.0.0-Fy-PJiXKAACLbIUjxVqJRTSLc6HNnMkCSBnC5LW0Lx_v", }, .diffz = .{ .url = "https://github.com/ziglibs/diffz/archive/aa11caef328a3f20f2493f8fd676a1dfa7819246.tar.gz", diff --git a/deps.nix b/deps.nix index 6a9afa6cf..1958b7ed7 100644 --- a/deps.nix +++ b/deps.nix @@ -1,6 +1,6 @@ # generated by zon2nix (https://github.com/nix-community/zon2nix) -{ linkFarm, fetchzip, fetchgit }: +{ linkFarm, fetchzip, fetchgit, emptyDirectory }: linkFarm "zig-packages" [ { @@ -11,10 +11,10 @@ linkFarm "zig-packages" [ }; } { - name = "known_folders-0.0.0-Fy-PJqHJAAB43zDJmOdlr3nViu69IFI9pNFt7hkHjKk4"; + name = "known_folders-0.0.0-Fy-PJiXKAACLbIUjxVqJRTSLc6HNnMkCSBnC5LW0Lx_v"; path = fetchzip { - url = "https://github.com/ziglibs/known-folders/archive/82027007c0eb199a3242c167a5cffd83b6ee571b.tar.gz"; - hash = "sha256-roSjTIJae5d2MoAmsTV2f0Ze+r5EXijgy7i1nTa0/nk="; + url = "https://github.com/ziglibs/known-folders/archive/d002ad87b1f8c238eb080c185bb0b93cfd946b9d.tar.gz"; + hash = "sha256-ZhNsjtdsqu2n3LuSVNfVktwp3mSJy367R3vR7z7NOJw="; }; } { @@ -24,4 +24,9 @@ linkFarm "zig-packages" [ hash = "sha256-CjWrp8fERKS5VldRvYtDFk1g4heIkX4YrpLw/eC12Q4="; }; } + # workaround: https://codeberg.org/ziglang/zig/issues/31162 + { + name = "N-V-__8AAOncKwEm1F9c5LrT7HMNmRMYX8-fAoqpc6YyTu9X"; + path = emptyDirectory; + } ] diff --git a/flake.lock b/flake.lock index e11ce9ce4..3166bdcfb 100644 --- a/flake.lock +++ b/flake.lock @@ -36,11 +36,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1770136044, - "narHash": "sha256-tlFqNG/uzz2++aAmn4v8J0vAkV3z7XngeIIB3rM3650=", + "lastModified": 1770464364, + "narHash": "sha256-z5NJPSBwsLf/OfD8WTmh79tlSU8XgIbwmk6qB1/TFzY=", "owner": "NixOS", "repo": "nixpkgs", - "rev": "e576e3c9cf9bad747afcddd9e34f51d18c855b4e", + "rev": "23d72dabcb3b12469f57b37170fcbc1789bd7457", "type": "github" }, "original": { @@ -80,11 +80,11 @@ ] }, "locked": { - "lastModified": 1770424992, - "narHash": "sha256-iew4pHarsSfjOyJirouNUTgm8WD0npgH42mXqoLKYLI=", + "lastModified": 1770598090, + "narHash": "sha256-k+82IDgTd9o5sxHIqGlvfwseKln3Ejx1edGtDltuPXo=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "5dd013fc252fb5711787348187331f29c53af236", + "rev": "142495696982c88edddc8e17e4da90d8164acadf", "type": "github" }, "original": { diff --git a/src/build_runner/build_runner.zig b/src/build_runner/build_runner.zig index deac1dd33..38874a402 100644 --- a/src/build_runner/build_runner.zig +++ b/src/build_runner/build_runner.zig @@ -530,13 +530,13 @@ const Watch = struct { fn wait(w: *Watch, gpa: Allocator, timeout: Io.Timeout) !std.Build.Watch.WaitResult { if (@TypeOf(std.Build.Watch) != void and w.supports_fs_watch) { - return try w.fs_watch.wait(gpa, switch (timeout) { + return try w.fs_watch.wait(gpa, w.io, switch (timeout) { .none => .none, .duration => |d| .{ .ms = @intCast(d.raw.toMilliseconds()) }, .deadline => unreachable, }); } - waitTimeout(&w.manual_event, w.io, timeout) catch |err| switch (err) { + w.manual_event.waitTimeout(w.io, timeout) catch |err| switch (err) { error.Canceled => unreachable, error.Timeout => return .timeout, }; @@ -545,21 +545,6 @@ const Watch = struct { return .dirty; } - /// Copy of `Io.Event.waitTimeout` but a compile error has been fixed. - pub fn waitTimeout(event: *Io.Event, io: std.Io, timeout: Io.Timeout) (error{Timeout} || Io.Cancelable)!void { - if (@cmpxchgStrong(Io.Event, event, .unset, .waiting, .acquire, .acquire)) |prev| switch (prev) { - .unset => unreachable, - .waiting => assert(!builtin.single_threaded), // invalid state - .is_set => return, - }; - try io.futexWaitTimeout(Io.Event, event, .waiting, timeout); - switch (@atomicLoad(Io.Event, event, .acquire)) { - .unset => unreachable, // `reset` called before pending `wait` returned - .waiting => return error.Timeout, - .is_set => return, - } - } - fn markStepsDirty(gpa: Allocator, all_steps: []const *Step) void { for (all_steps) |step| switch (step.state) { .precheck_done => continue,