authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-20 20:08:28-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-05-25 18:54:36-07:00
log4cbc03dce31b63818da1fb47f959b70708683443
tree574bac749feeb3fc2ddb1a75f7f99b86390ec766
parentdf92898ec3f805112150ee4b40e0d02b763524bb

Maker: we don't actually need to scan the modules


2 files changed, 0 insertions(+), 20 deletions(-)

lib/compiler/Maker.zig-6
......@@ -427,7 +427,6 @@ pub fn main(init: process.Init.Minimal) !void {
427427 };
428428 const c = &configuration;
429429 var top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index) = .empty;
430 var modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void) = .empty;
431430 for (configuration.steps, 0..) |*conf_step, step_index_usize| {
432431 if (conf_step.owner != .root) continue;
433432 const step_index: Configuration.Step.Index = @enumFromInt(step_index_usize);
......@@ -437,10 +436,6 @@ pub fn main(init: process.Init.Minimal) !void {
437436 const name = step_index.ptr(c).name.slice(c);
438437 try top_level_steps.put(arena, name, step_index);
439438 },
440 .compile => {
441 const root_module = step_index.ptr(c).extended.get(configuration.extra).compile.root_module;
442 try modules.put(arena, root_module, {});
443 },
444439 else => {},
445440 }
446441 }
......@@ -450,7 +445,6 @@ pub fn main(init: process.Init.Minimal) !void {
450445 break :sc .{
451446 .configuration = configuration,
452447 .top_level_steps = top_level_steps,
453 .modules = modules,
454448 };
455449 };
456450
lib/compiler/Maker/ScannedConfig.zig-14
......@@ -9,7 +9,6 @@ const Graph = @import("Graph.zig");
99
1010configuration: Configuration,
1111top_level_steps: std.StringArrayHashMapUnmanaged(Configuration.Step.Index),
12modules: std.AutoArrayHashMapUnmanaged(Configuration.Module.Index, void),
1312
1413pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void {
1514 std.log.err("TODO also print paths", .{});
......@@ -45,19 +44,6 @@ pub fn print(sc: *const ScannedConfig, w: *Writer) Writer.Error!void {
4544 try tf.end();
4645 }
4746
48 {
49 var sf = try s.beginStructField("modules", .{});
50
51 for (sc.modules.keys()) |module_index| {
52 var int_buf: [50]u8 = undefined;
53 const int_str = std.fmt.bufPrint(&int_buf, "{d}", .{module_index}) catch unreachable;
54 var step_field = try sf.beginStructField(int_str, .{});
55 try printStruct(sc, &step_field, Configuration.Module, module_index.get(c));
56 try step_field.end();
57 }
58 try sf.end();
59 }
60
6147 try s.end();
6248}
6349