Merge pull request #1489 from mitchellh/update-zig

update zig
This commit is contained in:
Mitchell Hashimoto
2024-02-10 17:48:50 -08:00
committed by GitHub
6 changed files with 62 additions and 56 deletions

View File

@ -14,5 +14,6 @@ jobs:
with: with:
name: ghostty name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
useDaemon: false # sometimes fails on short jobs
- name: Check Zig cache hash - name: Check Zig cache hash
run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh run: nix develop -c ./nix/build-support/check-zig-cache-hash.sh

View File

@ -220,6 +220,8 @@ jobs:
with: with:
name: ghostty name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
skipPush: true
useDaemon: false # sometimes fails on short jobs
- name: prettier check - name: prettier check
run: nix develop -c prettier --check . run: nix develop -c prettier --check .
@ -234,5 +236,7 @@ jobs:
with: with:
name: ghostty name: ghostty
authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}"
skipPush: true
useDaemon: false # sometimes fails on short jobs
- name: alejandra check - name: alejandra check
run: nix develop -c alejandra --check . run: nix develop -c alejandra --check .

View File

@ -24,7 +24,7 @@ const Command = @import("src/Command.zig");
// but we liberally update it. In the future, we'll be more careful about // but we liberally update it. In the future, we'll be more careful about
// using released versions so that package managers can integrate better. // using released versions so that package managers can integrate better.
comptime { comptime {
const required_zig = "0.12.0-dev.2075+f5978181e"; const required_zig = "0.12.0-dev.2701+d18f52197";
const current_zig = builtin.zig_version; const current_zig = builtin.zig_version;
const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable; const min_zig = std.SemanticVersion.parse(required_zig) catch unreachable;
if (current_zig.order(min_zig) == .lt) { if (current_zig.order(min_zig) == .lt) {

12
flake.lock generated
View File

@ -147,11 +147,11 @@
}, },
"nixpkgs-zig-0-12": { "nixpkgs-zig-0-12": {
"locked": { "locked": {
"lastModified": 1707156663, "lastModified": 1707614255,
"narHash": "sha256-T0Ah65Sj/HnbEkKmOCaQGSIoNDZDh3K299A0nvXceCk=", "narHash": "sha256-26jDBuCgewZb+ifR3Ow6cZS/6Mz09pwC4ukKWtOjFZk=",
"owner": "vancluever", "owner": "vancluever",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "dfe11015af91c9317604d792715f166d9fce7831", "rev": "85b992eb1a8d3a3742ddb21eba7f79b0e4f2e78b",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -194,11 +194,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1707148508, "lastModified": 1707611073,
"narHash": "sha256-fAQN2Y8wZn8JQWQvA5dfDEorxZLLWTNSdZp39YFAWXk=", "narHash": "sha256-sMsxVKXP5TLcaVMNlRZ7KlDsYGwDdJAMtY0DKmb+7fQ=",
"owner": "mitchellh", "owner": "mitchellh",
"repo": "zig-overlay", "repo": "zig-overlay",
"rev": "3e47b1a260a5521e51888b8e71cd04b8e8928cb3", "rev": "aa4edff6f53e64443ca77e8d9ffe866f29e5b3d4",
"type": "github" "type": "github"
}, },
"original": { "original": {

View File

@ -178,7 +178,6 @@ fn startWindows(self: *Command, arena: Allocator) !void {
.access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE, .access_mask = windows.GENERIC_READ | windows.SYNCHRONIZE,
.share_access = windows.FILE_SHARE_READ, .share_access = windows.FILE_SHARE_READ,
.creation = windows.OPEN_EXISTING, .creation = windows.OPEN_EXISTING,
.io_mode = .blocking,
}, },
) else null; ) else null;
defer if (null_fd) |fd| std.os.close(fd); defer if (null_fd) |fd| std.os.close(fd);

View File

@ -109,15 +109,8 @@ pub fn main() !MainReturn {
try app_runtime.run(); try app_runtime.run();
} }
pub const std_options = struct {
// Our log level is always at least info in every build mode.
pub const log_level: std.log.Level = switch (builtin.mode) {
.Debug => .debug,
else => .info,
};
// The function std.log will call. // The function std.log will call.
pub fn logFn( fn logFn(
comptime level: std.log.Level, comptime level: std.log.Level,
comptime scope: @TypeOf(.EnumLiteral), comptime scope: @TypeOf(.EnumLiteral),
comptime format: []const u8, comptime format: []const u8,
@ -161,6 +154,15 @@ pub const std_options = struct {
}, },
} }
} }
pub const std_options: std.Options = .{
// Our log level is always at least info in every build mode.
.log_level = switch (builtin.mode) {
.Debug => .debug,
else => .info,
},
.logFn = logFn,
}; };
/// This represents the global process state. There should only /// This represents the global process state. There should only