From 2be06c725f66238131a476efbbb9bbead9cde722 Mon Sep 17 00:00:00 2001 From: peefy Date: Mon, 9 Sep 2024 21:58:57 +0800 Subject: [PATCH] chore: bump lsp-server to v0.7.7 Signed-off-by: peefy --- kclvm/Cargo.lock | 4 ++-- kclvm/sema/src/ty/context.rs | 1 - kclvm/tools/src/LSP/Cargo.toml | 2 +- kclvm/tools/src/LSP/src/notification.rs | 2 +- kclvm/tools/src/LSP/src/state.rs | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) diff --git a/kclvm/Cargo.lock b/kclvm/Cargo.lock index af1b2e2f3..f2d8e8fd1 100644 --- a/kclvm/Cargo.lock +++ b/kclvm/Cargo.lock @@ -2313,9 +2313,9 @@ checksum = "a7a70ba024b9dc04c27ea2f0c0548feb474ec5c54bba33a7f72f873a39d07b24" [[package]] name = "lsp-server" -version = "0.7.6" +version = "0.7.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "248f65b78f6db5d8e1b1604b4098a28b43d21a8eb1deeca22b1c421b276c7095" +checksum = "550446e84739dcaf6d48a4a093973850669e13e8a34d8f8d64851041be267cd9" dependencies = [ "crossbeam-channel", "log", diff --git a/kclvm/sema/src/ty/context.rs b/kclvm/sema/src/ty/context.rs index bea447e71..68ff929fc 100644 --- a/kclvm/sema/src/ty/context.rs +++ b/kclvm/sema/src/ty/context.rs @@ -2,7 +2,6 @@ use std::collections::HashMap; use std::sync::Arc; use super::{sup, DictType, Type, TypeFlags, TypeKind, TypeRef}; -use petgraph::algo::is_cyclic_directed; use petgraph::graph::{DiGraph, NodeIndex}; use petgraph::visit::{depth_first_search, DfsEvent}; diff --git a/kclvm/tools/src/LSP/Cargo.toml b/kclvm/tools/src/LSP/Cargo.toml index 5fd28f507..2f97ee6b9 100644 --- a/kclvm/tools/src/LSP/Cargo.toml +++ b/kclvm/tools/src/LSP/Cargo.toml @@ -32,7 +32,7 @@ compiler_base_session = "0.1.3" kclvm-query = { path = "../../../query" } kclvm-span = { path = "../../../span" } -lsp-server = { version = "0.7.0", default-features = false } +lsp-server = { version = "0.7.7", default-features = false } anyhow = { version = "1.0", default-features = false, features = ["std"] } crossbeam-channel = { version = "0.5.7", default-features = false } ra_ap_vfs = "0.0.149" diff --git a/kclvm/tools/src/LSP/src/notification.rs b/kclvm/tools/src/LSP/src/notification.rs index 923021499..3e1bae1a1 100644 --- a/kclvm/tools/src/LSP/src/notification.rs +++ b/kclvm/tools/src/LSP/src/notification.rs @@ -36,7 +36,7 @@ impl LanguageServerState { lsp_types::NumberOrString::Number(id) => id.into(), lsp_types::NumberOrString::String(id) => id.into(), }; - self.request_queue.incoming.complete(id); + self.request_queue.incoming.complete(&id); Ok(()) } diff --git a/kclvm/tools/src/LSP/src/state.rs b/kclvm/tools/src/LSP/src/state.rs index 4d196f6ab..4ee297c90 100644 --- a/kclvm/tools/src/LSP/src/state.rs +++ b/kclvm/tools/src/LSP/src/state.rs @@ -396,7 +396,7 @@ impl LanguageServerState { /// Sends a response to the client. This method logs the time it took us to reply /// to a request from the client. pub(super) fn respond(&mut self, response: lsp_server::Response) -> anyhow::Result<()> { - if let Some((method, start)) = self.request_queue.incoming.complete(response.id.clone()) { + if let Some((method, start)) = self.request_queue.incoming.complete(&response.id) { let duration = start.elapsed(); self.send(response.into())?; self.log_message(format!(