authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-14 14:37:56 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-14 14:37:56 -07:00
log62a4e5c6d539e1d41a66077fd5203aa76a8ccb34
treeda67c47ffdde0e19cbd8179c6a2c6eec24e80372
parent8d1c6c7f6b73954123a448184f19c464fbe3b71f

add Dep.parent_id field


3 files changed, 4 insertions(+), 0 deletions(-)

src/common.zig+2
......@@ -330,6 +330,7 @@ pub fn add_files_package(alloc: std.mem.Allocator, cachepath: string, pkg_name:
330330 .version = "absolute",
331331 .yaml = null,
332332 .deps = &.{},
333 .parent_id = "TODO-1",
333334 };
334335 var options = CollectOptions{
335336 .log = false,
......@@ -374,6 +375,7 @@ pub fn parse_lockfile(alloc: std.mem.Allocator, dir: std.fs.Dir) ![]const [4]str
374375 .main = "",
375376 .yaml = null,
376377 .deps = &.{},
378 .parent_id = "",
377379 };
378380 try list.append([4]string{
379381 try asdep.clean_path(alloc),
src/util/dep.zig+1
......@@ -29,6 +29,7 @@ pub const Dep = struct {
2929 keep: bool = false,
3030 vcpkg: bool = false,
3131 for_build: bool = false,
32 parent_id: string,
3233
3334 pub const Type = @import("./dep_type.zig").DepType;
3435
src/util/modfile.zig+1
......@@ -139,6 +139,7 @@ pub const ModFile = struct {
139139 .keep = std.mem.eql(u8, "true", item.mapping.get_string("keep") orelse ""),
140140 .vcpkg = std.mem.eql(u8, "true", item.mapping.get_string("vcpkg") orelse ""),
141141 .for_build = for_build,
142 .parent_id = mapping.get_string("id") orelse "",
142143 });
143144 }
144145 }