authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-06 11:03:15 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-07-06 11:03:15 -07:00
log9f80f414a25e5abce9993b6f88efb2d0ca1da751
tree52e187b15fcaa336bede6ddfa79165729a8a16d1
parent292acfc7a2d4f279b380cd1544d8b3beab0fe99b

cmd/fetch- dont add local type deps to lockfile


1 files changed, 3 insertions(+), 0 deletions(-)

src/cmd/fetch.zig+3
...@@ -118,6 +118,9 @@ fn create_lockfile(list: *std.ArrayList(u.Module), dir: []const u8) !void {...@@ -118,6 +118,9 @@ fn create_lockfile(list: *std.ArrayList(u.Module), dir: []const u8) !void {
118 const wl = fl.writer();118 const wl = fl.writer();
119 for (list.items) |m| {119 for (list.items) |m| {
120 if (m.dep) |md| {120 if (m.dep) |md| {
121 if (md.type == .local) {
122 continue;
123 }
121 const mpath = try std.fs.path.join(gpa, &.{ dir, m.clean_path });124 const mpath = try std.fs.path.join(gpa, &.{ dir, m.clean_path });
122 const version = if (md.version.len > 0) md.version else (try md.type.exact_version(mpath));125 const version = if (md.version.len > 0) md.version else (try md.type.exact_version(mpath));
123 try wl.print("{s} {s} {s} {s}\n", .{ m.clean_path, @tagName(md.type), md.path, version });126 try wl.print("{s} {s} {s} {s}\n", .{ m.clean_path, @tagName(md.type), md.path, version });