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:...@@ -330,6 +330,7 @@ pub fn add_files_package(alloc: std.mem.Allocator, cachepath: string, pkg_name:
330 .version = "absolute",330 .version = "absolute",
331 .yaml = null,331 .yaml = null,
332 .deps = &.{},332 .deps = &.{},
333 .parent_id = "TODO-1",
333 };334 };
334 var options = CollectOptions{335 var options = CollectOptions{
335 .log = false,336 .log = false,
...@@ -374,6 +375,7 @@ pub fn parse_lockfile(alloc: std.mem.Allocator, dir: std.fs.Dir) ![]const [4]str...@@ -374,6 +375,7 @@ pub fn parse_lockfile(alloc: std.mem.Allocator, dir: std.fs.Dir) ![]const [4]str
374 .main = "",375 .main = "",
375 .yaml = null,376 .yaml = null,
376 .deps = &.{},377 .deps = &.{},
378 .parent_id = "",
377 };379 };
378 try list.append([4]string{380 try list.append([4]string{
379 try asdep.clean_path(alloc),381 try asdep.clean_path(alloc),
src/util/dep.zig+1
...@@ -29,6 +29,7 @@ pub const Dep = struct {...@@ -29,6 +29,7 @@ pub const Dep = struct {
29 keep: bool = false,29 keep: bool = false,
30 vcpkg: bool = false,30 vcpkg: bool = false,
31 for_build: bool = false,31 for_build: bool = false,
32 parent_id: string,
3233
33 pub const Type = @import("./dep_type.zig").DepType;34 pub const Type = @import("./dep_type.zig").DepType;
3435
src/util/modfile.zig+1
...@@ -139,6 +139,7 @@ pub const ModFile = struct {...@@ -139,6 +139,7 @@ pub const ModFile = struct {
139 .keep = std.mem.eql(u8, "true", item.mapping.get_string("keep") orelse ""),139 .keep = std.mem.eql(u8, "true", item.mapping.get_string("keep") orelse ""),
140 .vcpkg = std.mem.eql(u8, "true", item.mapping.get_string("vcpkg") orelse ""),140 .vcpkg = std.mem.eql(u8, "true", item.mapping.get_string("vcpkg") orelse ""),
141 .for_build = for_build,141 .for_build = for_build,
142 .parent_id = mapping.get_string("id") orelse "",
142 });143 });
143 }144 }
144 }145 }