authorgravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-03-02 17:13:42 -08:00
committergravatar for hello@nektro.netMeghan Denny <hello@nektro.net> 2021-03-02 17:13:42 -08:00
logf45dbf85435f6fc4557aecf575d0587c498fe20e
tree9174b648b4453160122b6da7785d2eab8a5c6c0d
parent7468b49d771010ac9ed02fcf6ca03069651342d5

update to zig master 0.8.0-dev.1385+3dd8396a5


6 files changed, 12 insertions(+), 13 deletions(-)

.circleci/config.yml+1-1
...@@ -15,7 +15,7 @@ jobs:...@@ -15,7 +15,7 @@ jobs:
15 - run: git submodule update --init --recursive15 - run: git submodule update --init --recursive
1616
17 - run: apt -y install xz-utils jq17 - run: apt -y install xz-utils jq
18 - run: ./download_zig.sh 0.8.0-dev.1158+0aef1faa818 - run: ./download_zig.sh 0.8.0-dev.1385+3dd8396a5
19 - run: zig version19 - run: zig version
20 - run: zig env20 - run: zig env
21 - run: zig build -Dbootstrap21 - run: zig build -Dbootstrap
README.md+1-2
...@@ -17,8 +17,7 @@ A package manager for the Zig programming language....@@ -17,8 +17,7 @@ A package manager for the Zig programming language.
17- https://github.com/nektro/zigmod/releases17- https://github.com/nektro/zigmod/releases
1818
19## Built With19## Built With
20- Zig master20- Zig master `0.8.0-dev.1385+3dd8396a5`
21- `0.8.0-dev.1158+0aef1faa8`
2221
23### Build from Source22### Build from Source
24Initially,23Initially,
docs/README.md+1-1
...@@ -8,7 +8,7 @@ You can learn more about Zig here:...@@ -8,7 +8,7 @@ You can learn more about Zig here:
88
9The rest of this documentation will assume you already have Zig installed.9The rest of this documentation will assume you already have Zig installed.
1010
11As Zig is still in development itself, if you plan to contribute to Zigmod you will need a master download of Zig. Those can be obtained from https://ziglang.org/download/#release-master. The most recent release Zigmod was verified to work with is `0.8.0-dev.1158+0aef1faa8`.11As Zig is still in development itself, if you plan to contribute to Zigmod you will need a master download of Zig. Those can be obtained from https://ziglang.org/download/#release-master. The most recent release Zigmod was verified to work with is `0.8.0-dev.1385+3dd8396a5`.
1212
13## Download13## Download
14You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source.14You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source.
src/cmd/fetch.zig+7-7
...@@ -26,7 +26,7 @@ pub fn execute(args: [][]u8) !void {...@@ -26,7 +26,7 @@ pub fn execute(args: [][]u8) !void {
26 try w.writeAll("const std = @import(\"std\");\n");26 try w.writeAll("const std = @import(\"std\");\n");
27 try w.writeAll("const build = std.build;\n");27 try w.writeAll("const build = std.build;\n");
28 try w.writeAll("\n");28 try w.writeAll("\n");
29 try w.print("pub const cache = \"{s}\";\n", .{std.zig.fmtEscapes(dir)});29 try w.print("pub const cache = \"{}\";\n", .{std.zig.fmtEscapes(dir)});
30 try w.writeAll("\n");30 try w.writeAll("\n");
31 try w.print("{s}\n", .{31 try w.print("{s}\n", .{
32 \\pub fn addAllTo(exe: *build.LibExeObjStep) void {32 \\pub fn addAllTo(exe: *build.LibExeObjStep) void {
...@@ -118,7 +118,7 @@ fn print_paths(w: fs.File.Writer, list: []u.Module) !void {...@@ -118,7 +118,7 @@ fn print_paths(w: fs.File.Writer, list: []u.Module) !void {
118 try w.print(" \"\",\n", .{});118 try w.print(" \"\",\n", .{});
119 } else {119 } else {
120 const s = std.fs.path.sep_str;120 const s = std.fs.path.sep_str;
121 try w.print(" \"{s}{s}{s}\",\n", .{std.zig.fmtEscapes(s), std.zig.fmtEscapes(mod.clean_path), std.zig.fmtEscapes(s)});121 try w.print(" \"{}{}{}\",\n", .{std.zig.fmtEscapes(s), std.zig.fmtEscapes(mod.clean_path), std.zig.fmtEscapes(s)});
122 }122 }
123 }123 }
124}124}
...@@ -156,9 +156,9 @@ fn print_incl_dirs_to(w: fs.File.Writer, list: []u.Module) !void {...@@ -156,9 +156,9 @@ fn print_incl_dirs_to(w: fs.File.Writer, list: []u.Module) !void {
156 }156 }
157 for (mod.c_include_dirs) |it| {157 for (mod.c_include_dirs) |it| {
158 if (i > 0) {158 if (i > 0) {
159 try w.print(" cache ++ _paths[{}] ++ \"{s}\",\n", .{i, std.zig.fmtEscapes(it)});159 try w.print(" cache ++ _paths[{}] ++ \"{}\",\n", .{i, std.zig.fmtEscapes(it)});
160 } else {160 } else {
161 try w.print(" \"{s}\",\n", .{std.zig.fmtEscapes(it)});161 try w.print(" \"{}\",\n", .{std.zig.fmtEscapes(it)});
162 }162 }
163 }163 }
164 }164 }
...@@ -173,7 +173,7 @@ fn print_csrc_dirs_to(w: fs.File.Writer, list: []u.Module) !void {...@@ -173,7 +173,7 @@ fn print_csrc_dirs_to(w: fs.File.Writer, list: []u.Module) !void {
173 if (i > 0) {173 if (i > 0) {
174 try w.print(" {s}_ids[{}], cache ++ _paths[{}] ++ \"{s}\"{s},\n", .{"[_][]const u8{", i, i, it, "}"});174 try w.print(" {s}_ids[{}], cache ++ _paths[{}] ++ \"{s}\"{s},\n", .{"[_][]const u8{", i, i, it, "}"});
175 } else {175 } else {
176 try w.print(" {s}_ids[{}], \".{s}/{s}\"{s},\n", .{"[_][]const u8{", i, std.zig.fmtEscapes(mod.clean_path), it, "}"});176 try w.print(" {s}_ids[{}], \".{}/{s}\"{s},\n", .{"[_][]const u8{", i, std.zig.fmtEscapes(mod.clean_path), it, "}"});
177 }177 }
178 }178 }
179 }179 }
...@@ -189,7 +189,7 @@ fn print_csrc_flags_to(w: fs.File.Writer, list: []u.Module) !void {...@@ -189,7 +189,7 @@ fn print_csrc_flags_to(w: fs.File.Writer, list: []u.Module) !void {
189 }189 }
190 try w.print(" pub const @\"{s}\" = {s}", .{mod.id, "&.{"});190 try w.print(" pub const @\"{s}\" = {s}", .{mod.id, "&.{"});
191 for (mod.c_source_flags) |it| {191 for (mod.c_source_flags) |it| {
192 try w.print("\"{s}\",", .{std.zig.fmtEscapes(it)});192 try w.print("\"{}\",", .{std.zig.fmtEscapes(it)});
193 }193 }
194 try w.print("{s};\n", .{"}"});194 try w.print("{s};\n", .{"}"});
195195
...@@ -210,7 +210,7 @@ fn print_pkg_data_to(w: fs.File.Writer, list: *std.ArrayList(u.Module), list2: *...@@ -210,7 +210,7 @@ fn print_pkg_data_to(w: fs.File.Writer, list: *std.ArrayList(u.Module), list2: *
210 while (i < list.items.len) : (i += 1) {210 while (i < list.items.len) : (i += 1) {
211 const mod = list.items[i];211 const mod = list.items[i];
212 if (contains_all(mod.deps, list2)) {212 if (contains_all(mod.deps, list2)) {
213 try w.print(" pub const _{s} = build.Pkg{{ .name = \"{s}\", .path = cache ++ \"/{s}/{s}\", .dependencies = &[_]build.Pkg{{", .{mod.id, mod.name, std.zig.fmtEscapes(mod.clean_path), mod.main});213 try w.print(" pub const _{s} = build.Pkg{{ .name = \"{s}\", .path = cache ++ \"/{}/{s}\", .dependencies = &[_]build.Pkg{{", .{mod.id, mod.name, std.zig.fmtEscapes(mod.clean_path), mod.main});
214 for (mod.deps) |d| {214 for (mod.deps) |d| {
215 if (d.main.len > 0) {215 if (d.main.len > 0) {
216 try w.print(" _{s},", .{d.id});216 try w.print(" _{s},", .{d.id});
src/util/funcs.zig+1-1
...@@ -275,6 +275,6 @@ pub fn do_hash(comptime algo: type, data: []const u8) ![]const u8 {...@@ -275,6 +275,6 @@ pub fn do_hash(comptime algo: type, data: []const u8) ![]const u8 {
275 var out: [algo.digest_length]u8 = undefined;275 var out: [algo.digest_length]u8 = undefined;
276 h.update(data);276 h.update(data);
277 h.final(&out);277 h.final(&out);
278 const hex = try std.fmt.allocPrint(gpa, "{x}", .{out});278 const hex = try std.fmt.allocPrint(gpa, "{x}", .{std.fmt.fmtSliceHexLower(out[0..])});
279 return hex;279 return hex;
280}280}
src/util/module.zig+1-1
...@@ -72,7 +72,7 @@ pub const Module = struct {...@@ -72,7 +72,7 @@ pub const Module = struct {
72 }72 }
73 var out: [32]u8 = undefined;73 var out: [32]u8 = undefined;
74 h.final(&out);74 h.final(&out);
75 const hex = try std.fmt.allocPrint(gpa, "blake3-{x}", .{out});75 const hex = try std.fmt.allocPrint(gpa, "blake3-{x}", .{std.fmt.fmtSliceHexLower(out[0..])});
76 return hex;76 return hex;
77 }77 }
7878