From a8f10d30beb0984bf71d794b6a5ecb8da38bfe75 Mon Sep 17 00:00:00 2001 From: foxnne Date: Sat, 17 Oct 2026 17:59:55 -0500 Subject: [PATCH 1/2] zig: build on Zig 0.17 The mechanical pass only (fizzy's scripts/zig-0.17/rewrite.sh: zig fmt's upgrades and the one-answer std renames), and CI on Zig 0.17.0. Part of fizzyedit/plans#5. The fizzy pin moves to the 0.17 SDK at its release; until then this builds against fizzy's zig/0.17 sdk/ by path. Co-Authored-By: Claude Opus 5.5 --- .github/workflows/release.yml | 2 +- .github/workflows/sdk-repin.yml | 2 +- build.zig.zon | 2 +- src/Lsp.zig | 8 ++++---- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index dab756a..0c266e1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -12,4 +12,4 @@ jobs: permissions: contents: write with: - zig-version: "0.16.0" + zig-version: "0.17.0" diff --git a/.github/workflows/sdk-repin.yml b/.github/workflows/sdk-repin.yml index e1a776c..28a0fd0 100644 --- a/.github/workflows/sdk-repin.yml +++ b/.github/workflows/sdk-repin.yml @@ -31,4 +31,4 @@ jobs: with: sdk-version: ${{ github.event.client_payload.version || inputs.sdk-version || '' }} force: ${{ inputs.force == true }} - zig-version: "0.16.0" + zig-version: "0.17.0" diff --git a/build.zig.zon b/build.zig.zon index 01800f3..3f99201 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -1,7 +1,7 @@ .{ .name = .zig, .version = "0.0.1", - .minimum_zig_version = "0.16.0", + .minimum_zig_version = "0.17.0", .paths = .{ "build.zig", "build.zig.zon", diff --git a/src/Lsp.zig b/src/Lsp.zig index 73cce44..61a2de9 100644 --- a/src/Lsp.zig +++ b/src/Lsp.zig @@ -33,7 +33,7 @@ fn log(source: []const u8, level: std.log.Level, msg: []const u8) void { } fn currentEnviron() std.process.Environ { - if (builtin.os.tag == .windows) return .{ .block = .global }; + if (builtin.target.os.tag == .windows) return .{ .block = .global }; return .{ .block = .{ .slice = std.mem.span(@as([*:null]?[*:0]const u8, @ptrCast(std.c.environ))) } }; } @@ -48,7 +48,7 @@ fn tryDir(gpa: std.mem.Allocator, io: std.Io, dir: []const u8, exe_name: []const } fn findInPathList(gpa: std.mem.Allocator, io: std.Io, path_list: []const u8, exe_name: []const u8) ?[]const u8 { - const sep: u8 = if (builtin.os.tag == .windows) ';' else ':'; + const sep: u8 = if (builtin.target.os.tag == .windows) ';' else ':'; var it = std.mem.tokenizeScalar(u8, path_list, sep); while (it.next()) |dir| { if (tryDir(gpa, io, dir, exe_name)) |found| return found; @@ -129,7 +129,7 @@ fn resolveExecutable( posix_name: []const u8, windows_name: []const u8, ) []const u8 { - if (builtin.os.tag == .windows) return windows_name; + if (builtin.target.os.tag == .windows) return windows_name; const exe_name = posix_name; @@ -153,7 +153,7 @@ pub fn configure() void { // Deliberately no executable resolution here — see `ensureResolved`. `register(host)` runs // on fizzy's startup path, and everything in it is time the window doesn't appear. - command_buf[0] = if (builtin.os.tag == .windows) "zls.exe" else "zls"; + command_buf[0] = if (builtin.target.os.tag == .windows) "zls.exe" else "zls"; // Reserve the key now so `ensureResolved` can fill it in by mutating the value *in place*. // `Client.Config` stores `initialization_options` by value, and a `std.json.ObjectMap` copy From b47c5b2235bcf72d65e62b0672f9303a0619cddf Mon Sep 17 00:00:00 2001 From: foxnne Date: Sun, 18 Oct 2026 17:50:29 -0500 Subject: [PATCH 2/2] sdk: repin to fizzy SDK 0.2.30 The first SDK on Zig 0.17. Co-Authored-By: Claude Opus 5.5 --- build.zig.zon | 4 ++-- plugin.zig.zon | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/build.zig.zon b/build.zig.zon index 39a080d..f091a51 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -17,8 +17,8 @@ // The published SDK, not a path into a checkout: a release has to build from a // clean clone, and the release asset (never the tag's git archive) is the SDK // package alone — the monorepo root zon carries the app's own dependencies. - .url = "https://github.com/fizzyedit/fizzy/releases/download/sdk-v0.2.29/fizzy-sdk-v0.2.29.tar.gz", - .hash = "fizzy-0.2.29-SGBwY2sxJgCLLSPt4HLdlMSg7WtcP4K0fdtXI5WwJl2d", + .url = "https://github.com/fizzyedit/fizzy/releases/download/sdk-v0.2.30/fizzy-sdk-v0.2.30.tar.gz", + .hash = "fizzy-0.2.30-SGBwY1QnJwDznUMVnSLATxXgH2e8_Vz7eMwLj9UQ0sVU", }, }, } diff --git a/plugin.zig.zon b/plugin.zig.zon index c949db8..1edf533 100644 --- a/plugin.zig.zon +++ b/plugin.zig.zon @@ -1,8 +1,8 @@ .{ .id = "zig", .name = "Zig", - .version = "0.2.36", - .min_sdk_version = "0.2.29", + .version = "0.2.37", + .min_sdk_version = "0.2.30", .description = "Zig language support for fizzy", .tags = .{ "zig", "language" }, .author = "foxnne",