Bug
antd-zig/src/ can't be built against any released Zig (0.14.x or 0.15.x). The source mixes APIs that don't co-exist in any tagged release:
std.ArrayList(u8) = .empty initializer — introduced in Zig 0.15-dev (not present in 0.14.x).
client.open(method, uri, .{ ... }) on std.http.Client — present in 0.14.x, removed/renamed in 0.15.x.
build.zig.zon declares minimum_zig_version = "0.14.0", but neither 0.14.x nor 0.15.x can satisfy both calls.
Reproductions
Zig 0.14.1
src/json_helpers.zig:213:36: error: struct 'array_list.ArrayListAligned(u8,null)' has no member named 'empty'
var list: std.ArrayList(u8) = .empty;
~^~~~~
Zig 0.15.2
src/antd.zig:102:25: error: no field or member function named 'open' in 'http.Client'
var req = client.open(method, uri, .{
~~~~~~^~~~~
Suggested fix
Pin to a single supported Zig version and audit the source for that target. Most likely Zig 0.14.x (the documented minimum) — that requires reverting the .empty initializers back to std.ArrayList(u8).init(allocator) (or equivalent). All std.ArrayList callsites in src/json_helpers.zig use the .empty form, so this is a sweep of a single file.
Alternatively: bump minimum_zig_version to 0.15.x and replace the http.Client.open calls with the new API (std.http.Client.request / similar) — bigger surface.
Adjacent
Also flagged in #70 (the arity-mismatch fix): the arity bug in 02-data.zig and 06-private-data.zig is real and type-correct, but I can't verify execution end-to-end here because of this compile error. The PR for #70 is still correct on the call-site shape; #70 should not block on this.
Environment
- Tried with both Zig 0.14.1 and 0.15.2, installed via
mise
- antd-zig at
main (today's clone), Ubuntu 24.04 LXC
Found while landing the arity fix from #70.
Bug
antd-zig/src/can't be built against any released Zig (0.14.x or 0.15.x). The source mixes APIs that don't co-exist in any tagged release:std.ArrayList(u8) = .emptyinitializer — introduced in Zig 0.15-dev (not present in 0.14.x).client.open(method, uri, .{ ... })onstd.http.Client— present in 0.14.x, removed/renamed in 0.15.x.build.zig.zondeclaresminimum_zig_version = "0.14.0", but neither 0.14.x nor 0.15.x can satisfy both calls.Reproductions
Zig 0.14.1
Zig 0.15.2
Suggested fix
Pin to a single supported Zig version and audit the source for that target. Most likely Zig 0.14.x (the documented minimum) — that requires reverting the
.emptyinitializers back tostd.ArrayList(u8).init(allocator)(or equivalent). Allstd.ArrayListcallsites insrc/json_helpers.ziguse the.emptyform, so this is a sweep of a single file.Alternatively: bump
minimum_zig_versionto0.15.xand replace thehttp.Client.opencalls with the new API (std.http.Client.request/ similar) — bigger surface.Adjacent
Also flagged in #70 (the arity-mismatch fix): the arity bug in
02-data.zigand06-private-data.zigis real and type-correct, but I can't verify execution end-to-end here because of this compile error. The PR for #70 is still correct on the call-site shape; #70 should not block on this.Environment
misemain(today's clone), Ubuntu 24.04 LXCFound while landing the arity fix from #70.