authorgravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-24 20:16:41-07:00
committergravatar for andrew@ziglang.orgAndrew Kelley <andrew@ziglang.org> 2026-06-29 23:50:20-07:00
log39342e6ce73467474388ad53fc1f897862b53064
tree8bade8947d26d5a38d648734c924df65c446a19d
parent56db3dd85f794803f462cffc38225a67a27401cc

Maker: set web_server field earlier


1 files changed, 7 insertions(+), 2 deletions(-)

lib/compiler/Maker.zig+7-2
...@@ -724,7 +724,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -724,7 +724,7 @@ pub fn main(init: process.Init.Minimal) !void {
724 .unit_test_timeout_ns = test_timeout_ns,724 .unit_test_timeout_ns = test_timeout_ns,
725725
726 .watch = watch,726 .watch = watch,
727 .web_server = undefined, // set after `prepare`727 .web_server = web_server,
728 .memory_blocked_steps = .empty,728 .memory_blocked_steps = .empty,
729 .step_stack = .empty,729 .step_stack = .empty,
730 .pkg_config = .{ .debug = debug_pkg_config },730 .pkg_config = .{ .debug = debug_pkg_config },
...@@ -745,6 +745,8 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -745,6 +745,8 @@ pub fn main(init: process.Init.Minimal) !void {
745745
746 maker.prepare(step_names.items) catch |err| switch (err) {746 maker.prepare(step_names.items) catch |err| switch (err) {
747 error.DependencyLoopDetected, error.InsufficientMemory => {747 error.DependencyLoopDetected, error.InsufficientMemory => {
748 // TODO handle DependencyLoopDetected as error.FailedButCacheIntact
749 // and handle InsufficientMemory as error.AlreadyReported
748 _ = io.lockStderr(&.{}, graph.stderr_mode) catch {};750 _ = io.lockStderr(&.{}, graph.stderr_mode) catch {};
749 process.exit(1);751 process.exit(1);
750 },752 },
...@@ -838,7 +840,10 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -838,7 +840,10 @@ pub fn main(init: process.Init.Minimal) !void {
838 break :w false;840 break :w false;
839 },841 },
840 };842 };
841 if (!server_mode) process.exit(1);843 if (!server_mode) {
844 _ = io.lockStderr(&.{}, graph.stderr_mode) catch {};
845 process.exit(1);
846 }
842 if (can_fs_watch) {847 if (can_fs_watch) {
843 @panic("TODO set up fs watching");848 @panic("TODO set up fs watching");
844 } else {849 } else {