diff --git a/crates/ra_cargo_watch/src/lib.rs b/crates/ra_cargo_watch/src/lib.rs index cb0856aa43e..20fa5a924ec 100644 --- a/crates/ra_cargo_watch/src/lib.rs +++ b/crates/ra_cargo_watch/src/lib.rs @@ -184,8 +184,13 @@ fn new( workspace_root: PathBuf, shared: Arc>, ) -> CheckWatcherState { - let watcher = WatchThread::new(&options, &workspace_root); - CheckWatcherState { options, workspace_root, watcher, last_update_req: None, shared } + CheckWatcherState { + options, + workspace_root, + watcher: WatchThread::dummy(), + last_update_req: None, + shared, + } } fn run(&mut self, task_send: &Sender, cmd_recv: &Receiver) { @@ -313,6 +318,10 @@ enum CheckEvent { } impl WatchThread { + fn dummy() -> WatchThread { + WatchThread { handle: None, message_recv: never() } + } + fn new(options: &CheckOptions, workspace_root: &PathBuf) -> WatchThread { let mut args: Vec = vec![ options.command.clone(), diff --git a/crates/ra_lsp_server/src/main_loop.rs b/crates/ra_lsp_server/src/main_loop.rs index 7a49cad8664..84012b99da2 100644 --- a/crates/ra_lsp_server/src/main_loop.rs +++ b/crates/ra_lsp_server/src/main_loop.rs @@ -417,6 +417,7 @@ fn loop_turn( let msg = format!("workspace loaded, {} rust packages", n_packages); show_message(req::MessageType::Info, msg, &connection.sender); } + world_state.check_watcher.update(); } if state_changed {