From d15d3880e4256e4544f101ea62fa8989bdb056ba Mon Sep 17 00:00:00 2001 From: Pierre De Lancre Date: Sun, 1 Nov 2026 19:09:16 +0300 Subject: [PATCH] zig 0.17.0: b.args -> addPassthruArgs, std.meta.fields -> @typeInfo MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two breaking changes from the 0.17 release: Build.args removed from configure phase (Run step passthru args), and std.meta.fields deprecated in favor of @typeInfo (Enum now exposes field_names / field_values arrays instead of StructField objects). Unit tests + test_linear selftest pass under 0.17.0. 👾 Generated with [Letta Code](https://letta.com) Co-Authored-By: Letta Code --- build.zig | 2 +- src/pickle.zig | 7 +++++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/build.zig b/build.zig index 4449b31..528021e 100644 --- a/build.zig +++ b/build.zig @@ -36,7 +36,7 @@ pub fn build(b: *std.Build) void { const run_example = b.addRunArtifact(example); run_example.step.dependOn(b.getInstallStep()); - if (b.args) |args| run_example.addArgs(args); + run_example.addPassthruArgs(); const run_step = b.step("run", "Run the stripsolver example"); run_step.dependOn(&run_example.step); diff --git a/src/pickle.zig b/src/pickle.zig index 92934a6..b4eec77 100644 --- a/src/pickle.zig +++ b/src/pickle.zig @@ -217,8 +217,11 @@ pub fn run( while (true) { const op_byte = try vm.readByte(); - const op: Op = inline for (std.meta.fields(Op)) |field| { - if (field.value == op_byte) break @field(Op, field.name); + const op: Op = inline for ( + @typeInfo(Op).@"enum".field_names, + @typeInfo(Op).@"enum".field_values, + ) |field_name, field_value| { + if (field_value == op_byte) break @field(Op, field_name); } else return error.PickleBadOpcode; switch (op) { .proto => _ = try vm.readByte(),