authorgravatar for ypsvlq@gmail.comElaine Gibson <ypsvlq@gmail.com> 2026-10-13 11:11:34+01:00
committergravatar for alex@alexrp.comAlex Rønne Petersen <alex@alexrp.com> 2026-10-14 21:08:41+02:00
log02a63f88744baffacee9084544321b02289a754e
treeb1dfa6677e0c6155bd01adfa47275b22f556257f
parent3f0f63cfba14a81020902941187a166c20bfbfb7
signature Signed by SSH key SHA256:7B/LJ7bpR1eX8aCXSr4mtd5M45VMPKcx9zY8e95b5QM

Maker: fix build when Watch.have_impl is false


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

lib/compiler/Maker.zig+3-2
...@@ -841,7 +841,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -841,7 +841,7 @@ pub fn main(init: process.Init.Minimal) !void {
841 try s.serveStringMessage(.bsp_configuration, try arena.print("{f}", .{scanned_config.path}));841 try s.serveStringMessage(.bsp_configuration, try arena.print("{f}", .{scanned_config.path}));
842842
843 var watch: ?Watch = null;843 var watch: ?Watch = null;
844 defer if (watch) |*w| w.deinit();844 defer if (Watch.have_impl) if (watch) |*w| w.deinit();
845845
846 const Event = union(enum) {846 const Event = union(enum) {
847 message: Reader.Error!Client.Message.Header,847 message: Reader.Error!Client.Message.Header,
...@@ -907,6 +907,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -907,6 +907,7 @@ pub fn main(init: process.Init.Minimal) !void {
907 });907 });
908 is_fs_watching = true;908 is_fs_watching = true;
909 } else if (watch) |*w| {909 } else if (watch) |*w| {
910 if (!Watch.have_impl) unreachable;
910 w.deinit();911 w.deinit();
911 watch = null;912 watch = null;
912 }913 }
...@@ -963,7 +964,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -963,7 +964,7 @@ pub fn main(init: process.Init.Minimal) !void {
963 if (!Watch.have_impl) fatal("--watch not yet implemented for {t}", .{native_os});964 if (!Watch.have_impl) fatal("--watch not yet implemented for {t}", .{native_os});
964 break :w try .init(&maker);965 break :w try .init(&maker);
965 };966 };
966 defer if (watch_flag) w.deinit();967 defer if (Watch.have_impl and watch_flag) w.deinit();
967968
968 if (web_server) |ws| try ws.updateConfiguration(&maker);969 if (web_server) |ws| try ws.updateConfiguration(&maker);
969970