authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-27 11:20:42-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2024-05-27 20:56:49-07:00
log0937992a14e9557da7d753f3c38070fe57583e33
tree3b1d18184929654c35c4fc19a56f9645a4b89a49
parent03073d6c7bf5f7cd1daf8941fcf72665563b46d4

resinator: update to new progress API


3 files changed, 4 insertions(+), 10 deletions(-)

lib/compiler/resinator/cli.zig+2-2
......@@ -108,8 +108,8 @@ pub const Diagnostics = struct {
108108 }
109109
110110 pub fn renderToStdErr(self: *Diagnostics, args: []const []const u8, config: std.io.tty.Config) void {
111 std.debug.getStderrMutex().lock();
112 defer std.debug.getStderrMutex().unlock();
111 std.debug.lockStdErr();
112 defer std.debug.unlockStdErr();
113113 const stderr = std.io.getStdErr().writer();
114114 self.renderToWriter(args, stderr, config) catch return;
115115 }
lib/compiler/resinator/errors.zig+2-2
......@@ -60,8 +60,8 @@ pub const Diagnostics = struct {
6060 }
6161
6262 pub fn renderToStdErr(self: *Diagnostics, cwd: std.fs.Dir, source: []const u8, tty_config: std.io.tty.Config, source_mappings: ?SourceMappings) void {
63 std.debug.getStderrMutex().lock();
64 defer std.debug.getStderrMutex().unlock();
63 std.debug.lockStdErr();
64 defer std.debug.unlockStdErr();
6565 const stderr = std.io.getStdErr().writer();
6666 for (self.errors.items) |err_details| {
6767 renderErrorMessage(self.allocator, stderr, tty_config, cwd, err_details, source, self.strings.items, source_mappings) catch return;
lib/compiler/resinator/main.zig-6
......@@ -50,12 +50,6 @@ pub fn main() !void {
5050 },
5151 };
5252
53 if (zig_integration) {
54 // Send progress with a special string to indicate that the building of the
55 // resinator binary is finished and we've moved on to actually compiling the .rc file
56 try error_handler.server.serveStringMessage(.progress, "<resinator>");
57 }
58
5953 var options = options: {
6054 var cli_diagnostics = cli.Diagnostics.init(allocator);
6155 defer cli_diagnostics.deinit();