Skip to content

Commit 2c004d0

Browse files
committed
upgrade to Zig 0.13
1 parent a9c075a commit 2c004d0

15 files changed

Lines changed: 22 additions & 19 deletions

File tree

.github/workflows/nightly.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
uses: mlugg/setup-zig@v1
2828
with:
2929
mirror: "http://mirrors.nektro.net/s3cgi"
30-
version: "0.12.0"
30+
version: "0.13.0"
3131

3232
- run: zig version
3333
- run: zig env

.github/workflows/push.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020
uses: mlugg/setup-zig@v1
2121
with:
2222
mirror: "http://mirrors.nektro.net/s3cgi"
23-
version: "0.12.0"
23+
version: "0.13.0"
2424

2525
- run: zig version
2626
- run: zig env

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1-
zig-*
1+
zig-cache
2+
.zig-cache
3+
zig-out
24
.zigmod
35
bin

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ A package manager for the Zig programming language.
1616
- https://github.com/nektro/zigmod/releases
1717

1818
## Built With
19-
- Zig master (at least `0.12.0`)
19+
- Zig `0.13.0`
2020
- See [`zig.mod`](./zig.mod) and [`zigmod.lock`](./zigmod.lock)
2121

2222
### Build from Source

build.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ pub fn build(b: *std.Build) void {
1111
const exe_name = b.fmt("{s}{s}", .{ "zigmod", if (use_full_name) with_arch_os else "" });
1212
const exe = b.addExecutable(.{
1313
.name = exe_name,
14-
.root_source_file = .{ .path = "src/main.zig" },
14+
.root_source_file = b.path("src/main.zig"),
1515
.target = target,
1616
.optimize = mode,
1717
});

deps.zig

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ pub const GitExactStep = struct {
4040
return result;
4141
}
4242

43-
fn make(step: *std.Build.Step, prog_node: *std.Progress.Node) !void {
43+
fn make(step: *std.Build.Step, prog_node: std.Progress.Node) !void {
4444
_ = step;
4545
_ = prog_node;
4646
}
@@ -126,7 +126,7 @@ pub const Package = struct {
126126
});
127127
dummy_library.step.dependOn(fetch_step);
128128
if (self.entry) |capture| {
129-
result.root_source_file = .{ .path = capture };
129+
result.root_source_file = .{ .cwd_relative = capture };
130130
}
131131
for (self.deps) |item| {
132132
const module_dep = item.module(exe, fetch_step);
@@ -168,7 +168,7 @@ pub const Package = struct {
168168
};
169169

170170
fn checkMinZig(current: std.SemanticVersion, exe: *std.Build.Step.Compile) void {
171-
const min = std.SemanticVersion.parse("0.12.0") catch return;
171+
const min = std.SemanticVersion.parse("0.13.0") catch return;
172172
if (current.order(min).compare(.lt)) @panic(exe.step.owner.fmt("Your Zig version v{} does not meet the minimum build requirement of v{}", .{current, min}));
173173
}
174174

docs/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ The rest of this documentation will assume you already have Zig installed.
1010

1111
As 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.
1212

13-
The earliest Zig release this Zigmod was verified to work with is `0.12.0`.
13+
The earliest Zig release this Zigmod was verified to work with is `0.13.0`.
1414

1515
## Download
1616
You may download a precompiled binary from https://github.com/nektro/zigmod/releases or build the project from source.

src/cmd/aquila/install.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ pub fn execute(self_name: []const u8, args: [][]u8) !void {
7070
"--prefix", try std.fs.path.join(gpa, &.{ homepath, ".zigmod" }),
7171
"--cache-dir", try std.fs.path.join(gpa, &.{ cache.?, "zigmod", "zig" }),
7272
};
73-
var proc = std.ChildProcess.init(argv, gpa);
73+
var proc = std.process.Child.init(argv, gpa);
7474
proc.cwd = modpath;
7575
const term = try proc.spawnAndWait();
7676
switch (term) {

src/cmd/aquila/update.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn execute(self_name: []const u8, args: [][]u8) !void {
5656
"--prefix", try std.fs.path.join(gpa, &.{ homepath, ".zigmod" }),
5757
"--cache-dir", try std.fs.path.join(gpa, &.{ cache.?, "zigmod", "zig" }),
5858
};
59-
var proc = std.ChildProcess.init(argv, gpa);
59+
var proc = std.process.Child.init(argv, gpa);
6060
proc.cwd = modpath;
6161
const term = try proc.spawnAndWait();
6262
switch (term) {

src/cmd/fetch.zig

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -329,7 +329,7 @@ fn print_pkg_data_to(w: std.fs.File.Writer, notdone: *std.ArrayList(zigmod.Modul
329329
});
330330
if (mod.main.len > 0 and !std.mem.eql(u8, &mod.id, &zigmod.Module.ROOT)) {
331331
try w.print(
332-
\\ .import = .{{ "{s}", .{{ .path = dirs._{s} ++ "/{s}" }} }},
332+
\\ .import = .{{ "{s}", .{{ .cwd_relative = dirs._{s} ++ "/{s}" }} }},
333333
\\
334334
, .{
335335
mod.name,

0 commit comments

Comments
 (0)