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...@@ -118,7 +118,7 @@ pub fn collect_deps(dir: []const u8, mpath: []const u8, comptime options: Collec
118 error.FileNotFound => {118 error.FileNotFound => {
119 if (d.main.len > 0 or d.c_include_dirs.len > 0 or d.c_source_files.len > 0) {119 if (d.main.len > 0 or d.c_include_dirs.len > 0 or d.c_source_files.len > 0) {
120 var mod_from = try u.Module.from(d);120 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);
122 mod_from.clean_path = u.trim_prefix(moddir, dir)[1..];122 mod_from.clean_path = u.trim_prefix(moddir, dir)[1..];
123 if (mod_from.is_for_this()) try moduledeps.append(mod_from);123 if (mod_from.is_for_this()) try moduledeps.append(mod_from);
124 }124 }
src/util/modfile.zig+1-1
...@@ -54,7 +54,7 @@ pub const ModFile = struct {...@@ -54,7 +54,7 @@ pub const ModFile = struct {
54 try dep_list.append(u.Dep{54 try dep_list.append(u.Dep{
55 .type = dep_type,55 .type = dep_type,
56 .path = path,56 .path = path,
57 .id = "",57 .id = item.mapping.get_string("id"),
58 .name = item.mapping.get_string("name"),58 .name = item.mapping.get_string("name"),
59 .main = item.mapping.get_string("main"),59 .main = item.mapping.get_string("main"),
60 .version = item.mapping.get_string("version"),60 .version = item.mapping.get_string("version"),