diff --git a/lib/compiler/Maker/Watch.zig b/lib/compiler/Maker/Watch.zig index 05dace418b062c5d464758040543705b5c1f80d0..36eefcbaafd5810daaff591589cb54051c61964c 100644 --- a/lib/compiler/Maker/Watch.zig +++ b/lib/compiler/Maker/Watch.zig @@ -695,9 +695,11 @@ const Os = switch (builtin.os.tag) { } fn update(w: *Watch, steps: []const Configuration.Step.Index) !void { - const gpa = w.maker.gpa; + const maker = w.maker; + const gpa = maker.gpa; const handles = &w.os.handles; - for (steps) |step| { + for (steps) |step_index| { + const step = maker.stepByIndex(step_index); for (step.inputs.table.keys(), step.inputs.table.values()) |path, *files| { const reaction_set = rs: { const gop = try w.dir_table.getOrPut(gpa, path); @@ -732,7 +734,7 @@ const Os = switch (builtin.os.tag) { for (files.items) |basename| { const gop = try reaction_set.getOrPut(gpa, basename); if (!gop.found_existing) gop.value_ptr.* = .{}; - try gop.value_ptr.put(gpa, step, w.generation); + try gop.value_ptr.put(gpa, step_index, w.generation); } } }