diff options
author | Bartek IwaĆczuk <biwanczuk@gmail.com> | 2023-05-26 06:31:54 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-05-26 04:31:54 +0000 |
commit | 7ae55e75d812edc93251357465f8d49fc2fb5d26 (patch) | |
tree | 9d9a803cec2c5fd0dc6709f43115b82515c2dc32 /cli/lsp/language_server.rs | |
parent | 89026abe395c22eb2ace4ea5f948189daa1dadf1 (diff) |
Revert "chore(lsp/tests): diagnostic synchronization (#19264)" (#19268)
This reverts commit 89026abe395c22eb2ace4ea5f948189daa1dadf1.
This change caused LSP benchmarks to fail on `main`.
Diffstat (limited to 'cli/lsp/language_server.rs')
-rw-r--r-- | cli/lsp/language_server.rs | 27 |
1 files changed, 5 insertions, 22 deletions
diff --git a/cli/lsp/language_server.rs b/cli/lsp/language_server.rs index 7c4191c82..9a2b067c6 100644 --- a/cli/lsp/language_server.rs +++ b/cli/lsp/language_server.rs @@ -46,7 +46,6 @@ use super::completions; use super::config::Config; use super::config::SETTINGS_SECTION; use super::diagnostics; -use super::diagnostics::DiagnosticServerUpdateMessage; use super::diagnostics::DiagnosticsServer; use super::documents::to_hover_text; use super::documents::to_lsp_range; @@ -343,22 +342,6 @@ impl LanguageServer { } } - /// This request is only used by the lsp integration tests to - /// coordinate the tests receiving the latest diagnostics. - pub async fn latest_diagnostic_batch_index_request( - &self, - ) -> LspResult<Option<Value>> { - Ok( - self - .0 - .read() - .await - .diagnostics_server - .latest_batch_index() - .map(|v| v.into()), - ) - } - pub async fn performance_request(&self) -> LspResult<Option<Value>> { Ok(Some(self.0.read().await.get_performance())) } @@ -2949,11 +2932,11 @@ impl Inner { } fn send_diagnostics_update(&self) { - let snapshot = DiagnosticServerUpdateMessage { - snapshot: self.snapshot(), - config: self.config.snapshot(), - lint_options: self.lint_options.clone(), - }; + let snapshot = ( + self.snapshot(), + self.config.snapshot(), + self.lint_options.clone(), + ); if let Err(err) = self.diagnostics_server.update(snapshot) { error!("Cannot update diagnostics: {}", err); } |