From 0937992a14e9557da7d753f3c38070fe57583e33 Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Mon, 27 May 2024 11:20:42 -0700 Subject: [PATCH] resinator: update to new progress API --- lib/compiler/resinator/cli.zig | 4 ++-- lib/compiler/resinator/errors.zig | 4 ++-- lib/compiler/resinator/main.zig | 6 ------ 3 files changed, 4 insertions(+), 10 deletions(-) diff --git a/lib/compiler/resinator/cli.zig b/lib/compiler/resinator/cli.zig index deee1ed54a3b368e3e6f65ff8755fcf7638b798b..32b4389997deae4915e1e77539809adb4899efac 100644 --- a/lib/compiler/resinator/cli.zig +++ b/lib/compiler/resinator/cli.zig @@ -108,8 +108,8 @@ pub const Diagnostics = struct { } pub fn renderToStdErr(self: *Diagnostics, args: []const []const u8, config: std.io.tty.Config) void { - std.debug.getStderrMutex().lock(); - defer std.debug.getStderrMutex().unlock(); + std.debug.lockStdErr(); + defer std.debug.unlockStdErr(); const stderr = std.io.getStdErr().writer(); self.renderToWriter(args, stderr, config) catch return; } diff --git a/lib/compiler/resinator/errors.zig b/lib/compiler/resinator/errors.zig index 909824c594ceb0f93e64ed129fc396109571001a..5cfa766ac1242e55b12ee291b46f5f3a2745d15c 100644 --- a/lib/compiler/resinator/errors.zig +++ b/lib/compiler/resinator/errors.zig @@ -60,8 +60,8 @@ pub const Diagnostics = struct { } pub fn renderToStdErr(self: *Diagnostics, cwd: std.fs.Dir, source: []const u8, tty_config: std.io.tty.Config, source_mappings: ?SourceMappings) void { - std.debug.getStderrMutex().lock(); - defer std.debug.getStderrMutex().unlock(); + std.debug.lockStdErr(); + defer std.debug.unlockStdErr(); const stderr = std.io.getStdErr().writer(); for (self.errors.items) |err_details| { renderErrorMessage(self.allocator, stderr, tty_config, cwd, err_details, source, self.strings.items, source_mappings) catch return; diff --git a/lib/compiler/resinator/main.zig b/lib/compiler/resinator/main.zig index 3dd59857588e6cf80f48ad933f987baccb01b1a9..e056e80252e1ac69ba154b235c392794bb0c3e2c 100644 --- a/lib/compiler/resinator/main.zig +++ b/lib/compiler/resinator/main.zig @@ -50,12 +50,6 @@ pub fn main() !void { }, }; - if (zig_integration) { - // Send progress with a special string to indicate that the building of the - // resinator binary is finished and we've moved on to actually compiling the .rc file - try error_handler.server.serveStringMessage(.progress, ""); - } - var options = options: { var cli_diagnostics = cli.Diagnostics.init(allocator); defer cli_diagnostics.deinit(); -- 2.54.0