authorgravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 12:42:21 -08:00
committergravatar for hello@nektro.netMeghan <hello@nektro.net> 2020-11-28 12:42:21 -08:00
logc7650267c0dbc69dcd61fd8a0d922e1dcba818dd
tree609f1cec133fbeb5c15f846ad3b33baef2945aa4
parentdaf19da2600d7f96516def657b5ca04e6c74e0aa

switch back to using deps folder


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

src/cmd_fetch.zig+3-3
......@@ -10,7 +10,7 @@ const u = @import("./util/index.zig");
1010pub fn execute(args: [][]u8) !void {
1111 //
1212 const home = try known_folders.getPath(gpa, .home);
13 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod"});
13 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod", "deps"});
1414
1515 const top_module = try fetch_deps(dir, "./zig.mod");
1616
......@@ -23,7 +23,7 @@ pub fn execute(args: [][]u8) !void {
2323 try w.print("const build = std.build;\n", .{});
2424 try w.print("\n", .{});
2525 try w.print("const home = \"{}\";\n", .{home});
26 try w.print("const cache = home ++ \"/.cache/zigmod\";\n", .{});
26 try w.print("const cache = home ++ \"/.cache/zigmod/deps\";\n", .{});
2727 try w.print("\n", .{});
2828 try w.print("{}\n", .{
2929 \\pub fn addAllTo(exe: *build.LibExeObjStep) void {
......@@ -64,7 +64,7 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module {
6464 const moduledeps = &std.ArrayList(u.Module).init(gpa);
6565 var moddir: []const u8 = undefined;
6666 for (m.deps) |d| {
67 const p = try u.concat(&[_][]const u8{dir, "/deps/", try d.clean_path()});
67 const p = try u.concat(&[_][]const u8{dir, "/", try d.clean_path()});
6868 const pv = try u.concat(&[_][]const u8{dir, "/v/", try d.clean_path(), "/", d.version});
6969 u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path});
7070 moddir = p;
src/cmd_sum.zig+1-1
......@@ -11,7 +11,7 @@ const common = @import("./common.zig");
1111pub fn execute(args: [][]u8) !void {
1212 //
1313 const home = try known_folders.getPath(gpa, .home);
14 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod"});
14 const dir = try std.fs.path.join(gpa, &[_][]const u8{home.?, ".cache", "zigmod", "deps"});
1515 const top_module = try common.collect_deps(dir, "./zig.mod");
1616
1717 //