| ... | @@ -108,7 +108,7 @@ pub fn get_modpath(cachepath: string, d: zigmod.Dep, options: *CollectOptions) ! | ... | @@ -108,7 +108,7 @@ pub fn get_modpath(cachepath: string, d: zigmod.Dep, options: *CollectOptions) ! |
| 108 | const p = try std.fs.path.join(options.alloc, &.{ cachepath, try d.clean_path() }); | 108 | const p = try std.fs.path.join(options.alloc, &.{ cachepath, try d.clean_path() }); |
| 109 | const pv = try std.fs.path.join(options.alloc, &.{ cachepath, try d.clean_path_v() }); | 109 | const pv = try std.fs.path.join(options.alloc, &.{ cachepath, try d.clean_path_v() }); |
| 110 | | 110 | |
| 111 | const nocache = d.type == .local or d.type == .system_lib; | 111 | const nocache = d.type.isLocal(); |
| 112 | if (!nocache and u.list_contains(options.already_fetched.items, p)) return p; | 112 | if (!nocache and u.list_contains(options.already_fetched.items, p)) return p; |
| 113 | if (!nocache and u.list_contains(options.already_fetched.items, pv)) return pv; | 113 | if (!nocache and u.list_contains(options.already_fetched.items, pv)) return pv; |
| 114 | | 114 | |
| ... | @@ -223,7 +223,7 @@ pub fn get_module_from_dep(d: *zigmod.Dep, cachepath: string, options: *CollectO | ... | @@ -223,7 +223,7 @@ pub fn get_module_from_dep(d: *zigmod.Dep, cachepath: string, options: *CollectO |
| 223 | const modpath = try get_modpath(cachepath, d.*, options); | 223 | const modpath = try get_modpath(cachepath, d.*, options); |
| 224 | const moddir = if (std.mem.eql(u8, modpath, "files") or modpath.len == 0) try std.fs.cwd().openDir(cachepath, .{}) else try std.fs.cwd().openDir(modpath, .{}); | 224 | const moddir = if (std.mem.eql(u8, modpath, "files") or modpath.len == 0) try std.fs.cwd().openDir(cachepath, .{}) else try std.fs.cwd().openDir(modpath, .{}); |
| 225 | | 225 | |
| 226 | const nocache = d.type == .local or d.type == .system_lib; | 226 | const nocache = d.type.isLocal(); |
| 227 | if (!nocache) try options.already_fetched.append(modpath); | 227 | if (!nocache) try options.already_fetched.append(modpath); |
| 228 | | 228 | |
| 229 | switch (d.type) { | 229 | switch (d.type) { |