From 2b281068374eab491c92fa9b6ddb2cdd706001cd Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 2 Oct 2023 08:17:42 -0700 Subject: [PATCH] update zig --- build.zig | 2 +- flake.lock | 6 +++--- src/Pty.zig | 2 +- src/cli/args.zig | 2 +- src/main.zig | 2 +- src/os/passwd.zig | 4 ++-- src/renderer/Thread.zig | 2 +- 7 files changed, 10 insertions(+), 10 deletions(-) diff --git a/build.zig b/build.zig index efdd794f3..f6f486205 100644 --- a/build.zig +++ b/build.zig @@ -19,7 +19,7 @@ const Version = @import("src/build/Version.zig"); // but we liberally update it. In the future, we'll be more careful about // using released versions so that package managers can integrate better. comptime { - const required_zig = "0.12.0-dev.694+937e8cb70"; + const required_zig = "0.12.0-dev.706+62a0fbdae"; const current_zig = builtin.zig_version; const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; if (current_zig.order(min_zig) == .lt) { diff --git a/flake.lock b/flake.lock index 8fc1244e1..8e6b5a0db 100644 --- a/flake.lock +++ b/flake.lock @@ -276,11 +276,11 @@ "nixpkgs": "nixpkgs_2" }, "locked": { - "lastModified": 1696162042, - "narHash": "sha256-wx4VOerV9NP3FgpO2XOU3m8wIDMzIxsofwkVftfN0AU=", + "lastModified": 1696259784, + "narHash": "sha256-+oZPI8lRF6hpvW/Ho/VQsVj//1Yqh/s3PY6UVTHQlQc=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "ef064b830f5327489b616b5ca220f9e82db37806", + "rev": "977efafe55f875bda1fe775c0b00ea336ce8e5f5", "type": "github" }, "original": { diff --git a/src/Pty.zig b/src/Pty.zig index 7813e8880..3bbcb713a 100644 --- a/src/Pty.zig +++ b/src/Pty.zig @@ -13,7 +13,7 @@ const c = switch (builtin.os.tag) { @cInclude("sys/ioctl.h"); // ioctl and constants @cInclude("util.h"); // openpty() }), - .windows => { }, + .windows => {}, else => @cImport({ @cInclude("sys/ioctl.h"); // ioctl and constants @cInclude("pty.h"); diff --git a/src/cli/args.zig b/src/cli/args.zig index 9eb09b3cc..fcb4c039c 100644 --- a/src/cli/args.zig +++ b/src/cli/args.zig @@ -82,7 +82,7 @@ pub fn parse(comptime T: type, alloc: Allocator, dst: *T, iter: anytype) !void { // The error set is dependent on comptime T, so we always add // an extra error so we can have the "else" below. const ErrSet = @TypeOf(err) || error{Unknown}; - switch (@as(ErrSet, @errSetCast(err))) { + switch (@as(ErrSet, @errorCast(err))) { // OOM is not recoverable since we need to allocate to // track more error messages. error.OutOfMemory => return err, diff --git a/src/main.zig b/src/main.zig index bcd3711ba..b697b05c1 100644 --- a/src/main.zig +++ b/src/main.zig @@ -38,7 +38,7 @@ pub fn main() !MainReturn { const stderr = std.io.getStdErr().writer(); defer std.os.exit(1); const ErrSet = @TypeOf(err) || error{Unknown}; - switch (@as(ErrSet, @errSetCast(err))) { + switch (@as(ErrSet, @errorCast(err))) { error.MultipleActions => try stderr.print( "Error: multiple CLI actions specified. You must specify only one\n" ++ "action starting with the `+` character.\n", diff --git a/src/os/passwd.zig b/src/os/passwd.zig index 8b5a9671c..32d93da3b 100644 --- a/src/os/passwd.zig +++ b/src/os/passwd.zig @@ -15,11 +15,11 @@ comptime { } /// Used to determine the default shell and directory on Unixes. -const c = if (builtin.os.tag == .windows) { } else @cImport({ +const c = if (builtin.os.tag != .windows) @cImport({ @cInclude("sys/types.h"); @cInclude("unistd.h"); @cInclude("pwd.h"); -}); +}) else {}; // Entry that is retrieved from the passwd API. This only contains the fields // we care about. diff --git a/src/renderer/Thread.zig b/src/renderer/Thread.zig index d193246be..90d8c3377 100644 --- a/src/renderer/Thread.zig +++ b/src/renderer/Thread.zig @@ -385,7 +385,7 @@ fn cursorCancelCallback( Unexpected, }; - _ = r catch |err| switch (@as(CancelError, @errSetCast(err))) { + _ = r catch |err| switch (@as(CancelError, @errorCast(err))) { error.Canceled => {}, else => { log.warn("error in cursor cancel callback err={}", .{err});