| ... | ... | @@ -871,7 +871,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 871 | 871 | try s.serveStringMessage(.bsp_configuration, try arena.print("{f}", .{scanned_config.path})); |
| 872 | 872 | |
| 873 | 873 | var watch: ?Watch = null; |
| 874 | | defer if (watch) |*w| w.deinit(); |
| 874 | defer if (Watch.have_impl) if (watch) |*w| w.deinit(); |
| 875 | 875 | |
| 876 | 876 | const Event = union(enum) { |
| 877 | 877 | message: Reader.Error!Client.Message.Header, |
| ... | ... | @@ -937,6 +937,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 937 | 937 | }); |
| 938 | 938 | is_fs_watching = true; |
| 939 | 939 | } else if (watch) |*w| { |
| 940 | if (!Watch.have_impl) unreachable; |
| 940 | 941 | w.deinit(); |
| 941 | 942 | watch = null; |
| 942 | 943 | } |
| ... | ... | @@ -993,7 +994,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 993 | 994 | if (!Watch.have_impl) fatal("--watch not yet implemented for {t}", .{native_os}); |
| 994 | 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(); |
| 997 | 998 | |
| 998 | 999 | if (web_server) |ws| try ws.updateConfiguration(&maker); |
| 999 | 1000 | |