authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-10 01:28:51 -07:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2023-08-10 01:28:51 -07:00
log509b9b73990381e089fcd657bf83dc9d1b111371
treeca5e49676b35715e6a53c67533377d59a3df6349
parent50ccfe3d1d84b4f27a4bb66fd4321623663a0163

deps: nektro/zig-yaml: update to latest


4 files changed, 17 insertions(+), 17 deletions(-)

deps.zig+3-3
......@@ -67,8 +67,8 @@ pub fn fetch(exe: *std.build.LibExeObjStep) void {
6767 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses", "c9b8cbf3565675a056ad4e9b57cb4f84020e7680").step);
6868 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-licenses-text", "3c07c6e4eb0965dafd0b029c632f823631b3169c").step);
6969 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-range", "4b2f12808aa09be4b27a163efc424dd4e0415992").step);
70 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9").step);
7170 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-time", "12fad367a5282827aad7e12f0e9cd36f672c4010").step);
71 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/nektro/zig-yaml", "0d17fb99cba338aedc1abac12d78d5e5f04f0b6b").step);
7272 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/truemedian/hzzp", "305aca97fce78eb3e787d57691a5eed5512bece7").step);
7373 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/ziglibs/known-folders", "fa75e1bc672952efa0cf06160bbd942b47f6d59b").step);
7474 exe.step.dependOn(&GitExactStep.create(b, "https://github.com/yaml/libyaml", "2c891fc7a770e8ba2fec34fc6b545c672beb37e6").step);
......@@ -227,9 +227,9 @@ pub const package_data = struct {
227227 .deps = &[_]*Package{ &_f7dubzb7cyqe },
228228 };
229229 pub var _g982zq6e8wsv = Package{
230 .store = "/git/github.com/nektro/zig-yaml/e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9",
230 .store = "/git/github.com/nektro/zig-yaml/0d17fb99cba338aedc1abac12d78d5e5f04f0b6b",
231231 .name = "yaml",
232 .entry = "/git/github.com/nektro/zig-yaml/e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9/yaml.zig",
232 .entry = "/git/github.com/nektro/zig-yaml/0d17fb99cba338aedc1abac12d78d5e5f04f0b6b/yaml.zig",
233233 .deps = &[_]*Package{ &_f7dubzb7cyqe },
234234 };
235235 pub var _9k24gimke1an = Package{
src/cmd/license.zig+1-1
......@@ -54,7 +54,7 @@ pub fn do(cachepath: string, dir: std.fs.Dir, options: *common.CollectOptions, o
5454 try unspecified_list.append(item);
5555 continue;
5656 }
57 const license_code = item.yaml.?.get_string("license");
57 const license_code = item.yaml.?.get_string("license") orelse "";
5858 if (license_code.len == 0) {
5959 try unspecified_list.append(item);
6060 continue;
src/util/modfile.zig+12-12
......@@ -53,9 +53,9 @@ pub const ModFile = struct {
5353 }
5454
5555 pub fn from_mapping(alloc: std.mem.Allocator, mapping: yaml.Mapping) !Self {
56 const id = mapping.get_string("id");
57 const name = mapping.get("name").?.string;
58 const main = mapping.get_string("main");
56 const id = mapping.get_string("id") orelse "";
57 const name = mapping.get_string("name") orelse "";
58 const main = mapping.get_string("main") orelse "";
5959
6060 if (std.mem.indexOf(u8, name, "/")) |_| {
6161 u.fail("name may not contain any '/'", .{});
......@@ -74,8 +74,8 @@ pub const ModFile = struct {
7474 .files = try mapping.get_string_array(alloc, "files"),
7575 .rootdeps = try dep_list_by_name(alloc, mapping, &.{ "dev_dependencies", "root_dependencies" }, false),
7676 .builddeps = try dep_list_by_name(alloc, mapping, &.{ "dev_dependencies", "build_dependencies" }, true),
77 .min_zig_version = std.SemanticVersion.parse(mapping.get_string("min_zig_version")) catch null,
78 .vcpkg = std.mem.eql(u8, "true", mapping.get_string("vcpkg")),
77 .min_zig_version = std.SemanticVersion.parse(mapping.get_string("min_zig_version") orelse "") catch null,
78 .vcpkg = std.mem.eql(u8, "true", mapping.get_string("vcpkg") orelse ""),
7979 };
8080 }
8181
......@@ -90,8 +90,8 @@ pub const ModFile = struct {
9090 var dtype: string = undefined;
9191 var path: string = undefined;
9292 var version: ?string = null;
93 var name = item.mapping.get_string("name");
94 var main = item.mapping.get_string("main");
93 var name = item.mapping.get_string("name") orelse "";
94 var main = item.mapping.get_string("main") orelse "";
9595
9696 if (item.mapping.get("src")) |val| {
9797 var src_iter = std.mem.tokenize(u8, val.string, " ");
......@@ -125,19 +125,19 @@ pub const ModFile = struct {
125125 try dep_list.append(zigmod.Dep{
126126 .type = dep_type,
127127 .path = path,
128 .id = item.mapping.get_string("id"),
128 .id = item.mapping.get_string("id") orelse "",
129129 .name = name,
130130 .main = main,
131131 .version = version.?,
132132 .c_include_dirs = try item.mapping.get_string_array(alloc, "c_include_dirs"),
133133 .c_source_flags = try item.mapping.get_string_array(alloc, "c_source_flags"),
134134 .c_source_files = try item.mapping.get_string_array(alloc, "c_source_files"),
135 .only_os = try u.list_remove(alloc, try u.split(alloc, item.mapping.get_string("only_os"), ","), ""),
136 .except_os = try u.list_remove(alloc, try u.split(alloc, item.mapping.get_string("except_os"), ","), ""),
135 .only_os = try u.list_remove(alloc, try u.split(alloc, item.mapping.get_string("only_os") orelse "", ","), ""),
136 .except_os = try u.list_remove(alloc, try u.split(alloc, item.mapping.get_string("except_os") orelse "", ","), ""),
137137 .yaml = item.mapping,
138138 .deps = try dep_list_by_name(alloc, item.mapping, &.{"dependencies"}, for_build),
139 .keep = std.mem.eql(u8, "true", item.mapping.get_string("keep")),
140 .vcpkg = std.mem.eql(u8, "true", item.mapping.get_string("vcpkg")),
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 ""),
141141 .for_build = for_build,
142142 });
143143 }
zigmod.lock+1-1
......@@ -12,7 +12,7 @@ git https://github.com/nektro/zig-licenses commit-c9b8cbf3565675a056ad4e9b57cb4f
1212git https://github.com/nektro/zig-licenses-text commit-3c07c6e4eb0965dafd0b029c632f823631b3169c
1313git https://github.com/nektro/zig-range commit-4b2f12808aa09be4b27a163efc424dd4e0415992
1414git https://github.com/nektro/zig-time commit-12fad367a5282827aad7e12f0e9cd36f672c4010
15git https://github.com/nektro/zig-yaml commit-e56b9fed6c0afd1c4d29bedc08c3899ffe1165e9
15git https://github.com/nektro/zig-yaml commit-0d17fb99cba338aedc1abac12d78d5e5f04f0b6b
1616git https://github.com/truemedian/hzzp commit-305aca97fce78eb3e787d57691a5eed5512bece7
1717git https://github.com/ziglibs/known-folders commit-fa75e1bc672952efa0cf06160bbd942b47f6d59b
1818git https://github.com/yaml/libyaml tag-0.2.5