| author | |
| committer | |
| log | 974ee20698d91b7b2f9cad2e6119e10ebdc26be0 |
| tree | 89980f2c9e848982d4e6dd83b286863b15530488 |
| parent | b1ae787068abcd16df20c7cbe9832f344e45fe94 |
2 files changed, 8 insertions(+), 1 deletions(-)
src/cmd_fetch.zig+1-1| ... | ... | @@ -78,7 +78,7 @@ fn fetch_deps(dir: []const u8, mpath: []const u8) anyerror!u.Module { |
| 78 | 78 | var moddir: []const u8 = undefined; |
| 79 | 79 | for (m.deps) |d| { |
| 80 | 80 | const p = try fs.path.join(gpa, &[_][]const u8{dir, try d.clean_path()}); |
| 81 | const pv = try fs.path.join(gpa, &[_][]const u8{dir, "v", try d.clean_path(), d.version}); | |
| 81 | const pv = try fs.path.join(gpa, &[_][]const u8{dir, try d.clean_path_v()}); | |
| 82 | 82 | u.print("fetch: {}: {}: {}", .{m.name, @tagName(d.type), d.path}); |
| 83 | 83 | moddir = p; |
| 84 | 84 | switch (d.type) { |
src/util/dep.zig+7| ... | ... | @@ -32,6 +32,13 @@ pub const Dep = struct { |
| 32 | 32 | return p; |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | pub fn clean_path_v(self: Dep) ![]const u8 { | |
| 36 | if (self.type == .http and self.version.len > 0) { | |
| 37 | return std.fs.path.join(gpa, &[_][]const u8{"v", @tagName(self.type), self.version}); | |
| 38 | } | |
| 39 | return std.fs.path.join(gpa, &[_][]const u8{"v", try self.clean_path(), self.version}); | |
| 40 | } | |
| 41 | ||
| 35 | 42 | pub fn is_for_this(self: Dep) bool { |
| 36 | 43 | const os = @tagName(builtin.os.tag); |
| 37 | 44 | if (self.only_os.len > 0) { |