| ... | @@ -12,7 +12,7 @@ pub const CollectOptions = struct { | ... | @@ -12,7 +12,7 @@ pub const CollectOptions = struct { |
| 12 | update: bool, | 12 | update: bool, |
| 13 | }; | 13 | }; |
| 14 | | 14 | |
| 15 | pub fn collect_deps_deep(dir: []const u8, mpath: []const u8, comptime options: CollectOptions) !u.Module { | 15 | pub fn collect_deps_deep(dir: []const u8, mpath: []const u8, options: CollectOptions) !u.Module { |
| 16 | const m = try u.ModFile.init(gpa, mpath); | 16 | const m = try u.ModFile.init(gpa, mpath); |
| 17 | const moduledeps = &std.ArrayList(u.Module).init(gpa); | 17 | const moduledeps = &std.ArrayList(u.Module).init(gpa); |
| 18 | try moduledeps.append(try collect_deps(dir, mpath, options)); | 18 | try moduledeps.append(try collect_deps(dir, mpath, options)); |
| ... | @@ -35,7 +35,7 @@ pub fn collect_deps_deep(dir: []const u8, mpath: []const u8, comptime options: C | ... | @@ -35,7 +35,7 @@ pub fn collect_deps_deep(dir: []const u8, mpath: []const u8, comptime options: C |
| 35 | }; | 35 | }; |
| 36 | } | 36 | } |
| 37 | | 37 | |
| 38 | pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: CollectOptions) anyerror!u.Module { | 38 | pub fn collect_deps(dir: []const u8, mpath: []const u8, options: CollectOptions) anyerror!u.Module { |
| 39 | const m = try u.ModFile.init(gpa, mpath); | 39 | const m = try u.ModFile.init(gpa, mpath); |
| 40 | const moduledeps = &std.ArrayList(u.Module).init(gpa); | 40 | const moduledeps = &std.ArrayList(u.Module).init(gpa); |
| 41 | for (m.deps) |d| { | 41 | for (m.deps) |d| { |
| ... | @@ -67,7 +67,7 @@ pub fn collect_pkgs(mod: u.Module, list: *std.ArrayList(u.Module)) anyerror!void | ... | @@ -67,7 +67,7 @@ pub fn collect_pkgs(mod: u.Module, list: *std.ArrayList(u.Module)) anyerror!void |
| 67 | } | 67 | } |
| 68 | } | 68 | } |
| 69 | | 69 | |
| 70 | fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, comptime options: CollectOptions) ![]const u8 { | 70 | fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, options: CollectOptions) ![]const u8 { |
| 71 | const p = try fs.path.join(gpa, &.{ basedir, try d.clean_path() }); | 71 | const p = try fs.path.join(gpa, &.{ basedir, try d.clean_path() }); |
| 72 | const pv = try fs.path.join(gpa, &.{ basedir, try d.clean_path_v() }); | 72 | const pv = try fs.path.join(gpa, &.{ basedir, try d.clean_path_v() }); |
| 73 | const tempdir = try fs.path.join(gpa, &.{ basedir, "temp" }); | 73 | const tempdir = try fs.path.join(gpa, &.{ basedir, "temp" }); |
| ... | @@ -159,7 +159,7 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, comptime o | ... | @@ -159,7 +159,7 @@ fn get_moddir(basedir: []const u8, d: u.Dep, parent_name: []const u8, comptime o |
| 159 | } | 159 | } |
| 160 | } | 160 | } |
| 161 | | 161 | |
| 162 | fn get_module_from_dep(list: *std.ArrayList(u.Module), d: u.Dep, dir: []const u8, parent_name: []const u8, comptime options: CollectOptions) !void { | 162 | fn get_module_from_dep(list: *std.ArrayList(u.Module), d: u.Dep, dir: []const u8, parent_name: []const u8, options: CollectOptions) !void { |
| 163 | const moddir = try get_moddir(dir, d, parent_name, options); | 163 | const moddir = try get_moddir(dir, d, parent_name, options); |
| 164 | switch (d.type) { | 164 | switch (d.type) { |
| 165 | .system_lib => { | 165 | .system_lib => { |