| ... | ... | @@ -841,7 +841,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 841 | 841 | try s.serveStringMessage(.bsp_configuration, try arena.print("{f}", .{scanned_config.path})); |
| 842 | 842 | |
| 843 | 843 | var watch: ?Watch = null; |
| 844 | | defer if (watch) |*w| w.deinit(); |
| 844 | defer if (Watch.have_impl) if (watch) |*w| w.deinit(); |
| 845 | 845 | |
| 846 | 846 | const Event = union(enum) { |
| 847 | 847 | message: Reader.Error!Client.Message.Header, |
| ... | ... | @@ -907,6 +907,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 907 | 907 | }); |
| 908 | 908 | is_fs_watching = true; |
| 909 | 909 | } else if (watch) |*w| { |
| 910 | if (!Watch.have_impl) unreachable; |
| 910 | 911 | w.deinit(); |
| 911 | 912 | watch = null; |
| 912 | 913 | } |
| ... | ... | @@ -963,7 +964,7 @@ pub fn main(init: process.Init.Minimal) !void { |
| 963 | 964 | if (!Watch.have_impl) fatal("--watch not yet implemented for {t}", .{native_os}); |
| 964 | 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(); |
| 967 | 968 | |
| 968 | 969 | if (web_server) |ws| try ws.updateConfiguration(&maker); |
| 969 | 970 | |