| ... | @@ -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, |
| 725 | | 725 | |
| 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 { |
| 745 | | 745 | |
| 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 { |