Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,4 @@
.zig-cache/
zig-out/
zig-pkg/
result
*.zlsreplay

# Remove on the next lunar eclipse or whatever
zig-cache
4 changes: 2 additions & 2 deletions build.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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 },
Expand Down
6 changes: 3 additions & 3 deletions build.zig.zon
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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",
Expand Down
13 changes: 9 additions & 4 deletions deps.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# generated by zon2nix (https://github.com/nix-community/zon2nix)

{ linkFarm, fetchzip, fetchgit }:
{ linkFarm, fetchzip, fetchgit, emptyDirectory }:

linkFarm "zig-packages" [
{
Expand All @@ -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=";
};
}
{
Expand All @@ -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;
}
]
12 changes: 6 additions & 6 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

19 changes: 2 additions & 17 deletions src/build_runner/build_runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};
Expand All @@ -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,
Expand Down