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:
1515 - run: git submodule update --init --recursive
1616
1717 - run: apt -y install xz-utils jq
18 - run: ./download_zig.sh 0.8.0-dev.1158+0aef1faa8
18 - run: ./download_zig.sh 0.8.0-dev.1385+3dd8396a5
1919 - run: zig version
2020 - run: zig env
2121 - run: zig build -Dbootstrap
README.md+1-2
......@@ -17,8 +17,7 @@ A package manager for the Zig programming language.
1717- https://github.com/nektro/zigmod/releases
1818
1919## Built With
20- Zig master
21- `0.8.0-dev.1158+0aef1faa8`
20- Zig master `0.8.0-dev.1385+3dd8396a5`
2221
2322### Build from Source
2423Initially,
docs/README.md+1-1
......@@ -8,7 +8,7 @@ You can learn more about Zig here:
88
99The 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
1313## Download
1414You 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 {
2626 try w.writeAll("const std = @import(\"std\");\n");
2727 try w.writeAll("const build = std.build;\n");
2828 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)});
3030 try w.writeAll("\n");
3131 try w.print("{s}\n", .{
3232 \\pub fn addAllTo(exe: *build.LibExeObjStep) void {
......@@ -118,7 +118,7 @@ fn print_paths(w: fs.File.Writer, list: []u.Module) !void {
118118 try w.print(" \"\",\n", .{});
119119 } else {
120120 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)});
122122 }
123123 }
124124}
......@@ -156,9 +156,9 @@ fn print_incl_dirs_to(w: fs.File.Writer, list: []u.Module) !void {
156156 }
157157 for (mod.c_include_dirs) |it| {
158158 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)});
160160 } else {
161 try w.print(" \"{s}\",\n", .{std.zig.fmtEscapes(it)});
161 try w.print(" \"{}\",\n", .{std.zig.fmtEscapes(it)});
162162 }
163163 }
164164 }
......@@ -173,7 +173,7 @@ fn print_csrc_dirs_to(w: fs.File.Writer, list: []u.Module) !void {
173173 if (i > 0) {
174174 try w.print(" {s}_ids[{}], cache ++ _paths[{}] ++ \"{s}\"{s},\n", .{"[_][]const u8{", i, i, it, "}"});
175175 } 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, "}"});
177177 }
178178 }
179179 }
......@@ -189,7 +189,7 @@ fn print_csrc_flags_to(w: fs.File.Writer, list: []u.Module) !void {
189189 }
190190 try w.print(" pub const @\"{s}\" = {s}", .{mod.id, "&.{"});
191191 for (mod.c_source_flags) |it| {
192 try w.print("\"{s}\",", .{std.zig.fmtEscapes(it)});
192 try w.print("\"{}\",", .{std.zig.fmtEscapes(it)});
193193 }
194194 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: *
210210 while (i < list.items.len) : (i += 1) {
211211 const mod = list.items[i];
212212 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});
214214 for (mod.deps) |d| {
215215 if (d.main.len > 0) {
216216 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 {
275275 var out: [algo.digest_length]u8 = undefined;
276276 h.update(data);
277277 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..])});
279279 return hex;
280280}
src/util/module.zig+1-1
......@@ -72,7 +72,7 @@ pub const Module = struct {
7272 }
7373 var out: [32]u8 = undefined;
7474 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..])});
7676 return hex;
7777 }
7878