| ... | ... | @@ -36,7 +36,7 @@ pub fn collect_deps_deep(cachepath: string, mdir: std.fs.Dir, options: *CollectO |
| 36 | 36 | if (m.root_files.len > 0) { |
| 37 | 37 | try moduledeps.append(try add_files_package(options.alloc, cachepath, "root", mdir, m.root_files)); |
| 38 | 38 | } |
| 39 | | try moduledeps.append(try collect_deps(cachepath, mdir, options)); |
| 39 | try moduledeps.append(try collect_deps(cachepath, mdir, .local, options)); |
| 40 | 40 | for (m.rootdeps) |*d| { |
| 41 | 41 | if (try get_module_from_dep(d, cachepath, options)) |founddep| { |
| 42 | 42 | try moduledeps.append(founddep); |
| ... | ... | @@ -61,7 +61,7 @@ pub fn collect_deps_deep(cachepath: string, mdir: std.fs.Dir, options: *CollectO |
| 61 | 61 | }; |
| 62 | 62 | } |
| 63 | 63 | |
| 64 | | pub fn collect_deps(cachepath: string, mdir: std.fs.Dir, options: *CollectOptions) anyerror!zigmod.Module { |
| 64 | pub fn collect_deps(cachepath: string, mdir: std.fs.Dir, dtype: zigmod.Dep.Type, options: *CollectOptions) anyerror!zigmod.Module { |
| 65 | 65 | try std.fs.cwd().makePath(cachepath); |
| 66 | 66 | |
| 67 | 67 | const m = try zigmod.ModFile.from_dir(options.alloc, mdir); |
| ... | ... | @@ -76,7 +76,7 @@ pub fn collect_deps(cachepath: string, mdir: std.fs.Dir, options: *CollectOption |
| 76 | 76 | } |
| 77 | 77 | } |
| 78 | 78 | return zigmod.Module{ |
| 79 | | .type = .local, |
| 79 | .type = dtype, |
| 80 | 80 | .id = m.id, |
| 81 | 81 | .name = m.name, |
| 82 | 82 | .main = m.main, |
| ... | ... | @@ -243,7 +243,7 @@ pub fn get_module_from_dep(d: *zigmod.Dep, cachepath: string, options: *CollectO |
| 243 | 243 | }; |
| 244 | 244 | }, |
| 245 | 245 | else => { |
| 246 | | var dd = try collect_deps(cachepath, moddir, options) catch |e| switch (e) { |
| 246 | var dd = try collect_deps(cachepath, moddir, d.type, options) catch |e| switch (e) { |
| 247 | 247 | error.ManifestNotFound => { |
| 248 | 248 | if (d.main.len > 0 or d.c_include_dirs.len > 0 or d.c_source_files.len > 0 or d.keep) { |
| 249 | 249 | var mod_from = try zigmod.Module.from(options.alloc, d.*, modpath, options); |