aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_lsp_server/src/lib.rs
diff options
context:
space:
mode:
authorEmil Lauridsen <[email protected]>2020-01-31 18:23:25 +0000
committerEmil Lauridsen <[email protected]>2020-02-03 10:34:24 +0000
commit790788d5f4013d8d92f110bc12a581d18cf4b6ae (patch)
tree311e11529c7546b7a09486d5c161039d8bd8f975 /crates/ra_lsp_server/src/lib.rs
parent52456c44901c8c38c8bcb742ebe305484af8f36f (diff)
Rework how we send diagnostics to client.
The previous way of sending from the thread pool suffered from stale diagnostics due to being canceled before we could clear the old ones. The key change is moving to sending diagnostics from the main loop thread, but doing all the hard work in the thread pool. This should provide the best of both worlds, with little to no of the downsides. This should hopefully fix a lot of issues, but we'll need testing in each individual issue to be sure.
Diffstat (limited to 'crates/ra_lsp_server/src/lib.rs')
-rw-r--r--crates/ra_lsp_server/src/lib.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/crates/ra_lsp_server/src/lib.rs b/crates/ra_lsp_server/src/lib.rs
index 2ca149fd5..1208c1343 100644
--- a/crates/ra_lsp_server/src/lib.rs
+++ b/crates/ra_lsp_server/src/lib.rs
@@ -29,6 +29,7 @@ mod markdown;
29pub mod req; 29pub mod req;
30mod config; 30mod config;
31mod world; 31mod world;
32mod diagnostics;
32 33
33pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>; 34pub type Result<T> = std::result::Result<T, Box<dyn std::error::Error + Send + Sync>>;
34pub use crate::{ 35pub use crate::{