authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-09-25 12:07:52-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-09-25 12:07:52-07:00
log50cf87f8fc01be98ec6f12ed954fbbcef0156a0d
treef84922cc291af22c049fb3281148de4f8157248d
parentd09c1aef02788bcea0a3e3b0f7507c4f3e823295

update callsites to std.zig.Client.serveErrorBundle

now it has to include the message tag

4 files changed, 11 insertions(+), 11 deletions(-)

lib/compiler/objcopy.zig+2-2
......@@ -234,9 +234,9 @@ fn cmdObjCopy(arena: Allocator, io: Io, args: []const []const u8) !void {
234234 // The build system already knows what the output is at this point, we
235235 // only need to communicate that the process has finished.
236236 // Use the empty error bundle to indicate that the update is done.
237 try server.serveErrorBundle(std.zig.ErrorBundle.empty);
237 try server.serveErrorBundle(.error_bundle, std.zig.ErrorBundle.empty);
238238 },
239 else => fatal("unsupported message: {s}", .{@tagName(hdr.tag)}),
239 else => fatal("unsupported message: {t}", .{hdr.tag}),
240240 }
241241 }
242242 }
lib/compiler/resinator/main.zig+4-4
......@@ -704,7 +704,7 @@ const ErrorHandler = union(enum) {
704704 var error_bundle = try cliDiagnosticsToErrorBundle(allocator, diagnostics);
705705 defer error_bundle.deinit(allocator);
706706
707 try server.serveErrorBundle(error_bundle);
707 try server.serveErrorBundle(.error_bundle, error_bundle);
708708 },
709709 .stderr => return diagnostics.renderToStderr(io, args),
710710 }
......@@ -726,7 +726,7 @@ const ErrorHandler = union(enum) {
726726 );
727727 defer error_bundle.deinit(allocator);
728728
729 try server.serveErrorBundle(error_bundle);
729 try server.serveErrorBundle(.error_bundle, error_bundle);
730730 },
731731 .stderr => {
732732 // aro errors have already been emitted
......@@ -751,7 +751,7 @@ const ErrorHandler = union(enum) {
751751 var error_bundle = try diagnosticsToErrorBundle(allocator, source, diagnostics, mappings);
752752 defer error_bundle.deinit(allocator);
753753
754 try server.serveErrorBundle(error_bundle);
754 try server.serveErrorBundle(.error_bundle, error_bundle);
755755 },
756756 .stderr => return diagnostics.renderToStderr(io, cwd, source, mappings),
757757 }
......@@ -773,7 +773,7 @@ const ErrorHandler = union(enum) {
773773 var error_bundle = try errorStringToErrorBundle(allocator, format, args);
774774 defer error_bundle.deinit(allocator);
775775
776 try server.serveErrorBundle(error_bundle);
776 try server.serveErrorBundle(.error_bundle, error_bundle);
777777 },
778778 .stderr => {
779779 const stderr = try io.lockStderr(&.{}, null);
lib/compiler/translate-c/main.zig+1-1
......@@ -105,7 +105,7 @@ fn serveErrorBundle(arena: std.mem.Allocator, io: Io, diagnostics: *const aro.Di
105105 .out = &stdout_writer.interface,
106106 .in = undefined,
107107 };
108 try server.serveErrorBundle(error_bundle);
108 try server.serveErrorBundle(.error_bundle, error_bundle);
109109}
110110
111111pub const usage =
src/main.zig+4-4
......@@ -4453,7 +4453,7 @@ fn serve(
44534453 }
44544454
44554455 if (output.errors.errorMessageCount() != 0) {
4456 try server.serveErrorBundle(output.errors);
4456 try server.serveErrorBundle(.error_bundle, output.errors);
44574457 } else {
44584458 try server.serveEmitDigest(&output.digest, .{
44594459 .flags = .{ .cache_hit = output.cache_hit },
......@@ -4611,7 +4611,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {
46114611 }
46124612
46134613 if (error_bundle.errorMessageCount() > 0) {
4614 try s.serveErrorBundle(error_bundle);
4614 try s.serveErrorBundle(.error_bundle, error_bundle);
46154615 return;
46164616 }
46174617
......@@ -4622,7 +4622,7 @@ fn serveUpdateResults(s: *Server, comp: *Compilation) !void {
46224622 }
46234623
46244624 // Serve empty error bundle to indicate the update is done.
4625 try s.serveErrorBundle(std.zig.ErrorBundle.empty);
4625 try s.serveErrorBundle(.error_bundle, std.zig.ErrorBundle.empty);
46264626}
46274627
46284628fn runOrTest(
......@@ -5157,7 +5157,7 @@ fn jitCmdInner(
51575157 var error_bundle = try comp.getAllErrorsAlloc();
51585158 defer error_bundle.deinit(comp.gpa);
51595159 if (error_bundle.errorMessageCount() > 0) {
5160 try server.serveErrorBundle(error_bundle);
5160 try server.serveErrorBundle(.error_bundle, error_bundle);
51615161 process.exit(2);
51625162 }
51635163 } else {