about summary refs log tree commit diff
path: root/src/tools
diff options
context:
space:
mode:
authorLukas Wirth <lukas@zed.dev>2025-08-06 17:46:39 +0200
committerLukas Wirth <lukas@zed.dev>2025-08-06 18:01:44 +0200
commit51c6272baee4e60a525959c2fc9b96103ad5de74 (patch)
tree3d04193a063199e9e2368ec2567b1c5599d52141 /src/tools
parentefbe625e35df7c2a7fa59b94a783f6f160828167 (diff)
downloadrust-51c6272baee4e60a525959c2fc9b96103ad5de74.tar.gz
rust-51c6272baee4e60a525959c2fc9b96103ad5de74.zip
Fix non-lsp compliant `Response` definition
Diffstat (limited to 'src/tools')
-rw-r--r--src/tools/rust-analyzer/Cargo.lock8
-rw-r--r--src/tools/rust-analyzer/Cargo.toml38
-rw-r--r--src/tools/rust-analyzer/lib/lsp-server/Cargo.toml6
-rw-r--r--src/tools/rust-analyzer/lib/lsp-server/src/msg.rs6
4 files changed, 29 insertions, 29 deletions
diff --git a/src/tools/rust-analyzer/Cargo.lock b/src/tools/rust-analyzer/Cargo.lock
index 5a29379ba48..80a311a74ab 100644
--- a/src/tools/rust-analyzer/Cargo.lock
+++ b/src/tools/rust-analyzer/Cargo.lock
@@ -1294,7 +1294,7 @@ checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94"
 
 [[package]]
 name = "lsp-server"
-version = "0.7.8"
+version = "0.7.9"
 dependencies = [
  "anyhow",
  "crossbeam-channel",
@@ -1310,9 +1310,9 @@ dependencies = [
 
 [[package]]
 name = "lsp-server"
-version = "0.7.8"
+version = "0.7.9"
 source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9462c4dc73e17f971ec1f171d44bfffb72e65a130117233388a0ebc7ec5656f9"
+checksum = "7d6ada348dbc2703cbe7637b2dda05cff84d3da2819c24abcb305dd613e0ba2e"
 dependencies = [
  "crossbeam-channel",
  "log",
@@ -2007,7 +2007,7 @@ dependencies = [
  "intern",
  "itertools 0.14.0",
  "load-cargo",
- "lsp-server 0.7.8 (registry+https://github.com/rust-lang/crates.io-index)",
+ "lsp-server 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)",
  "lsp-types",
  "memchr",
  "mimalloc",
diff --git a/src/tools/rust-analyzer/Cargo.toml b/src/tools/rust-analyzer/Cargo.toml
index e7cf0212bf2..01a13a39f7b 100644
--- a/src/tools/rust-analyzer/Cargo.toml
+++ b/src/tools/rust-analyzer/Cargo.toml
@@ -100,7 +100,7 @@ ra-ap-rustc_pattern_analysis = { version = "0.123", default-features = false }
 # in-tree crates that are published separately and follow semver. See lib/README.md
 line-index = { version = "0.1.2" }
 la-arena = { version = "0.3.1" }
-lsp-server = { version = "0.7.8" }
+lsp-server = { version = "0.7.9" }
 
 # non-local crates
 anyhow = "1.0.98"
@@ -125,11 +125,11 @@ memmap2 = "0.9.5"
 nohash-hasher = "0.2.0"
 oorandom = "11.1.5"
 object = { version = "0.36.7", default-features = false, features = [
-  "std",
-  "read_core",
-  "elf",
-  "macho",
-  "pe",
+    "std",
+    "read_core",
+    "elf",
+    "macho",
+    "pe",
 ] }
 process-wrap = { version = "8.2.1", features = ["std"] }
 pulldown-cmark-to-cmark = "10.0.4"
@@ -139,9 +139,9 @@ rowan = "=0.15.15"
 # Ideally we'd not enable the macros feature but unfortunately the `tracked` attribute does not work
 # on impls without it
 salsa = { version = "0.23.0", default-features = true, features = [
-  "rayon",
-  "salsa_unstable",
-  "macros",
+    "rayon",
+    "salsa_unstable",
+    "macros",
 ] }
 salsa-macros = "0.23.0"
 semver = "1.0.26"
@@ -151,9 +151,9 @@ serde_json = "1.0.140"
 rustc-hash = "2.1.1"
 rustc-literal-escaper = "0.0.4"
 smallvec = { version = "1.15.1", features = [
-  "const_new",
-  "union",
-  "const_generics",
+    "const_new",
+    "union",
+    "const_generics",
 ] }
 smol_str = "0.3.2"
 temp-dir = "0.1.16"
@@ -161,12 +161,12 @@ text-size = "1.1.1"
 tracing = "0.1.41"
 tracing-tree = "0.4.0"
 tracing-subscriber = { version = "0.3.19", default-features = false, features = [
-  "registry",
-  "fmt",
-  "local-time",
-  "std",
-  "time",
-  "tracing-log",
+    "registry",
+    "fmt",
+    "local-time",
+    "std",
+    "time",
+    "tracing-log",
 ] }
 triomphe = { version = "0.1.14", default-features = false, features = ["std"] }
 url = "2.5.4"
@@ -176,7 +176,7 @@ xshell = "0.2.7"
 dashmap = { version = "=6.1.0", features = ["raw-api", "inline"] }
 # We need to freeze the version of the crate, as it needs to match with dashmap
 hashbrown = { version = "0.14.*", features = [
-  "inline-more",
+    "inline-more",
 ], default-features = false }
 
 [workspace.lints.rust]
diff --git a/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml b/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml
index 1fc1da50a0a..f56a0de6163 100644
--- a/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml
+++ b/src/tools/rust-analyzer/lib/lsp-server/Cargo.toml
@@ -1,6 +1,6 @@
 [package]
 name = "lsp-server"
-version = "0.7.8"
+version = "0.7.9"
 description = "Generic LSP server scaffold."
 license = "MIT OR Apache-2.0"
 repository = "https://github.com/rust-lang/rust-analyzer/tree/master/lib/lsp-server"
@@ -16,9 +16,9 @@ crossbeam-channel.workspace = true
 [dev-dependencies]
 lsp-types = "=0.95"
 ctrlc = "3.4.7"
-anyhow.workspace     = true
+anyhow.workspace = true
 rustc-hash.workspace = true
-toolchain.workspace  = true
+toolchain.workspace = true
 
 [lints]
 workspace = true
diff --git a/src/tools/rust-analyzer/lib/lsp-server/src/msg.rs b/src/tools/rust-analyzer/lib/lsp-server/src/msg.rs
index 399d674e41d..0b8f8da4c7d 100644
--- a/src/tools/rust-analyzer/lib/lsp-server/src/msg.rs
+++ b/src/tools/rust-analyzer/lib/lsp-server/src/msg.rs
@@ -84,9 +84,9 @@ pub struct Response {
     // request id. We fail deserialization in that case, so we just
     // make this field mandatory.
     pub id: RequestId,
-    #[serde(skip_serializing_if = "Option::is_none")]
+    #[serde(skip_serializing_if = "Option::is_none", default)]
     pub result: Option<serde_json::Value>,
-    #[serde(skip_serializing_if = "Option::is_none")]
+    #[serde(skip_serializing_if = "Option::is_none", default)]
     pub error: Option<ResponseError>,
 }
 
@@ -94,7 +94,7 @@ pub struct Response {
 pub struct ResponseError {
     pub code: i32,
     pub message: String,
-    #[serde(skip_serializing_if = "Option::is_none")]
+    #[serde(skip_serializing_if = "Option::is_none", default)]
     pub data: Option<serde_json::Value>,
 }