Merge #2824
2824: Defer cargo check until after workspace load r=kiljacken a=kiljacken Fixes #2822 Co-authored-by: Emil Lauridsen <mine809@gmail.com>
This commit is contained in:
commit
27abd4a1a5
@ -184,8 +184,13 @@ fn new(
|
||||
workspace_root: PathBuf,
|
||||
shared: Arc<RwLock<CheckWatcherSharedState>>,
|
||||
) -> 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<CheckTask>, cmd_recv: &Receiver<CheckCommand>) {
|
||||
@ -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<String> = vec![
|
||||
options.command.clone(),
|
||||
|
@ -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 {
|
||||
|
Loading…
Reference in New Issue
Block a user