From b48d24a5469d7d3545cc3c7a17652ce1aba5516e Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Wed, 13 Mar 2024 09:14:12 -0700 Subject: [PATCH] update zig --- build.zig | 4 ++-- build.zig.zon | 8 ++++---- flake.lock | 6 +++--- nix/zigCacheHash.nix | 2 +- src/build/fish_completions.zig | 2 +- src/cli/args.zig | 2 +- src/config/Config.zig | 2 +- src/config/c_get.zig | 2 +- src/config/formatter.zig | 2 +- src/renderer/Metal.zig | 4 ++-- src/terminal/modes.zig | 2 +- 11 files changed, 18 insertions(+), 18 deletions(-) diff --git a/build.zig b/build.zig index b4df02dc6..23128d3e7 100644 --- a/build.zig +++ b/build.zig @@ -24,7 +24,7 @@ const Command = @import("src/Command.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.3192+e2cbbd0c2"; + const required_zig = "0.12.0-dev.3282+da5b16f9e"; const current_zig = builtin.zig_version; const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; if (current_zig.order(min_zig) == .lt) { @@ -912,7 +912,7 @@ fn addDeps( // mode first. Mode first will search all paths for a dynamic library // before falling back to static. const dynamic_link_opts: std.Build.Module.LinkSystemLibraryOptions = .{ - .preferred_link_mode = .Dynamic, + .preferred_link_mode = .dynamic, .search_strategy = .mode_first, }; diff --git a/build.zig.zon b/build.zig.zon index 6d15378d6..031ee905c 100644 --- a/build.zig.zon +++ b/build.zig.zon @@ -5,8 +5,8 @@ .dependencies = .{ // Zig libs .libxev = .{ - .url = "https://github.com/mitchellh/libxev/archive/c0a07796c1b536de5dc3725b6aab95fa54a1ac84.tar.gz", - .hash = "1220824436d1a4a5b35a1149be50b6abc46f3eed57216e5bf9ba6cf2bbc9d7f7922d", + .url = "https://github.com/mitchellh/libxev/archive/116a813a78e3354837fff466b54e3e2e5ec7af01.tar.gz", + .hash = "1220bb2ecdf7659f20f6dfa88982ac55b6798281123523a37f05b91ceea90a87856b", }, .mach_glfw = .{ .url = "https://github.com/der-teufel-programming/mach-glfw/archive/250affff8c52d1eaa0fab2ef1118f691bf1225ec.tar.gz", @@ -14,8 +14,8 @@ .lazy = true, }, .zig_objc = .{ - .url = "https://github.com/mitchellh/zig-objc/archive/f6ed382b6db296626a9b56dadcf9d7e4fcba71d3.tar.gz", - .hash = "1220c94dbcdf5a799ce2b1571978ff3c97bab1341fe329084fcc3c06e5d6375469b9", + .url = "https://github.com/mitchellh/zig-objc/archive/83a52ce8e3452b299cb8f2ab91bfb34cf042c664.tar.gz", + .hash = "1220d55dc3e61375ac93cb2449ea7b33e6bea4e53e72d18b0e6bc0ec6d38c05faaed", }, .zig_js = .{ .url = "https://github.com/mitchellh/zig-js/archive/d4edb682733aef8dc3933683272bdf7c8b9fe658.tar.gz", diff --git a/flake.lock b/flake.lock index a9106b174..6ca924e8e 100644 --- a/flake.lock +++ b/flake.lock @@ -194,11 +194,11 @@ ] }, "locked": { - "lastModified": 1710028389, - "narHash": "sha256-NjtsA9aTb9qgzmuuXJabVL0LeNw8ae3BXpF/+UCT2yc=", + "lastModified": 1710331756, + "narHash": "sha256-ZYFHWEHupxj/e9jOcjUOJLVTuvMR4fYMV53F0zu8Rfs=", "owner": "mitchellh", "repo": "zig-overlay", - "rev": "7e2da66bd83f27441d2a3244ebdc7d0b4d20c3c4", + "rev": "510a1f01f1ddc06df0f2b888f12ad1aa9a65cc31", "type": "github" }, "original": { diff --git a/nix/zigCacheHash.nix b/nix/zigCacheHash.nix index 2d1fdccdc..e38f40677 100644 --- a/nix/zigCacheHash.nix +++ b/nix/zigCacheHash.nix @@ -1,3 +1,3 @@ # This file is auto-generated! check build-support/check-zig-cache-hash.sh for # more details. -"sha256-jUZtkmZW2m4UvH3cQ1/X2z1arBrNk3WKmuxDU4bqPco=" +"sha256-kKT4LpedYWOlkZSeJqw4RqwJ5blNqHtoNfHrsG2/sfQ=" diff --git a/src/build/fish_completions.zig b/src/build/fish_completions.zig index 226b50f50..f789c0d10 100644 --- a/src/build/fish_completions.zig +++ b/src/build/fish_completions.zig @@ -68,7 +68,7 @@ fn writeFishCompletions(writer: anytype) !void { try writer.writeAll("\""); }, .Struct => |info| { - if (!@hasDecl(field.type, "parseCLI") and info.layout == .Packed) { + if (!@hasDecl(field.type, "parseCLI") and info.layout == .@"packed") { try writer.writeAll(" -a \""); for (info.fields, 0..) |f, i| { if (i > 0) try writer.writeAll(" "); diff --git a/src/cli/args.zig b/src/cli/args.zig index 128b29541..0363ba9be 100644 --- a/src/cli/args.zig +++ b/src/cli/args.zig @@ -281,7 +281,7 @@ fn parseIntoField( fn parsePackedStruct(comptime T: type, v: []const u8) !T { const info = @typeInfo(T).Struct; - assert(info.layout == .Packed); + assert(info.layout == .@"packed"); var result: T = .{}; diff --git a/src/config/Config.zig b/src/config/Config.zig index b9bac03e0..4a0ba75ec 100644 --- a/src/config/Config.zig +++ b/src/config/Config.zig @@ -1982,7 +1982,7 @@ fn cloneValue(alloc: Allocator, comptime T: type, src: T) !T { .Struct => |info| { // Packed structs we can return directly as copies. - assert(info.layout == .Packed); + assert(info.layout == .@"packed"); return src; }, diff --git a/src/config/c_get.zig b/src/config/c_get.zig index 2bc2ae10e..442d5e6a3 100644 --- a/src/config/c_get.zig +++ b/src/config/c_get.zig @@ -63,7 +63,7 @@ fn getValue(ptr_raw: *anyopaque, value: anytype) bool { // Packed structs that are less than or equal to the // size of a C int can be passed directly as their // bit representation. - if (info.layout != .Packed) return false; + if (info.layout != .@"packed") return false; const Backing = info.backing_integer orelse return false; if (@bitSizeOf(Backing) > @bitSizeOf(c_uint)) return false; diff --git a/src/config/formatter.zig b/src/config/formatter.zig index 62a395825..aec7ead89 100644 --- a/src/config/formatter.zig +++ b/src/config/formatter.zig @@ -98,7 +98,7 @@ pub fn formatEntry( return; } else switch (info.layout) { // Packed structs we special case. - .Packed => { + .@"packed" => { try writer.print("{s} = ", .{name}); inline for (info.fields, 0..) |field, i| { if (i > 0) try writer.print(",", .{}); diff --git a/src/renderer/Metal.zig b/src/renderer/Metal.zig index 5f9542c72..02ba2f93f 100644 --- a/src/renderer/Metal.zig +++ b/src/renderer/Metal.zig @@ -956,8 +956,8 @@ fn bufferCompleted( // If our health value hasn't changed, then we do nothing. We don't // do a cmpxchg here because strict atomicity isn't important. - if (self.health.load(.SeqCst) != health) { - self.health.store(health, .SeqCst); + if (self.health.load(.seq_cst) != health) { + self.health.store(health, .seq_cst); // Our health value changed, so we notify the surface so that it // can do something about it. diff --git a/src/terminal/modes.zig b/src/terminal/modes.zig index e42efa16e..c9ed84cbd 100644 --- a/src/terminal/modes.zig +++ b/src/terminal/modes.zig @@ -89,7 +89,7 @@ pub const ModePacked = packed_struct: { } break :packed_struct @Type(.{ .Struct = .{ - .layout = .Packed, + .layout = .@"packed", .fields = &fields, .decls = &.{}, .is_tuple = false,