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 20:49:25+02:00
logd8938120130dbe48ee8764b502b18c6224ab9340
tree111d04921ca85fe29331c7362d92e565827d0a72
parent58ab2093d423a59c5e02ebd38cc917d351395342

Maker: fix build when Watch.have_impl is false


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

lib/compiler/Maker.zig+3-2
...@@ -871,7 +871,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -871,7 +871,7 @@ pub fn main(init: process.Init.Minimal) !void {
871 try s.serveStringMessage(.bsp_configuration, try arena.print("{f}", .{scanned_config.path}));871 try s.serveStringMessage(.bsp_configuration, try arena.print("{f}", .{scanned_config.path}));
872872
873 var watch: ?Watch = null;873 var watch: ?Watch = null;
874 defer if (watch) |*w| w.deinit();874 defer if (Watch.have_impl) if (watch) |*w| w.deinit();
875875
876 const Event = union(enum) {876 const Event = union(enum) {
877 message: Reader.Error!Client.Message.Header,877 message: Reader.Error!Client.Message.Header,
...@@ -937,6 +937,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -937,6 +937,7 @@ pub fn main(init: process.Init.Minimal) !void {
937 });937 });
938 is_fs_watching = true;938 is_fs_watching = true;
939 } else if (watch) |*w| {939 } else if (watch) |*w| {
940 if (!Watch.have_impl) unreachable;
940 w.deinit();941 w.deinit();
941 watch = null;942 watch = null;
942 }943 }
...@@ -993,7 +994,7 @@ pub fn main(init: process.Init.Minimal) !void {...@@ -993,7 +994,7 @@ pub fn main(init: process.Init.Minimal) !void {
993 if (!Watch.have_impl) fatal("--watch not yet implemented for {t}", .{native_os});994 if (!Watch.have_impl) fatal("--watch not yet implemented for {t}", .{native_os});
994 break :w try .init(&maker);995 break :w try .init(&maker);
995 };996 };
996 defer if (watch_flag) w.deinit();997 defer if (Watch.have_impl and watch_flag) w.deinit();
997998
998 if (web_server) |ws| try ws.updateConfiguration(&maker);999 if (web_server) |ws| try ws.updateConfiguration(&maker);
9991000