authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-02-20 19:07:00 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-02-20 19:07:00 -08:00
log1ea33bafa65492da2de36b8e1c93a430c4c484c3
tree7e2ed7f59bd0f06db022745b9a90e1a58f387541
parenta415232267fb19aa7212b8fadb135d0e5e8cb535

modfile- grab id from deps


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

src/common.zig+1-1
......@@ -118,7 +118,7 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec
118118 error.FileNotFound => {
119119 if (d.main.len > 0 or d.c_include_dirs.len > 0 or d.c_source_files.len > 0) {
120120 var mod_from = try u.Module.from(d);
121 mod_from.id = try u.random_string(48);
121 if (mod_from.id.len == 0) mod_from.id = try u.random_string(48);
122122 mod_from.clean_path = u.trim_prefix(moddir, dir)[1..];
123123 if (mod_from.is_for_this()) try moduledeps.append(mod_from);
124124 }
src/util/modfile.zig+1-1
......@@ -54,7 +54,7 @@ pub const ModFile = struct {
5454 try dep_list.append(u.Dep{
5555 .type = dep_type,
5656 .path = path,
57 .id = "",
57 .id = item.mapping.get_string("id"),
5858 .name = item.mapping.get_string("name"),
5959 .main = item.mapping.get_string("main"),
6060 .version = item.mapping.get_string("version"),