mod: bump zig master version
All checks were successful
Zig Project Action / Lint, Spell-check and test zig project (push) Successful in 1m8s

This commit is contained in:
2026-01-06 22:04:34 +01:00
parent 6f62c61897
commit e813a3e195

View File

@@ -1,7 +1,7 @@
/// *zlog* defaultLog function replacement, which adjusts the surrounding contents of every `std.log` message. /// *zlog* defaultLog function replacement, which adjusts the surrounding contents of every `std.log` message.
fn logFn( fn logFn(
comptime message_level: log.Level, comptime message_level: log.Level,
comptime scope: @Type(.enum_literal), comptime scope: @EnumLiteral(),
comptime format: []const u8, comptime format: []const u8,
args: anytype, args: anytype,
) void { ) void {
@@ -25,7 +25,7 @@ fn logFn(
}, 0o600) catch @panic("Could not append to log file"); }, 0o600) catch @panic("Could not append to log file");
defer std.posix.close(fd); defer std.posix.close(fd);
var buffer = std.fs.File.Writer.init(.{ .handle = fd }, &buf); var buffer = std.Io.File.Writer.init(.{ .handle = fd }, &buf);
var writer = &buffer.interface; var writer = &buffer.interface;
defer writer.flush() catch unreachable; defer writer.flush() catch unreachable;
@@ -42,12 +42,11 @@ fn logFn(
}; };
const complete_format = level_txt ++ prefix ++ format ++ "\n"; const complete_format = level_txt ++ prefix ++ format ++ "\n";
var buffer = stderr().writer(&buf); const io = std.debug.lockStderr(&buf);
var writer = &buffer.interface; defer std.debug.unlockStderr();
defer writer.flush() catch unreachable;
std.debug.lockStdErr(); var writer = &io.file_writer.interface;
defer std.debug.unlockStdErr(); defer writer.flush() catch unreachable;
log_writing(writer, complete_format, true, args); log_writing(writer, complete_format, true, args);
} }
@@ -221,9 +220,7 @@ pub const std_options: std.Options = .{
}; };
const std = @import("std"); const std = @import("std");
const io = std.io;
const fs = std.fs; const fs = std.fs;
const stderr = fs.File.stderr;
const log = std.log; const log = std.log;
const fmt = std.fmt; const fmt = std.fmt;
const build_options = @import("build_options"); const build_options = @import("build_options");