From 1847e752af2e4eef5cd6a66925f49adced289ac7 Mon Sep 17 00:00:00 2001 From: Victor Benarbia Date: Mon, 30 Nov 2026 21:46:29 -0600 Subject: [PATCH 1/2] CI: test on windows-latest again The README claims Linux, macOS and Windows support, but 1de42a6 dropped the Windows job without a stated reason. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 92509ac..9606f58 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,7 +11,7 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, macos-latest] + os: [ubuntu-latest, macos-latest, windows-latest] runs-on: ${{ matrix.os }} timeout-minutes: 15 steps: From 862a92c9b7bc6e92afff8e4e06cddb80f8c8a814 Mon Sep 17 00:00:00 2001 From: Victor Benarbia Date: Mon, 30 Nov 2026 21:50:01 -0600 Subject: [PATCH 2/2] Test: accept error.Unexpected for a refused connection on Windows Zig 0.16.0's std.Io.Threaded.netConnectIpWindows maps only SUCCESS, CANCELLED and INSUFFICIENT_RESOURCES; STATUS_CONNECTION_REFUSED falls through to error.Unexpected. The test checks that a transport error clears lastError(), whichever error it is. Co-Authored-By: Claude Opus 5.5 --- src/client.zig | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/client.zig b/src/client.zig index 22bcbc1..88b6d6d 100644 --- a/src/client.zig +++ b/src/client.zig @@ -1685,7 +1685,11 @@ test "lastError only describes the most recent request" { server.deinit(io); // nobody listens on the port any more listening = false; body.clearRetainingCapacity(); - try testing.expectError(error.ConnectionRefused, client.fetch(.{ .url = url }, &body.writer)); + // On Windows, Zig 0.16.0 reports a refused connection as + // error.Unexpected: std.Io.Threaded.netConnectIpWindows does not map + // STATUS_CONNECTION_REFUSED. + const refused = if (builtin.os.tag == .windows) error.Unexpected else error.ConnectionRefused; + try testing.expectError(refused, client.fetch(.{ .url = url }, &body.writer)); try testing.expectEqual(@as(?ErrorInfo, null), client.lastError()); }