diff --git a/src/common.zig b/src/common.zig index 693c46228b4eefd6c354cfae2475c774bb46621a..d25388e95ce4f0d846461c2caed2366d3e7066e8 100644 --- a/src/common.zig +++ b/src/common.zig @@ -330,6 +330,7 @@ pub fn add_files_package(alloc: std.mem.Allocator, cachepath: string, pkg_name: .version = "absolute", .yaml = null, .deps = &.{}, + .parent_id = "TODO-1", }; var options = CollectOptions{ .log = false, @@ -374,6 +375,7 @@ pub fn parse_lockfile(alloc: std.mem.Allocator, dir: std.fs.Dir) ![]const [4]str .main = "", .yaml = null, .deps = &.{}, + .parent_id = "", }; try list.append([4]string{ try asdep.clean_path(alloc), diff --git a/src/util/dep.zig b/src/util/dep.zig index e9dcf85c2a413508a73a3114b0598a44bc6bb970..7a9ba83f0c4834ca7d99e162dfcb787c23639395 100644 --- a/src/util/dep.zig +++ b/src/util/dep.zig @@ -29,6 +29,7 @@ pub const Dep = struct { keep: bool = false, vcpkg: bool = false, for_build: bool = false, + parent_id: string, pub const Type = @import("./dep_type.zig").DepType; diff --git a/src/util/modfile.zig b/src/util/modfile.zig index fdefb1430f0238443cfbe5607b98b5534ca61b91..b28eef368c2fc1eb566b1fbd784008b3f67b5702 100644 --- a/src/util/modfile.zig +++ b/src/util/modfile.zig @@ -139,6 +139,7 @@ pub const ModFile = struct { .keep = std.mem.eql(u8, "true", item.mapping.get_string("keep") orelse ""), .vcpkg = std.mem.eql(u8, "true", item.mapping.get_string("vcpkg") orelse ""), .for_build = for_build, + .parent_id = mapping.get_string("id") orelse "", }); } }