authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-20 13:36:12 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-20 13:36:12 -08:00
log2aa95da7dbd0f9b23fb6e99935882b02394016b2
treef4f7072861e0296946eac9a30fcf890fbd1bd8fa
parentc5ef44d0423dedd88992dae7acc152fe6f3de7b1

put /deps and /v at top level of module cache


1 files changed, 2 insertions(+), 2 deletions(-)

src/cmd_fetch.zig+2-2
...@@ -23,7 +23,7 @@ pub fn execute(args: [][]u8) !void {...@@ -23,7 +23,7 @@ pub fn execute(args: [][]u8) !void {
23 try w.print("const build = std.build;\n", .{});23 try w.print("const build = std.build;\n", .{});
24 try w.print("\n", .{});24 try w.print("\n", .{});
25 try w.print("const home = \"{}\";\n", .{home});25 try w.print("const home = \"{}\";\n", .{home});
26 try w.print("const cache = home ++ \"/.cache/zigmod/deps\";\n", .{});26 try w.print("const cache = home ++ \"/.cache/zigmod\";\n", .{});
27 try w.print("\n", .{});27 try w.print("\n", .{});
28 try w.print("{}\n", .{28 try w.print("{}\n", .{
29 \\pub fn addAllTo(exe: *build.LibExeObjStep) void {29 \\pub fn addAllTo(exe: *build.LibExeObjStep) void {
...@@ -63,7 +63,7 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module {...@@ -63,7 +63,7 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module {
63 const m = try u.ModFile.init(gpa, mpath);63 const m = try u.ModFile.init(gpa, mpath);
64 const moduledeps = &std.ArrayList(u.Module).init(gpa);64 const moduledeps = &std.ArrayList(u.Module).init(gpa);
65 for (m.deps) |d| {65 for (m.deps) |d| {
66 const p = try u.concat(&[_][]const u8{dir, "/", try d.clean_path()});66 const p = try u.concat(&[_][]const u8{dir, "/deps/", try d.clean_path()});
67 const pv = try u.concat(&[_][]const u8{dir, "/v/", try d.clean_path(), "/", d.version});67 const pv = try u.concat(&[_][]const u8{dir, "/v/", try d.clean_path(), "/", d.version});
68 u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path});68 u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path});
69 switch (d.type) {69 switch (d.type) {