Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Debounce language server reinstall attempts (#8277)
Thorsten Ball6d912248827e
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rsindex 4b136b1169b..8446cf06823 100644--- a/crates/project/src/project.rs+++ b/crates/project/src/project.rs@@ -100,6 +100,7 @@ pub use task_inventory::Inventory;pub use worktree::*;const MAX_SERVER_REINSTALL_ATTEMPT_COUNT: u64 = 4;+const SERVER_REINSTALL_DEBOUNCE_TIMEOUT: Duration = Duration::from_secs(1);const SERVER_LAUNCHING_BEFORE_SHUTDOWN_TIMEOUT: Duration = Duration::from_secs(5);pub trait Item {@@ -2877,6 +2878,14 @@ impl Project {return None;}+ log::info!(+ "retrying installation of language server {server_name:?} in {}s",+ SERVER_REINSTALL_DEBOUNCE_TIMEOUT.as_secs()+ );+ cx.background_executor()+ .timer(SERVER_REINSTALL_DEBOUNCE_TIMEOUT)+ .await;+let installation_test_binary = adapter.installation_test_binary(container_dir.to_path_buf()).await;