authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-08 12:33:35-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:35-07:00
logd45f792c91c9c43cf3dd228429205caab3a6f22d
tree4c2f18aeb7124d3caa4e31d7707d229915870f0e
parent1186a10d4e145f553a4b749042fcc02ba6efe18b

configurer: serialize Step.Fmt


2 files changed, 13 insertions(+), 3 deletions(-)

lib/compiler/configurer.zig+12-1
......@@ -889,7 +889,18 @@ fn serialize(b: *std.Build, wc: *Configuration.Wip, writer: *Io.Writer) !void {
889889 })));
890890 },
891891 .find_program => @panic("TODO"),
892 .fmt => @panic("TODO"),
892 .fmt => e: {
893 const sf: *Step.Fmt = @fieldParentPtr("step", step);
894 break :e @enumFromInt(try wc.addExtra(@as(Configuration.Step.Fmt, .{
895 .flags = .{
896 .paths = sf.paths.len != 0,
897 .exclude_paths = sf.exclude_paths.len != 0,
898 .check = sf.check,
899 },
900 .paths = .{ .slice = try s.initLazyPathList(sf.paths) },
901 .exclude_paths = .{ .slice = try s.initLazyPathList(sf.exclude_paths) },
902 })));
903 },
893904 .translate_c => @panic("TODO"),
894905 .write_file => e: {
895906 const wf: *Step.WriteFile = @fieldParentPtr("step", step);
lib/std/Build/Step/Fmt.zig+1-2
......@@ -26,8 +26,7 @@ pub const Options = struct {
2626
2727pub fn create(owner: *std.Build, options: Options) *Fmt {
2828 const graph = owner.graph;
29 const arena = graph.arena;
30 const fmt = arena.create(Fmt) catch @panic("OOM");
29 const fmt = graph.create(Fmt);
3130
3231 fmt.* = .{
3332 .step = .init(.{