Skip to content

Commit ffe1e44

Browse files
authored
update to Zig 0.16.0-dev.1859+212968c57 (#63)
1 parent bafef17 commit ffe1e44

File tree

3 files changed

+5
-6
lines changed

3 files changed

+5
-6
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ pub fn getPath(
5656
## Installation
5757

5858
> [!NOTE]
59-
> The supported Zig version is `0.15.x`.
59+
> The default branch requires Zig `0.16.0-dev.1859+212968c57` or later.
6060
6161
Initialize a `zig build` project if you haven't already.
6262

build.zig.zon

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
.{
22
.name = .known_folders,
33
.version = "0.0.0",
4-
.minimum_zig_version = "0.16.0-dev.1204+389368392",
4+
.minimum_zig_version = "0.16.0-dev.1859+212968c57",
55
.dependencies = .{},
66
.paths = .{
77
"build.zig",

known-folders.zig

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ fn getPathInner(
149149
) Error!?[]const u8 {
150150
if (folder == .executable_dir) {
151151
if (builtin.os.tag == .wasi) return null;
152-
return std.fs.selfExeDirPathAlloc(allocator) catch |err| switch (err) {
152+
return std.process.executableDirPathAlloc(io, allocator) catch |err| switch (err) {
153153
error.OutOfMemory => return error.OutOfMemory,
154154
else => null,
155155
};
@@ -383,16 +383,15 @@ const TestingSystem = struct {
383383

384384
const prefix = std.base64.standard.Encoder.encode(buffer, kv.path);
385385

386-
tmp_dir.dir.writeFile(.{
386+
tmp_dir.dir.writeFile(io, .{
387387
.sub_path = prefix,
388388
.data = data,
389389
}) catch |err| {
390390
tmp_dir.cleanup();
391391
std.debug.panic("failed to create file './{s}/{s}' which represents '{s}': {}", .{ &tmp_dir.sub_path, prefix, kv.path, err });
392392
};
393393

394-
const dir: std.Io.Dir = .{ .handle = tmp_dir.dir.fd };
395-
return try dir.openFile(io, prefix, .{});
394+
return try tmp_dir.dir.openFile(io, prefix, .{});
396395
}
397396
};
398397

0 commit comments

Comments
 (0)