From 87153bb86b75d21fbac897b738f316d449f5d0c9 Mon Sep 17 00:00:00 2001 From: Leah Amelia Chen Date: Sat, 3 Oct 2026 16:54:45 +0800 Subject: [PATCH 1/2] update to Zig 0.17 --- build.zig | 2 +- build.zig.zon | 6 ++--- src/tui/Previewer.zig | 55 ++++--------------------------------------- 3 files changed, 9 insertions(+), 54 deletions(-) diff --git a/build.zig b/build.zig index 59c3587..9822da4 100644 --- a/build.zig +++ b/build.zig @@ -50,7 +50,7 @@ pub fn build(b: *std.Build) void { const run_cmd = b.addRunArtifact(tui); run_cmd.step.dependOn(b.getInstallStep()); - if (b.args) |args| run_cmd.addArgs(args); + run_cmd.addPassthruArgs(); const run_step = b.step("run", "Run zf"); run_step.dependOn(&run_cmd.step); diff --git a/build.zig.zon b/build.zig.zon index ed2c911..3621947 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -3,11 +3,11 @@ .fingerprint = 0x30d847eef1728438, .description = "a commandline fuzzy finder designed for filtering filepaths", .version = "0.11.0", - .minimum_zig_version = "0.16.0", + .minimum_zig_version = "0.17.0", .dependencies = .{ .vaxis = .{ - .url = "git+https://github.com/rockorager/libvaxis.git#c1e1f23be38951c425cdf31af455ba23ef178940", - .hash = "vaxis-0.6.0-BWNV_MjFCQCs9UDHiRkrgw_ayeiPkzOe4xVbaAqXkUWW", + .url = "git+https://github.com/rockorager/libvaxis.git#6fd944a27fb3d6f596e981076381a3131f2448b4", + .hash = "vaxis-0.6.0-BWNV_MafDAAEzkVUvrW9NFUqnnMUoeHqrs2mecnD6D7w", .lazy = true, }, }, diff --git a/src/tui/Previewer.zig b/src/tui/Previewer.zig index 94a9b8b..e353079 100644 --- a/src/tui/Previewer.zig +++ b/src/tui/Previewer.zig @@ -56,56 +56,11 @@ pub fn startThread(previewer: *Previewer, io: std.Io, loop: *vaxis.Loop(Event)) previewer.thread = try io.concurrent(threadLoop, .{ previewer, io, loop }); } -// TODO: can this be cleaned up? -const ThreadLoopError = error{ - AccessDenied, - AntivirusInterference, - BadPathName, - Canceled, - ConcurrencyUnavailable, - ConnectionResetByPeer, - DeviceBusy, - FileBusy, - FileLocksUnsupported, - FileNotFound, - FileSystem, - FileTooBig, - InputOutput, - InvalidBatchScriptArg, - InvalidExe, - InvalidName, - InvalidProcessGroupId, - InvalidUserId, - InvalidWtf8, - IsDir, - LockViolation, - NameTooLong, - NetworkNotFound, - NoDevice, - NoSpaceLeft, - NotDir, - NotOpenForReading, - OperationUnsupported, - OutOfMemory, - PathAlreadyExists, - PermissionDenied, - PipeBusy, - ProcessAlreadyExec, - ProcessFdQuotaExceeded, - ReadOnlyFileSystem, - ResourceLimitReached, - SocketUnconnected, - StreamTooLong, - SymLinkLoop, - SystemFdQuotaExceeded, - SystemResources, - Timeout, - Unexpected, - UnrecognizedVolume, - WouldBlock, -}; - -fn threadLoop(previewer: *Previewer, io: std.Io, loop: *vaxis.Loop(Event)) ThreadLoopError!void { +// Vaxis does not return a bounded error set, +// so type reflection is required here. +const ThreadLoopError = @typeInfo(@typeInfo(@TypeOf(Previewer.threadLoop)).@"fn".return_type.?).error_union.error_set; + +fn threadLoop(previewer: *Previewer, io: std.Io, loop: *vaxis.Loop(Event)) !void { const allocator = previewer.arena.allocator(); while (true) { From 6aa06e537b15f0af18d27568a1f40831f0bc2efd Mon Sep 17 00:00:00 2001 From: Nathan Craddock Date: Sun, 4 Oct 2026 13:24:54 -0600 Subject: [PATCH 2/2] Update Zig version in CI --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 52d1cee..72a6e91 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,7 +11,7 @@ jobs: strategy: matrix: os: [ubuntu-latest, macos-latest] - version: [0.16.0] + version: [0.17.0] runs-on: ${{matrix.os}} steps: