From 50cf87f8fc01be98ec6f12ed954fbbcef0156a0d Mon Sep 17 00:00:00 2001 From: Andrew Kelley Date: Fri, 25 Sep 2026 12:07:52 -0700 Subject: [PATCH] update callsites to std.zig.Client.serveErrorBundle now it has to include the message tag --- lib/compiler/objcopy.zig | 4 ++-- lib/compiler/resinator/main.zig | 8 ++++---- lib/compiler/translate-c/main.zig | 2 +- src/main.zig | 8 ++++---- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/compiler/objcopy.zig b/lib/compiler/objcopy.zig index b2b0f270bde26aa0f9e4016e5fd8a63f9d5af4bd..02573432905f61cbbdd3756db86c6e4b9a2aa3f6 100644 --- a/lib/compiler/objcopy.zig +++ b/lib/compiler/objcopy.zig @@ -234,9 +234,9 @@ fn cmdObjCopy(arena: Allocator, io: Io, args: []const []const u8) !void { // The build system already knows what the output is at this point, we // only need to communicate that the process has finished. // Use the empty error bundle to indicate that the update is done. - try server.serveErrorBundle(std.zig.ErrorBundle.empty); + try server.serveErrorBundle(.error_bundle, std.zig.ErrorBundle.empty); }, - else => fatal("unsupported message: {s}", .{@tagName(hdr.tag)}), + else => fatal("unsupported message: {t}", .{hdr.tag}), } } } diff --git a/lib/compiler/resinator/main.zig b/lib/compiler/resinator/main.zig index f4e03fbe305f3b86cc7a9063ffd42c1089009df2..7ba7f7445cdb930783a3aa2bac9307b0367c4b6d 100644 --- a/lib/compiler/resinator/main.zig +++ b/lib/compiler/resinator/main.zig @@ -704,7 +704,7 @@ const ErrorHandler = union(enum) { var error_bundle = try cliDiagnosticsToErrorBundle(allocator, diagnostics); defer error_bundle.deinit(allocator); - try server.serveErrorBundle(error_bundle); + try server.serveErrorBundle(.error_bundle, error_bundle); }, .stderr => return diagnostics.renderToStderr(io, args), } @@ -726,7 +726,7 @@ const ErrorHandler = union(enum) { ); defer error_bundle.deinit(allocator); - try server.serveErrorBundle(error_bundle); + try server.serveErrorBundle(.error_bundle, error_bundle); }, .stderr => { // aro errors have already been emitted @@ -751,7 +751,7 @@ const ErrorHandler = union(enum) { var error_bundle = try diagnosticsToErrorBundle(allocator, source, diagnostics, mappings); defer error_bundle.deinit(allocator); - try server.serveErrorBundle(error_bundle); + try server.serveErrorBundle(.error_bundle, error_bundle); }, .stderr => return diagnostics.renderToStderr(io, cwd, source, mappings), } @@ -773,7 +773,7 @@ const ErrorHandler = union(enum) { var error_bundle = try errorStringToErrorBundle(allocator, format, args); defer error_bundle.deinit(allocator); - try server.serveErrorBundle(error_bundle); + try server.serveErrorBundle(.error_bundle, error_bundle); }, .stderr => { const stderr = try io.lockStderr(&.{}, null); diff --git a/lib/compiler/translate-c/main.zig b/lib/compiler/translate-c/main.zig index e5c3961076a2daa2ec4a119c5903f175db96857c..9c99a2c214ec876a50db38ef16531f81ebde997e 100644 --- a/lib/compiler/translate-c/main.zig +++ b/lib/compiler/translate-c/main.zig @@ -105,7 +105,7 @@ fn serveErrorBundle(arena: std.mem.Allocator, io: Io, diagnostics: *const aro.Di .out = &stdout_writer.interface, .in = undefined, }; - try server.serveErrorBundle(error_bundle); + try server.serveErrorBundle(.error_bundle, error_bundle); } pub const usage = diff --git a/src/main.zig b/src/main.zig index 1bd12d4a4f7464034824f4a14360360e00a39527..5ad21b548e12b1453aa4e1345c74fa7c17af5036 100644 --- a/src/main.zig +++ b/src/main.zig @@ -4453,7 +4453,7 @@ fn serve( } if (output.errors.errorMessageCount() != 0) { - try server.serveErrorBundle(output.errors); + try server.serveErrorBundle(.error_bundle, output.errors); } else { try server.serveEmitDigest(&output.digest, .{ .flags = .{ .cache_hit = output.cache_hit }, @@ -4611,7 +4611,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void { } if (error_bundle.errorMessageCount() > 0) { - try s.serveErrorBundle(error_bundle); + try s.serveErrorBundle(.error_bundle, error_bundle); return; } @@ -4622,7 +4622,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void { } // Serve empty error bundle to indicate the update is done. - try s.serveErrorBundle(std.zig.ErrorBundle.empty); + try s.serveErrorBundle(.error_bundle, std.zig.ErrorBundle.empty); } fn runOrTest( @@ -5157,7 +5157,7 @@ fn jitCmdInner( var error_bundle = try comp.getAllErrorsAlloc(); defer error_bundle.deinit(comp.gpa); if (error_bundle.errorMessageCount() > 0) { - try server.serveErrorBundle(error_bundle); + try server.serveErrorBundle(.error_bundle, error_bundle); process.exit(2); } } else { -- 2.54.0