Skip to content

Commit

Permalink
Fix path from root issue in modules (thanks daremakemyday from Twitch…
Browse files Browse the repository at this point in the history
… :))
  • Loading branch information
SuperAuguste committed Mar 3, 2023
1 parent 3d59768 commit c6eab4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/special/build_runner.zig
Original file line number Diff line number Diff line change
Expand Up @@ -267,13 +267,15 @@ fn processModule(
if (std.mem.eql(u8, package.name, module.key_ptr.*)) return;
}

const builder = module.value_ptr.*.builder;

const maybe_path = switch (module.value_ptr.*.source_file) {
.path => |path| path,
.generated => |generated| generated.path,
};

if (maybe_path) |path| {
try packages.append(allocator, .{ .name = module.key_ptr.*, .path = path });
try packages.append(allocator, .{ .name = module.key_ptr.*, .path = builder.pathFromRoot(path) });
}

var deps_it = module.value_ptr.*.dependencies.iterator();
Expand Down

0 comments on commit c6eab4b

Please sign in to comment.