Unnamed repository; edit this file 'description' to name the repository.
bendn 2 days ago
parent faeff4f · commit 1f98bca
-rw-r--r--Cargo.lock930
-rw-r--r--crates/base-db/src/lib.rs22
-rw-r--r--crates/ide/src/file_structure.rs18
-rw-r--r--crates/ide/src/lib.rs1
-rw-r--r--crates/ide/src/typing.rs25
-rw-r--r--crates/rust-analyzer/Cargo.toml13
-rw-r--r--crates/rust-analyzer/src/bin/mod.rs (renamed from crates/rust-analyzer/src/bin/main.rs)77
-rw-r--r--crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs28
-rw-r--r--crates/rust-analyzer/src/handlers/dispatch.rs3
-rw-r--r--crates/rust-analyzer/src/handlers/request.rs12
-rw-r--r--crates/rust-analyzer/src/lib.rs2
-rw-r--r--crates/rust-analyzer/src/lsp/capabilities.rs2
-rw-r--r--crates/rust-analyzer/src/lsp/ext.rs73
-rw-r--r--crates/rust-analyzer/src/lsp/to_proto.rs28
-rw-r--r--crates/rust-analyzer/src/main_loop.rs9
-rw-r--r--lib/lsp-server/Cargo.toml3
-rw-r--r--lib/lsp-server/src/error.rs8
-rw-r--r--lib/lsp-server/src/lib.rs12
-rw-r--r--lib/lsp-server/src/msg.rs25
-rw-r--r--lib/lsp-server/src/socket.rs5
-rw-r--r--lib/lsp-server/src/stdio.rs46
-rw-r--r--lib/smol_str/src/lib.rs4
22 files changed, 752 insertions, 594 deletions
diff --git a/Cargo.lock b/Cargo.lock
index cbbeef0030..947e5e7fb5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -4,9 +4,9 @@ version = 4
[[package]]
name = "addr2line"
-version = "0.24.2"
+version = "0.25.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
+checksum = "1b5d307320b3181d6d7954e663bd7c774a838b8220fe0593c86d9fb09f498b4b"
dependencies = [
"gimli",
]
@@ -40,15 +40,15 @@ checksum = "4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299"
[[package]]
name = "anstyle"
-version = "1.0.11"
+version = "1.0.13"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "862ed96ca487e809f1c8e5a8447f6ee2cf102f846893800b20cebdf541fc6bbd"
+checksum = "5192cca8006f1fd4f7237516f40fa183bb07f8fbdfedaa0036de5ea9b0b45e78"
[[package]]
name = "anyhow"
-version = "1.0.100"
+version = "1.0.102"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a23eb6b1614318a8071c9b2521f36b424b2c83db5eb3a0fead4a6c0809af6e61"
+checksum = "7f202df86484c868dbad7eaa557ef785d5c66295e41b460ef922eca0723b842c"
[[package]]
name = "arbitrary"
@@ -82,17 +82,17 @@ checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
[[package]]
name = "backtrace"
-version = "0.3.75"
+version = "0.3.76"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6806a6321ec58106fea15becdad98371e28d92ccbc7c8f1b3b6dd724fe8f1002"
+checksum = "bb531853791a215d7c62a30daf0dde835f381ab5de4589cfe7c649d2cbe92bd6"
dependencies = [
"addr2line",
"cfg-if",
"libc",
"miniz_oxide",
- "object",
+ "object 0.37.3",
"rustc-demangle",
- "windows-targets 0.52.6",
+ "windows-link 0.2.1",
]
[[package]]
@@ -145,15 +145,24 @@ checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a"
[[package]]
name = "bitflags"
-version = "2.9.4"
+version = "2.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2261d10cca569e4643e526d8dc2e62e433cc8aba21ab764233731f8d369bf394"
+checksum = "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af"
+
+[[package]]
+name = "block2"
+version = "0.6.2"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "cdeb9d870516001442e364c5220d3574d2da8dc765554b4a617230d33fa58ef5"
+dependencies = [
+ "objc2",
+]
[[package]]
name = "borsh"
-version = "1.5.7"
+version = "1.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce"
+checksum = "d1da5ab77c1437701eeff7c88d968729e7766172279eab0676857b3d63af7a6f"
dependencies = [
"cfg_aliases",
]
@@ -166,9 +175,9 @@ checksum = "36f64beae40a84da1b4b26ff2761a5b895c12adc41dc25aaee1c4f2bbfe97a6e"
[[package]]
name = "bumpalo"
-version = "3.19.0"
+version = "3.20.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "46c5e41b57b8bba42a04676d81cb89e9ee8e859a1a66f80a5a72e1cb76b34d43"
+checksum = "5d20789868f4b01b2f2caec9f5c4e0213b41e3e5702a50157d699ae31ced2fcb"
[[package]]
name = "byteorder"
@@ -187,25 +196,26 @@ dependencies = [
[[package]]
name = "cargo-platform"
-version = "0.3.1"
+version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "122ec45a44b270afd1402f351b782c676b173e3c3fb28d86ff7ebfb4d86a4ee4"
+checksum = "87a0c0e6148f11f01f32650a2ea02d532b2ad4e81d8bd41e6e565b5adc5e6082"
dependencies = [
"serde",
+ "serde_core",
]
[[package]]
name = "cargo_metadata"
-version = "0.23.0"
+version = "0.23.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "981a6f317983eec002839b90fae7411a85621410ae591a9cab2ecf5cb5744873"
+checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9"
dependencies = [
"camino",
"cargo-platform",
"semver",
"serde",
"serde_json",
- "thiserror 2.0.16",
+ "thiserror 2.0.18",
]
[[package]]
@@ -216,9 +226,9 @@ checksum = "37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5"
[[package]]
name = "cc"
-version = "1.2.38"
+version = "1.2.56"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "80f41ae168f955c12fb8960b057d70d0ca153fb83182b57d86380443527be7e9"
+checksum = "aebf35691d1bfb0ac386a69bac2fde4dd276fb618cf8bf4f5318fe285e821bb2"
dependencies = [
"find-msvc-tools",
"shlex",
@@ -242,9 +252,9 @@ dependencies = [
[[package]]
name = "cfg-if"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2fd1289c04a9ea8cb22300a459a72a385d7c73d3259e2ed7dcb2af674838cfa9"
+checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
[[package]]
name = "cfg_aliases"
@@ -281,18 +291,18 @@ dependencies = [
[[package]]
name = "clap"
-version = "4.5.48"
+version = "4.5.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e2134bb3ea021b78629caa971416385309e0131b351b25e01dc16fb54e1b5fae"
+checksum = "2797f34da339ce31042b27d23607e051786132987f595b02ba4f6a6dffb7030a"
dependencies = [
"clap_builder",
]
[[package]]
name = "clap_builder"
-version = "4.5.48"
+version = "4.5.60"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c2ba64afa3c0a6df7fa517765e31314e983f51dda798ffba27b988194fb65dc9"
+checksum = "24a241312cea5059b13574bb9b3861cabf758b879c15190b37b6d6fd63ab6876"
dependencies = [
"anstyle",
"clap_lex",
@@ -300,9 +310,9 @@ dependencies = [
[[package]]
name = "clap_lex"
-version = "0.7.5"
+version = "1.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b94f61472cee1439c0b966b47e3aca9ae07e45d070759512cd390ea2bebc6675"
+checksum = "3a822ea5bc7590f9d40f1ba12c0dc3c2760f3482c6984db1573ad11031420831"
[[package]]
name = "cobs"
@@ -310,7 +320,7 @@ version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fa961b519f0b462e3a3b4a34b64d119eeaca1d59af726fe450bbba07a9fc0a1"
dependencies = [
- "thiserror 2.0.16",
+ "thiserror 2.0.18",
]
[[package]]
@@ -321,9 +331,9 @@ checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636"
[[package]]
name = "cov-mark"
-version = "2.1.0"
+version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3f1d92727879fb4f24cec33a35e3bff74035541326cbc12ad44ba8886d1927b0"
+checksum = "90863d8442510cddf7f46618c4f92413774635771a3e80830c8b30d183420b14"
[[package]]
name = "crc32fast"
@@ -424,13 +434,13 @@ checksum = "460fbee9c2c2f33933d720630a6a0bac33ba7053db5344fac858d4b8952d77d5"
[[package]]
name = "ctrlc"
-version = "3.5.0"
+version = "3.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "881c5d0a13b2f1498e2306e82cbada78390e152d4b1378fb28a84f4dcd0dc4f3"
+checksum = "e0b1fab2ae45819af2d0731d60f2afe17227ebb1a1538a236da84c93e9a60162"
dependencies = [
- "dispatch",
- "nix",
- "windows-sys 0.61.0",
+ "dispatch2",
+ "nix 0.31.1",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -449,9 +459,9 @@ dependencies = [
[[package]]
name = "deranged"
-version = "0.5.3"
+version = "0.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d630bccd429a5bb5a64b5e94f693bfc48c9f8566418fda4c494cc94f911f87cc"
+checksum = "7cd812cc2bc1d69d4764bd80df88b4317eaef9e773c75226407d9bc0876b211c"
dependencies = [
"powerfmt",
]
@@ -512,14 +522,20 @@ dependencies = [
"libc",
"option-ext",
"redox_users",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
-name = "dispatch"
-version = "0.2.0"
+name = "dispatch2"
+version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd0c93bb4b0c6d9b77f4435b0ae98c24d17f1c45b2ff844c6151a07256ca923b"
+checksum = "89a09f22a6c6069a18470eb92d2298acf25463f14256d24778e1230d789a2aec"
+dependencies = [
+ "bitflags 2.11.0",
+ "block2",
+ "libc",
+ "objc2",
+]
[[package]]
name = "displaydoc"
@@ -574,9 +590,9 @@ checksum = "edd0f118536f44f5ccd48bcb8b111bdc3de888b58c74639dfb034a357d0f206d"
[[package]]
name = "ena"
-version = "0.14.3"
+version = "0.14.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5"
+checksum = "eabffdaee24bd1bf95c5ef7cec31260444317e72ea56c4c91750e8b7ee58d5f1"
dependencies = [
"log",
]
@@ -594,7 +610,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb"
dependencies = [
"libc",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -615,9 +631,9 @@ checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be"
[[package]]
name = "find-msvc-tools"
-version = "0.1.2"
+version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1ced73b1dacfc750a6db6c0a0c3a3853c8b41997e2e2c563dc90804ae6867959"
+checksum = "5baebc0774151f905a1a2cc41989300b1e6fbb29aff0ceffa1064fdd3088d582"
[[package]]
name = "fixedbitset"
@@ -627,9 +643,9 @@ checksum = "1d674e81391d1e1ab681a28d99df07927c6d4aa5b027d7da16ba32d1d21ecd99"
[[package]]
name = "flate2"
-version = "1.1.2"
+version = "1.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a3d7db9596fecd151c5f638c0ee5d5bd487b6e0ea232e5dc96d5250f6f94b1d"
+checksum = "843fba2746e448b37e26a819579957415c8cef339bf08564fe8b7ddbd959573c"
dependencies = [
"crc32fast",
"miniz_oxide",
@@ -679,9 +695,9 @@ checksum = "7ab85b9b05e3978cc9a9cf8fea7f01b494e1a09ed3037e16ba39edc7a29eb61a"
[[package]]
name = "getrandom"
-version = "0.2.16"
+version = "0.2.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592"
+checksum = "ff2abc00be7fca6ebc474524697ae276ad847ad0a6b3faa4bcb027e9a4614ad0"
dependencies = [
"cfg-if",
"libc",
@@ -701,10 +717,23 @@ dependencies = [
]
[[package]]
+name = "getrandom"
+version = "0.4.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "139ef39800118c7683f2fd3c98c1b23c09ae076556b435f8e9064ae108aaeeec"
+dependencies = [
+ "cfg-if",
+ "libc",
+ "r-efi",
+ "wasip2",
+ "wasip3",
+]
+
+[[package]]
name = "gimli"
-version = "0.31.1"
+version = "0.32.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
+checksum = "e629b9b98ef3dd8afe6ca2bd0f89306cec16d43d907889945bc5d6687f2f13c7"
[[package]]
name = "half"
@@ -738,22 +767,20 @@ version = "0.15.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9229cfe53dfd69f0609a49f65461bd93001ea1ef889cd5529dd176593f5338a1"
dependencies = [
- "allocator-api2",
- "equivalent",
"foldhash 0.1.5",
]
[[package]]
name = "hashbrown"
-version = "0.16.0"
+version = "0.16.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
+checksum = "841d1cc9bed7f9236f321df977030373f4a4163ae1a7dbfe1a51a2c1a51d9100"
[[package]]
name = "hashbrown"
-version = "0.17.0"
+version = "0.17.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4f467dd6dccf739c208452f8014c75c18bb8301b050ad1cfb27153803edb0f51"
+checksum = "ed5909b6e89a2db4456e54cd5f673791d7eca6732202bbf2a9cc504fe2f9b84a"
dependencies = [
"allocator-api2",
"equivalent",
@@ -784,6 +811,23 @@ dependencies = [
]
[[package]]
+name = "heck"
+version = "0.5.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
+
+[[package]]
+name = "helix-lsp-types"
+version = "0.95.1"
+source = "git+https://git.bendn.org/helix#6a9523aefc18ffebbb42854df94ad4e9bfc6133c"
+dependencies = [
+ "bitflags 2.11.0",
+ "serde",
+ "serde_json",
+ "url",
+]
+
+[[package]]
name = "hermit-abi"
version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -827,7 +871,7 @@ version = "0.0.0"
dependencies = [
"arrayvec",
"base-db",
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"cfg",
"cov-mark",
"drop_bomb",
@@ -893,7 +937,7 @@ version = "0.0.0"
dependencies = [
"arrayvec",
"base-db",
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"cov-mark",
"either",
"ena",
@@ -941,14 +985,14 @@ version = "0.5.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cc627f471c528ff0c4a49e1d5e60450c8f6461dd6d10ba9dcd3a61d3dff7728d"
dependencies = [
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
name = "icu_collections"
-version = "2.0.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "200072f5d0e3614556f94a9930d5dc3e0662a652823904c3a75dc3b0af7fee47"
+checksum = "4c6b649701667bbe825c3b7e6388cb521c23d88644678e83c0c4d0a621a34b43"
dependencies = [
"displaydoc",
"potential_utf",
@@ -959,9 +1003,9 @@ dependencies = [
[[package]]
name = "icu_locale_core"
-version = "2.0.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0cde2700ccaed3872079a65fb1a78f6c0a36c91570f28755dda67bc8f7d9f00a"
+checksum = "edba7861004dd3714265b4db54a3c390e880ab658fec5f7db895fae2046b5bb6"
dependencies = [
"displaydoc",
"litemap",
@@ -972,11 +1016,10 @@ dependencies = [
[[package]]
name = "icu_normalizer"
-version = "2.0.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "436880e8e18df4d7bbc06d58432329d6458cc84531f7ac5f024e93deadb37979"
+checksum = "5f6c8828b67bf8908d82127b2054ea1b4427ff0230ee9141c54251934ab1b599"
dependencies = [
- "displaydoc",
"icu_collections",
"icu_normalizer_data",
"icu_properties",
@@ -987,42 +1030,38 @@ dependencies = [
[[package]]
name = "icu_normalizer_data"
-version = "2.0.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "00210d6893afc98edb752b664b8890f0ef174c8adbb8d0be9710fa66fbbf72d3"
+checksum = "7aedcccd01fc5fe81e6b489c15b247b8b0690feb23304303a9e560f37efc560a"
[[package]]
name = "icu_properties"
-version = "2.0.1"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "016c619c1eeb94efb86809b015c58f479963de65bdb6253345c1a1276f22e32b"
+checksum = "020bfc02fe870ec3a66d93e677ccca0562506e5872c650f893269e08615d74ec"
dependencies = [
- "displaydoc",
"icu_collections",
"icu_locale_core",
"icu_properties_data",
"icu_provider",
- "potential_utf",
"zerotrie",
"zerovec",
]
[[package]]
name = "icu_properties_data"
-version = "2.0.1"
+version = "2.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "298459143998310acd25ffe6810ed544932242d3f07083eee1084d83a71bd632"
+checksum = "616c294cf8d725c6afcd8f55abc17c56464ef6211f9ed59cccffe534129c77af"
[[package]]
name = "icu_provider"
-version = "2.0.0"
+version = "2.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "03c80da27b5f4187909049ee2d72f276f0d9f99a42c306bd0131ecfe04d8e5af"
+checksum = "85962cf0ce02e1e0a629cc34e7ca3e373ce20dda4c4d7294bbd0bf1fdb59e614"
dependencies = [
"displaydoc",
"icu_locale_core",
- "stable_deref_trait",
- "tinystr",
"writeable",
"yoke",
"zerofrom",
@@ -1031,6 +1070,12 @@ dependencies = [
]
[[package]]
+name = "id-arena"
+version = "2.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "3d3067d79b975e8844ca9eb072e16b31c3c1c36928edf9c6789548c524d0d954"
+
+[[package]]
name = "ide"
version = "0.0.0"
dependencies = [
@@ -1109,7 +1154,7 @@ version = "0.0.0"
dependencies = [
"arrayvec",
"base-db",
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"cov-mark",
"crossbeam-channel",
"either",
@@ -1197,12 +1242,12 @@ dependencies = [
[[package]]
name = "indexmap"
-version = "2.11.4"
+version = "2.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5"
+checksum = "7714e70437a7dc3ac8eb7e6f8df75fd8eb422675fc7678aff7364301092b1017"
dependencies = [
"equivalent",
- "hashbrown 0.16.0",
+ "hashbrown 0.16.1",
"serde",
"serde_core",
]
@@ -1213,7 +1258,7 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f37dccff2791ab604f9babef0ba14fbe0be30bd368dc541e2b08d07c8aa908f3"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"inotify-sys",
"libc",
]
@@ -1277,9 +1322,9 @@ dependencies = [
[[package]]
name = "itoa"
-version = "1.0.15"
+version = "1.0.17"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
+checksum = "92ecc6618181def0457392ccd0ee51198e065e016d1d527a7ac1b6dc7c1f09d2"
[[package]]
name = "jod-thread"
@@ -1289,9 +1334,9 @@ checksum = "a037eddb7d28de1d0fc42411f501b53b75838d313908078d6698d064f3029b24"
[[package]]
name = "js-sys"
-version = "0.3.82"
+version = "0.3.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b011eec8cc36da2aab2d5cff675ec18454fad408585853910a202391cf9f8e65"
+checksum = "f4eacb0641a310445a4c513f2a5e23e19952e269c6a38887254d5f837a305506"
dependencies = [
"once_cell",
"wasm-bindgen",
@@ -1334,10 +1379,16 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe"
[[package]]
+name = "leb128fmt"
+version = "0.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "09edd9e8b54e49e587e4f6295a7d29c3ea94d469cb40ab8ca70b288248a81db2"
+
+[[package]]
name = "libc"
-version = "0.2.175"
+version = "0.2.180"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6a82ae493e598baaea5209805c49bbf2ea7de956d50d7da0da1164f9c6d28543"
+checksum = "bcc35a38544a891a5f7c865aca548a982ccb3b8650a5b06d0fd33a10283c56fc"
[[package]]
name = "libloading"
@@ -1346,7 +1397,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d7c4b02199fee7c5d21a5ae7d8cfa79a6ef5bb2fc834d6e9058e89c825efdc55"
dependencies = [
"cfg-if",
- "windows-link 0.2.0",
+ "windows-link 0.2.1",
]
[[package]]
@@ -1361,11 +1412,11 @@ dependencies = [
[[package]]
name = "libredox"
-version = "0.1.10"
+version = "0.1.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "416f7e718bdb06000964960ffa43b4335ad4012ae8b99060261aa4a8088d5ccb"
+checksum = "3d0b95e02c851351f877147b7deea7b1afb1df71b63aa5f8270716e0c5720616"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"libc",
]
@@ -1396,9 +1447,9 @@ checksum = "df1d3c3b53da64cf5760482273a98e575c651a67eec7f77df96b5b642de8f039"
[[package]]
name = "litemap"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "241eaef5fd12c88705a01fc1066c48c4b36e0dd4377dcdc7ec3942cea7a69956"
+checksum = "6373607a59f0be73a39b6fe456b8192fcc3585f602af20751600e974dd455e77"
[[package]]
name = "load-cargo"
@@ -1421,19 +1472,18 @@ dependencies = [
[[package]]
name = "lock_api"
-version = "0.4.13"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "96936507f153605bddfcda068dd804796c84324ed2510809e5b2a624c81da765"
+checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
dependencies = [
- "autocfg",
"scopeguard",
]
[[package]]
name = "log"
-version = "0.4.28"
+version = "0.4.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "34080505efa8e45a4b816c349525ebe327ceaa8559756f0356cba97ef3bf7432"
+checksum = "5e5032e24019045c762d3c0f28f5b6b8bbf38563a65908389bf7978758920897"
[[package]]
name = "lsp-server"
@@ -1442,8 +1492,8 @@ dependencies = [
"anyhow",
"crossbeam-channel",
"ctrlc",
+ "helix-lsp-types",
"log",
- "lsp-types",
"rustc-hash 2.1.1",
"serde",
"serde_derive",
@@ -1452,32 +1502,6 @@ dependencies = [
]
[[package]]
-name = "lsp-server"
-version = "0.7.9"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7d6ada348dbc2703cbe7637b2dda05cff84d3da2819c24abcb305dd613e0ba2e"
-dependencies = [
- "crossbeam-channel",
- "log",
- "serde",
- "serde_derive",
- "serde_json",
-]
-
-[[package]]
-name = "lsp-types"
-version = "0.95.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "158c1911354ef73e8fe42da6b10c0484cb65c7f1007f28022e847706c1ab6984"
-dependencies = [
- "bitflags 1.3.2",
- "serde",
- "serde_json",
- "serde_repr",
- "url",
-]
-
-[[package]]
name = "macros"
version = "0.0.0"
dependencies = [
@@ -1492,7 +1516,7 @@ name = "mbe"
version = "0.0.0"
dependencies = [
"arrayvec",
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"cov-mark",
"expect-test",
"intern",
@@ -1511,15 +1535,15 @@ dependencies = [
[[package]]
name = "memchr"
-version = "2.7.6"
+version = "2.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
+checksum = "f8ca58f447f06ed17d5fc4043ce1b10dd205e060fb3ce5b979b8ed8e59ff3f79"
[[package]]
name = "memmap2"
-version = "0.9.8"
+version = "0.9.10"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "843a98750cd611cc2965a8213b53b43e715f13c37a9e096c6408e69990961db7"
+checksum = "714098028fe011992e1c3962653c96b2d578c4b4bce9036e15ff220319b1e0e3"
dependencies = [
"libc",
]
@@ -1549,6 +1573,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1fa76a2c86f704bdb222d66965fb3d63269ce38518b83cb0575fca855ebb6316"
dependencies = [
"adler2",
+ "simd-adler32",
]
[[package]]
@@ -1559,14 +1584,14 @@ checksum = "c505b3e17ed6b70a7ed2e67fbb2c560ee327353556120d6e72f5232b6880d536"
[[package]]
name = "mio"
-version = "1.1.0"
+version = "1.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "69d83b0086dc8ecf3ce9ae2874b2d1290252e2a30720bea58a5c6639b0092873"
+checksum = "a69bcab0ad47271a0234d9422b131806bf3968021e5dc9328caf2d4cd58557fc"
dependencies = [
"libc",
"log",
"wasi",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -1575,7 +1600,7 @@ version = "0.6.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "536bfad37a309d62069485248eeaba1e8d9853aaf951caaeaed0585a95346f08"
dependencies = [
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -1584,7 +1609,19 @@ version = "0.30.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "74523f3a35e05aba87a1d978330aef40f67b0304ac79c1c00b294c9830543db6"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
+ "cfg-if",
+ "cfg_aliases",
+ "libc",
+]
+
+[[package]]
+name = "nix"
+version = "0.31.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "225e7cfe711e0ba79a68baeddb2982723e4235247aefce1482f2f16c27865b66"
+dependencies = [
+ "bitflags 2.11.0",
"cfg-if",
"cfg_aliases",
"libc",
@@ -1602,7 +1639,7 @@ version = "8.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4d3d07927151ff8575b7087f245456e549fea62edf0ec4e565a5ee50c8402bc3"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"fsevent-sys",
"inotify",
"kqueue",
@@ -1616,9 +1653,12 @@ dependencies = [
[[package]]
name = "notify-types"
-version = "2.0.0"
+version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5e0826a989adedc2a244799e823aece04662b66609d96af8dff7ac6df9a8925d"
+checksum = "42b8cfee0e339a0337359f3c88165702ac6e600dc01c0cc9579a92d62b08477a"
+dependencies = [
+ "bitflags 2.11.0",
+]
[[package]]
name = "nu-ansi-term"
@@ -1626,7 +1666,7 @@ version = "0.50.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5"
dependencies = [
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -1664,6 +1704,21 @@ dependencies = [
]
[[package]]
+name = "objc2"
+version = "0.6.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b7c2599ce0ec54857b29ce62166b0ed9b4f6f1a70ccc9a71165b6154caca8c05"
+dependencies = [
+ "objc2-encode",
+]
+
+[[package]]
+name = "objc2-encode"
+version = "4.1.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ef25abbcd74fb2609453eb695bd2f860d389e457f67dc17cafc8b8cbc89d0c33"
+
+[[package]]
name = "object"
version = "0.36.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1673,6 +1728,15 @@ dependencies = [
]
[[package]]
+name = "object"
+version = "0.37.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ff76201f031d8863c38aa7f905eca4f53abbfa15f609db4277d44cd8938f33fe"
+dependencies = [
+ "memchr",
+]
+
+[[package]]
name = "once_cell"
version = "1.21.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1692,9 +1756,9 @@ checksum = "04744f49eae99ab78e0d5c0b603ab218f515ea8cfe5a456d7629ad883a3b6e7d"
[[package]]
name = "parking_lot"
-version = "0.12.4"
+version = "0.12.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "70d58bf43669b5795d1576d0641cfb6fbb2057bf629506267a92807158584a13"
+checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
dependencies = [
"lock_api",
"parking_lot_core",
@@ -1702,15 +1766,15 @@ dependencies = [
[[package]]
name = "parking_lot_core"
-version = "0.9.11"
+version = "0.9.12"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bc838d2a56b5b1a6c25f55575dfc605fabb63bb2365f6c2353ef9159aa69e4a5"
+checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
dependencies = [
"cfg-if",
"libc",
"redox_syscall",
"smallvec",
- "windows-targets 0.52.6",
+ "windows-link 0.2.1",
]
[[package]]
@@ -1767,9 +1831,9 @@ dependencies = [
[[package]]
name = "petgraph"
-version = "0.8.2"
+version = "0.8.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "54acf3a685220b533e437e264e4d932cfbdc4cc7ec0cd232ed73c08d03b8a7ca"
+checksum = "8701b58ea97060d5e5b155d383a69952a60943f0e6dfe30b04c287beb0b27455"
dependencies = [
"fixedbitset",
"hashbrown 0.15.5",
@@ -1812,9 +1876,9 @@ dependencies = [
[[package]]
name = "portable-atomic"
-version = "1.11.1"
+version = "1.13.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
+checksum = "c33a9471896f1c69cecef8d20cbe2f7accd12527ce60845ff44c153bb2a21b49"
[[package]]
name = "postcard"
@@ -1831,9 +1895,9 @@ dependencies = [
[[package]]
name = "potential_utf"
-version = "0.1.3"
+version = "0.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "84df19adbe5b5a0782edcab45899906947ab039ccf4573713735ee7de1e6b08a"
+checksum = "b73949432f5e2a09657003c25bca5e19a0e9c84f8058ca374f49e0ebe605af77"
dependencies = [
"zerovec",
]
@@ -1854,6 +1918,16 @@ dependencies = [
]
[[package]]
+name = "prettyplease"
+version = "0.2.37"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "479ca8adacdd7ce8f1fb39ce9ecccbfe93a3f1344b3d0d97f20bc0196208f62b"
+dependencies = [
+ "proc-macro2",
+ "syn",
+]
+
+[[package]]
name = "proc-macro-api"
version = "0.0.0"
dependencies = [
@@ -1884,7 +1958,7 @@ dependencies = [
"libloading",
"line-index 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)",
"memmap2",
- "object",
+ "object 0.36.7",
"paths",
"proc-macro-test",
"ra-ap-rustc_lexer",
@@ -1916,9 +1990,9 @@ dependencies = [
[[package]]
name = "proc-macro2"
-version = "1.0.101"
+version = "1.0.106"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "89ae43fd86e4158d6db51ad8e2b80f313af9cc74f5c0e03ccb87de09998732de"
+checksum = "8fd00f0bb2e90d81d1044c2b32617f68fcb9fa3bb7640c23e9c748e53fb30934"
dependencies = [
"unicode-ident",
]
@@ -1930,7 +2004,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a3ef4f2f0422f23a82ec9f628ea2acd12871c81a9362b02c43c1aa86acfc3ba1"
dependencies = [
"indexmap",
- "nix",
+ "nix 0.30.1",
"tracing",
"windows",
]
@@ -1943,7 +2017,7 @@ dependencies = [
"libc",
"perf-event",
"tikv-jemalloc-ctl",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -1975,13 +2049,13 @@ dependencies = [
[[package]]
name = "proptest"
-version = "1.9.0"
+version = "1.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bee689443a2bd0a16ab0348b52ee43e3b2d1b1f931c8aa5c9f8de4c86fbe8c40"
+checksum = "37566cb3fdacef14c0737f9546df7cfeadbfbc9fef10991038bf5015d0c80532"
dependencies = [
"bit-set",
"bit-vec",
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"num-traits",
"rand",
"rand_chacha",
@@ -2018,7 +2092,7 @@ version = "0.9.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "57206b407293d2bcd3af849ce869d52068623f19e1b5ff8e8778e3309439682b"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"memchr",
"unicase",
]
@@ -2052,9 +2126,9 @@ checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0"
[[package]]
name = "quote"
-version = "1.0.40"
+version = "1.0.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d"
+checksum = "21b2ebcf727b7760c461f091f9f0f539b77b8e87f2fd88131e7f1b433b3cece4"
dependencies = [
"proc-macro2",
]
@@ -2071,7 +2145,7 @@ version = "0.165.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2f25a779e21ca3bba6795193b16508c8ab159f96ee4b07349893fd272065b525"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"ra-ap-rustc_hashes",
"ra-ap-rustc_index",
"tracing",
@@ -2166,7 +2240,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8c5d9a4d3e7bee7313599bc6d794037247ac0165f03857379cf4fc3097199e05"
dependencies = [
"arrayvec",
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"derive-where",
"ena",
"indexmap",
@@ -2194,9 +2268,9 @@ dependencies = [
[[package]]
name = "rand"
-version = "0.9.3"
+version = "0.9.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7ec095654a25171c2124e9e3393a930bddbffdc939556c914957a4c3e0a87166"
+checksum = "44c5af06bb1b7d3216d91932aed5265164bf384dc89cd6ba05cf59a35f5f76ea"
dependencies = [
"rand_chacha",
"rand_core",
@@ -2214,9 +2288,9 @@ dependencies = [
[[package]]
name = "rand_core"
-version = "0.9.3"
+version = "0.9.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38"
+checksum = "76afc826de14238e6e8c374ddcc1fa19e374fd8dd986b0d2af0d02377261d83c"
dependencies = [
"getrandom 0.3.4",
]
@@ -2252,11 +2326,11 @@ dependencies = [
[[package]]
name = "redox_syscall"
-version = "0.5.17"
+version = "0.5.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5407465600fb0548f1442edf71dd20683c6ed326200ace4b1ef0763521bb3b77"
+checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
]
[[package]]
@@ -2265,16 +2339,16 @@ version = "0.5.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4e608c6638b9c18977b00b475ac1f28d14e84b27d8d42f70e0bf1e3dec127ac"
dependencies = [
- "getrandom 0.2.16",
+ "getrandom 0.2.17",
"libredox",
- "thiserror 2.0.16",
+ "thiserror 2.0.18",
]
[[package]]
name = "regex"
-version = "1.12.2"
+version = "1.12.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "843bc0191f75f3e22651ae5f1e72939ab2f72a4bc30fa80a066bd66edefc24d4"
+checksum = "e10754a14b9137dd7b1e3e5b0493cc9171fdd105e0ab477f51b72e7f3ac0e276"
dependencies = [
"aho-corasick",
"memchr",
@@ -2284,9 +2358,9 @@ dependencies = [
[[package]]
name = "regex-automata"
-version = "0.4.13"
+version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5276caf25ac86c8d810222b3dbb938e512c55c6831a10f3e6ed1c93b84041f1c"
+checksum = "6e1dd4122fc1595e8162618945476892eefca7b88c52820e74af6262213cae8f"
dependencies = [
"aho-corasick",
"memchr",
@@ -2295,9 +2369,9 @@ dependencies = [
[[package]]
name = "regex-syntax"
-version = "0.8.8"
+version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "7a2d987857b319362043e95f5353c0535c1f58eec5336fdfcf626430af7def58"
+checksum = "a96887878f22d7bad8a3b6dc5b7440e0ada9a245242924394987b21cf2210a4c"
[[package]]
name = "rowan"
@@ -2325,6 +2399,7 @@ dependencies = [
"dirs",
"dissimilar",
"expect-test",
+ "helix-lsp-types",
"hir",
"hir-def",
"hir-ty",
@@ -2336,8 +2411,7 @@ dependencies = [
"intern",
"itertools 0.14.0",
"load-cargo",
- "lsp-server 0.7.9 (registry+https://github.com/rust-lang/crates.io-index)",
- "lsp-types",
+ "lsp-server",
"memchr",
"mimalloc",
"num_cpus",
@@ -2374,16 +2448,16 @@ dependencies = [
"vfs",
"vfs-notify",
"walkdir",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
"xflags",
"xshell",
]
[[package]]
name = "rustc-demangle"
-version = "0.1.26"
+version = "0.1.27"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "56f7d92ca342cea22a06f2121d944b4fd82af56988c270852495420f961d4ace"
+checksum = "b50b8869d9fc858ce7266cce0194bd74df58b9d0e3f6df3a9fc8eb470d95c09d"
[[package]]
name = "rustc-hash"
@@ -2421,7 +2495,7 @@ version = "0.2.3+llvm-462a31f5a5ab"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "486c2179b4796f65bfe2ee33679acf0927ac83ecf583ad6c91c3b4570911b9ad"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"smallvec",
]
@@ -2436,15 +2510,15 @@ dependencies = [
[[package]]
name = "rustix"
-version = "1.1.2"
+version = "1.1.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "cd15f8a2c5551a84d56efdc1cd049089e409ac19a3072d5037a17fd70719ff3e"
+checksum = "146c9e247ccc180c1f61615433868c99f3de3ae256a30a43b49f67c2d9171f34"
dependencies = [
- "bitflags 2.9.4",
+ "bitflags 2.11.0",
"errno",
"libc",
"linux-raw-sys",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -2466,12 +2540,6 @@ dependencies = [
]
[[package]]
-name = "ryu"
-version = "1.0.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
-
-[[package]]
name = "salsa"
version = "0.26.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2480,7 +2548,7 @@ dependencies = [
"boxcar",
"crossbeam-queue",
"crossbeam-utils",
- "hashbrown 0.17.0",
+ "hashbrown 0.17.1",
"hashlink",
"indexmap",
"intrusive-collections",
@@ -2551,9 +2619,9 @@ dependencies = [
[[package]]
name = "serde"
-version = "1.0.226"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0dca6411025b24b60bfa7ec1fe1f8e710ac09782dca409ee8237ba74b51295fd"
+checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
dependencies = [
"serde_core",
"serde_derive",
@@ -2561,18 +2629,18 @@ dependencies = [
[[package]]
name = "serde_core"
-version = "1.0.226"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ba2ba63999edb9dac981fb34b3e5c0d111a69b0924e253ed29d83f7c99e966a4"
+checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
dependencies = [
"serde_derive",
]
[[package]]
name = "serde_derive"
-version = "1.0.226"
+version = "1.0.228"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8db53ae22f34573731bafa1db20f04027b2d25e02d8205921b569171699cdb33"
+checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
dependencies = [
"proc-macro2",
"quote",
@@ -2581,34 +2649,23 @@ dependencies = [
[[package]]
name = "serde_json"
-version = "1.0.145"
+version = "1.0.149"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
+checksum = "83fc039473c5595ace860d8c4fafa220ff474b3fc6bfdb4293327f1a37e94d86"
dependencies = [
"indexmap",
"itoa",
"memchr",
- "ryu",
"serde",
"serde_core",
-]
-
-[[package]]
-name = "serde_repr"
-version = "0.1.20"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "175ee3e80ae9982737ca543e96133087cbd9a485eecc3bc4de9c1a37b47ea59c"
-dependencies = [
- "proc-macro2",
- "quote",
- "syn",
+ "zmij",
]
[[package]]
name = "serde_spanned"
-version = "1.0.3"
+version = "1.0.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e24345aa0fe688594e73770a5f6d1b216508b4f93484c0026d521acd30134392"
+checksum = "f8bbf91e5a4d6315eee45e704372590b30e260ee83af6639d64557f51b067776"
dependencies = [
"serde_core",
]
@@ -2638,6 +2695,12 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64"
[[package]]
+name = "simd-adler32"
+version = "0.3.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e320a6c5ad31d271ad523dcf3ad13e2767ad8b1cb8f047f75a8aeaf8da139da2"
+
+[[package]]
name = "smallvec"
version = "1.15.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2645,12 +2708,12 @@ checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
[[package]]
name = "smol_str"
-version = "0.3.2"
+version = "0.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9676b89cd56310a87b93dec47b11af744f34d5fc9f367b829474eec0a891350d"
+checksum = "0f7a918bd2a9951d18ee6e48f076843e8e73a9a5d22cf05bcd4b7a81bdd04e17"
dependencies = [
"borsh",
- "serde",
+ "serde_core",
]
[[package]]
@@ -2692,9 +2755,9 @@ dependencies = [
[[package]]
name = "stable_deref_trait"
-version = "1.2.0"
+version = "1.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a8f112729512f8e442d81f95a8a7ddf2b7c6b8a1a6f509a95864142b30cab2d3"
+checksum = "6ce2be8dc25455e1f91df71bfa12ad37d7af1092ae736f3a6cd0e37bc7810596"
[[package]]
name = "static_assertions"
@@ -2714,14 +2777,14 @@ dependencies = [
"libc",
"miow",
"tracing",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
name = "syn"
-version = "2.0.106"
+version = "2.0.117"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ede7c438028d4436d71104916910f5bb611972c5cfd7f89b8300a8186e6fada6"
+checksum = "e665b8803e7b1d2a727f4023456bbbbe74da67099c585258af0ad9c5013b9b99"
dependencies = [
"proc-macro2",
"quote",
@@ -2753,7 +2816,7 @@ dependencies = [
"rustc-literal-escaper 0.0.4",
"rustc_apfloat",
"smallvec",
- "smol_str 0.3.2",
+ "smol_str 0.3.5",
"stdx",
"test-utils",
"tracing",
@@ -2783,15 +2846,15 @@ checksum = "83176759e9416cf81ee66cb6508dbfe9c96f20b8b56265a39917551c23c70964"
[[package]]
name = "tempfile"
-version = "3.23.0"
+version = "3.25.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2d31c77bdf42a745371d260a26ca7163f1e0924b64afa0b688e61b5a9fa02f16"
+checksum = "0136791f7c95b1f6dd99f9cc786b91bb81c3800b639b3478e561ddb7be95e5f1"
dependencies = [
"fastrand",
- "getrandom 0.3.4",
+ "getrandom 0.4.1",
"once_cell",
"rustix",
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -2845,9 +2908,9 @@ checksum = "f18aa187839b2bdb1ad2fa35ead8c4c2976b64e4363c386d45ac0f7ee85c9233"
[[package]]
name = "thin-vec"
-version = "0.2.16"
+version = "0.2.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "259cdf8ed4e4aca6f1e9d011e10bd53f524a2d0637d7b28450f6c64ac298c4c6"
+checksum = "b0f7e269b48f0a7dd0146680fa24b50cc67fc0373f086a5b2f99bd084639b482"
[[package]]
name = "thiserror"
@@ -2860,11 +2923,11 @@ dependencies = [
[[package]]
name = "thiserror"
-version = "2.0.16"
+version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3467d614147380f2e4e374161426ff399c91084acd2363eaf549172b3d5e60c0"
+checksum = "4288b5bcbc7920c07a1149a35cf9590a2aa808e0bc1eafaade0b80947865fbc4"
dependencies = [
- "thiserror-impl 2.0.16",
+ "thiserror-impl 2.0.18",
]
[[package]]
@@ -2880,9 +2943,9 @@ dependencies = [
[[package]]
name = "thiserror-impl"
-version = "2.0.16"
+version = "2.0.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "6c5e1be1c48b9172ee610da68fd9cd2770e7a4056cb3fc98710ee6906f0c7960"
+checksum = "ebc4ee7f67670e9b64d05fa4253e753e016c6c95ff35b89b7941d6b856dec1d5"
dependencies = [
"proc-macro2",
"quote",
@@ -2970,9 +3033,9 @@ dependencies = [
[[package]]
name = "tinystr"
-version = "0.8.1"
+version = "0.8.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5d4f6d1145dcb577acf783d4e601bc1d76a13337bb54e6233add580b07344c8b"
+checksum = "42d3e9c45c09de15d06dd8acf5f4e0e399e85927b7f00711024eb7ae10fa4869"
dependencies = [
"displaydoc",
"zerovec",
@@ -2990,9 +3053,9 @@ dependencies = [
[[package]]
name = "toml"
-version = "0.9.8"
+version = "0.9.12+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f0dc8b1fb61449e27716ec0e1bdf0f6b8f3e8f6b05391e8497b8b6d7804ea6d8"
+checksum = "cf92845e79fc2e2def6a5d828f0801e29a2f8acc037becc5ab08595c7d5e9863"
dependencies = [
"indexmap",
"serde_core",
@@ -3005,27 +3068,27 @@ dependencies = [
[[package]]
name = "toml_datetime"
-version = "0.7.3"
+version = "0.7.5+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f2cdb639ebbc97961c51720f858597f7f24c4fc295327923af55b74c3c724533"
+checksum = "92e1cfed4a3038bc5a127e35a2d360f145e1f4b971b551a2ba5fd7aedf7e1347"
dependencies = [
"serde_core",
]
[[package]]
name = "toml_parser"
-version = "1.0.4"
+version = "1.0.9+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c0cbe268d35bdb4bb5a56a2de88d0ad0eb70af5384a99d648cd4b3d04039800e"
+checksum = "702d4415e08923e7e1ef96cd5727c0dfed80b4d2fa25db9647fe5eb6f7c5a4c4"
dependencies = [
"winnow",
]
[[package]]
name = "toml_writer"
-version = "1.0.4"
+version = "1.0.6+spec-1.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "df8b2b54733674ad286d16267dcfc7a71ed5c776e4ac7aa3c3e2561f7c637bf2"
+checksum = "ab16f14aed21ee8bfd8ec22513f7287cd4a91aa92e44edfe2c17ddd004e92607"
[[package]]
name = "toolchain"
@@ -3037,9 +3100,9 @@ dependencies = [
[[package]]
name = "tracing"
-version = "0.1.41"
+version = "0.1.44"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0"
+checksum = "63e71662fa4b2a2c3a26f570f037eb95bb1f85397f3cd8076caed2f026a6d100"
dependencies = [
"pin-project-lite",
"tracing-attributes",
@@ -3048,9 +3111,9 @@ dependencies = [
[[package]]
name = "tracing-attributes"
-version = "0.1.30"
+version = "0.1.31"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "81383ab64e72a7a8b8e13130c49e3dab29def6d0c7d76a03087b3cf71c5c6903"
+checksum = "7490cfa5ec963746568740651ac6781f701c9c5ea257c58e057f3ba8cf69e8da"
dependencies = [
"proc-macro2",
"quote",
@@ -3059,9 +3122,9 @@ dependencies = [
[[package]]
name = "tracing-core"
-version = "0.1.34"
+version = "0.1.36"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "b9d12581f227e93f094d3af2ae690a574abb8a2b9b7a96e7cfe9647b2b617678"
+checksum = "db97caf9d906fbde555dd62fa95ddba9eecfd14cb388e4f491a66d74cd5fb79a"
dependencies = [
"once_cell",
"valuable",
@@ -3080,9 +3143,9 @@ dependencies = [
[[package]]
name = "tracing-subscriber"
-version = "0.3.20"
+version = "0.3.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2054a14f5307d601f88daf0553e1cbf472acc4f2c51afab632431cdcd72124d5"
+checksum = "2f30143827ddab0d256fd843b7a66d164e9f271cfa0dde49142c5ca0ca291f1e"
dependencies = [
"sharded-slab",
"thread_local",
@@ -3093,9 +3156,9 @@ dependencies = [
[[package]]
name = "tracing-tree"
-version = "0.4.0"
+version = "0.4.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f459ca79f1b0d5f71c54ddfde6debfc59c8b6eeb46808ae492077f739dc7b49c"
+checksum = "ac87aa03b6a4d5a7e4810d1a80c19601dbe0f8a837e9177f23af721c7ba7beec"
dependencies = [
"nu-ansi-term",
"tracing-core",
@@ -3105,9 +3168,9 @@ dependencies = [
[[package]]
name = "triomphe"
-version = "0.1.14"
+version = "0.1.15"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ef8f7726da4807b58ea5c96fdc122f80702030edc33b35aff9190a51148ccc85"
+checksum = "dd69c5aa8f924c7519d6372789a74eac5b94fb0f8fcf0d4a97eb0bfc3e785f39"
[[package]]
name = "tt"
@@ -3161,9 +3224,9 @@ dependencies = [
[[package]]
name = "unicase"
-version = "2.8.1"
+version = "2.9.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "75b844d17643ee918803943289730bec8aac480150456169e647ed0b576ba539"
+checksum = "dbc4bc3a9f746d862c45cb89d705aa10f187bb96c76001afab07a0d35ce60142"
[[package]]
name = "unicode-ident"
@@ -3178,15 +3241,22 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7df058c713841ad818f1dc5d3fd88063241cc61f49f5fbea4b951e8cf5a8d71d"
[[package]]
+name = "unicode-xid"
+version = "0.2.6"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853"
+
+[[package]]
name = "url"
-version = "2.5.7"
+version = "2.5.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "08bc136a29a3d1758e07a9cca267be308aeebf5cfd5a10f3f67ab2097683ef5b"
+checksum = "ff67a8a4397373c3ef660812acab3268222035010ab8680ec4215f38ba3d0eed"
dependencies = [
"form_urlencoded",
"idna",
"percent-encoding",
"serde",
+ "serde_derive",
]
[[package]]
@@ -3257,18 +3327,27 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b"
[[package]]
name = "wasip2"
-version = "1.0.1+wasi-0.2.4"
+version = "1.0.2+wasi-0.2.9"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "9517f9239f02c069db75e65f174b3da828fe5f5b945c4dd26bd25d89c03ebcf5"
+dependencies = [
+ "wit-bindgen",
+]
+
+[[package]]
+name = "wasip3"
+version = "0.4.0+wasi-0.3.0-rc-2026-01-06"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7"
+checksum = "5428f8bf88ea5ddc08faddef2ac4a67e390b88186c703ce6dbd955e1c145aca5"
dependencies = [
"wit-bindgen",
]
[[package]]
name = "wasm-bindgen"
-version = "0.2.105"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "da95793dfc411fbbd93f5be7715b0578ec61fe87cb1a42b12eb625caa5c5ea60"
+checksum = "05d7d0fce354c88b7982aec4400b3e7fcf723c32737cef571bd165f7613557ee"
dependencies = [
"cfg-if",
"once_cell",
@@ -3279,9 +3358,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro"
-version = "0.2.105"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "04264334509e04a7bf8690f2384ef5265f05143a4bff3889ab7a3269adab59c2"
+checksum = "55839b71ba921e4f75b674cb16f843f4b1f3b26ddfcb3454de1cf65cc021ec0f"
dependencies = [
"quote",
"wasm-bindgen-macro-support",
@@ -3289,9 +3368,9 @@ dependencies = [
[[package]]
name = "wasm-bindgen-macro-support"
-version = "0.2.105"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "420bc339d9f322e562942d52e115d57e950d12d88983a14c79b86859ee6c7ebc"
+checksum = "caf2e969c2d60ff52e7e98b7392ff1588bffdd1ccd4769eba27222fd3d621571"
dependencies = [
"bumpalo",
"proc-macro2",
@@ -3302,18 +3381,52 @@ dependencies = [
[[package]]
name = "wasm-bindgen-shared"
-version = "0.2.105"
+version = "0.2.112"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "76f218a38c84bcb33c25ec7059b07847d465ce0e0a76b995e134a45adcb6af76"
+checksum = "0861f0dcdf46ea819407495634953cdcc8a8c7215ab799a7a7ce366be71c7b30"
dependencies = [
"unicode-ident",
]
[[package]]
+name = "wasm-encoder"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "990065f2fe63003fe337b932cfb5e3b80e0b4d0f5ff650e6985b1048f62c8319"
+dependencies = [
+ "leb128fmt",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasm-metadata"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "bb0e353e6a2fbdc176932bbaab493762eb1255a7900fe0fea1a2f96c296cc909"
+dependencies = [
+ "anyhow",
+ "indexmap",
+ "wasm-encoder",
+ "wasmparser",
+]
+
+[[package]]
+name = "wasmparser"
+version = "0.244.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47b807c72e1bac69382b3a6fb3dbe8ea4c0ed87ff5629b8685ae6b9a611028fe"
+dependencies = [
+ "bitflags 2.11.0",
+ "hashbrown 0.15.5",
+ "indexmap",
+ "semver",
+]
+
+[[package]]
name = "web-sys"
-version = "0.3.82"
+version = "0.3.89"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "3a1f95c0d03a47f4ae1f7a64643a6bb97465d9b740f0fa8f90ea33915c99a9a1"
+checksum = "10053fbf9a374174094915bbce141e87a6bf32ecd9a002980db4b638405e8962"
dependencies = [
"js-sys",
"wasm-bindgen",
@@ -3325,7 +3438,7 @@ version = "0.1.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22"
dependencies = [
- "windows-sys 0.61.0",
+ "windows-sys 0.61.2",
]
[[package]]
@@ -3376,9 +3489,9 @@ dependencies = [
[[package]]
name = "windows-implement"
-version = "0.60.0"
+version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "a47fddd13af08290e67f4acabf4b459f647552718f683a7b415d290ac744a836"
+checksum = "053e2e040ab57b9dc951b72c264860db7eb3b0200ba345b4e4c3b14f67855ddf"
dependencies = [
"proc-macro2",
"quote",
@@ -3387,9 +3500,9 @@ dependencies = [
[[package]]
name = "windows-interface"
-version = "0.59.1"
+version = "0.59.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "bd9211b69f8dcdfa817bfd14bf1c97c9188afa36f4750130fcdf3f400eca9fa8"
+checksum = "3f316c4a2570ba26bbec722032c4099d8c8bc095efccdc15688708623367e358"
dependencies = [
"proc-macro2",
"quote",
@@ -3404,9 +3517,9 @@ checksum = "5e6ad25900d524eaabdbbb96d20b4311e1e7ae1699af4fb28c17ae66c80d798a"
[[package]]
name = "windows-link"
-version = "0.2.0"
+version = "0.2.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "45e46c0661abb7180e7b9c281db115305d49ca1709ab8242adf09666d2173c65"
+checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
[[package]]
name = "windows-numerics"
@@ -3442,49 +3555,33 @@ version = "0.60.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f2f500e4d28234f72040990ec9d39e3a6b950f9f22d3dba18416c35882612bcb"
dependencies = [
- "windows-targets 0.53.3",
+ "windows-targets",
]
[[package]]
name = "windows-sys"
-version = "0.61.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e201184e40b2ede64bc2ea34968b28e33622acdbbf37104f0e4a33f7abe657aa"
-dependencies = [
- "windows-link 0.2.0",
-]
-
-[[package]]
-name = "windows-targets"
-version = "0.52.6"
+version = "0.61.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973"
+checksum = "ae137229bcbd6cdf0f7b80a31df61766145077ddf49416a728b02cb3921ff3fc"
dependencies = [
- "windows_aarch64_gnullvm 0.52.6",
- "windows_aarch64_msvc 0.52.6",
- "windows_i686_gnu 0.52.6",
- "windows_i686_gnullvm 0.52.6",
- "windows_i686_msvc 0.52.6",
- "windows_x86_64_gnu 0.52.6",
- "windows_x86_64_gnullvm 0.52.6",
- "windows_x86_64_msvc 0.52.6",
+ "windows-link 0.2.1",
]
[[package]]
name = "windows-targets"
-version = "0.53.3"
+version = "0.53.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "d5fe6031c4041849d7c496a8ded650796e7b6ecc19df1a431c1a363342e5dc91"
+checksum = "4945f9f551b88e0d65f3db0bc25c33b8acea4d9e41163edf90dcd0b19f9069f3"
dependencies = [
- "windows-link 0.1.3",
- "windows_aarch64_gnullvm 0.53.0",
- "windows_aarch64_msvc 0.53.0",
- "windows_i686_gnu 0.53.0",
- "windows_i686_gnullvm 0.53.0",
- "windows_i686_msvc 0.53.0",
- "windows_x86_64_gnu 0.53.0",
- "windows_x86_64_gnullvm 0.53.0",
- "windows_x86_64_msvc 0.53.0",
+ "windows-link 0.2.1",
+ "windows_aarch64_gnullvm",
+ "windows_aarch64_msvc",
+ "windows_i686_gnu",
+ "windows_i686_gnullvm",
+ "windows_i686_msvc",
+ "windows_x86_64_gnu",
+ "windows_x86_64_gnullvm",
+ "windows_x86_64_msvc",
]
[[package]]
@@ -3498,111 +3595,145 @@ dependencies = [
[[package]]
name = "windows_aarch64_gnullvm"
-version = "0.52.6"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3"
-
-[[package]]
-name = "windows_aarch64_gnullvm"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "86b8d5f90ddd19cb4a147a5fa63ca848db3df085e25fee3cc10b39b6eebae764"
-
-[[package]]
-name = "windows_aarch64_msvc"
-version = "0.52.6"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469"
+checksum = "a9d8416fa8b42f5c947f8482c43e7d89e73a173cead56d044f6a56104a6d1b53"
[[package]]
name = "windows_aarch64_msvc"
-version = "0.53.0"
-source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c7651a1f62a11b8cbd5e0d42526e55f2c99886c77e007179efff86c2b137e66c"
-
-[[package]]
-name = "windows_i686_gnu"
-version = "0.52.6"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b"
+checksum = "b9d782e804c2f632e395708e99a94275910eb9100b2114651e04744e9b125006"
[[package]]
name = "windows_i686_gnu"
-version = "0.53.0"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "c1dc67659d35f387f5f6c479dc4e28f1d4bb90ddd1a5d3da2e5d97b42d6272c3"
+checksum = "960e6da069d81e09becb0ca57a65220ddff016ff2d6af6a223cf372a506593a3"
[[package]]
name = "windows_i686_gnullvm"
-version = "0.52.6"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66"
+checksum = "fa7359d10048f68ab8b09fa71c3daccfb0e9b559aed648a8f95469c27057180c"
[[package]]
-name = "windows_i686_gnullvm"
-version = "0.53.0"
+name = "windows_i686_msvc"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "9ce6ccbdedbf6d6354471319e781c0dfef054c81fbc7cf83f338a4296c0cae11"
+checksum = "1e7ac75179f18232fe9c285163565a57ef8d3c89254a30685b57d83a38d326c2"
[[package]]
-name = "windows_i686_msvc"
-version = "0.52.6"
+name = "windows_x86_64_gnu"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66"
+checksum = "9c3842cdd74a865a8066ab39c8a7a473c0778a3f29370b5fd6b4b9aa7df4a499"
[[package]]
-name = "windows_i686_msvc"
-version = "0.53.0"
+name = "windows_x86_64_gnullvm"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "581fee95406bb13382d2f65cd4a908ca7b1e4c2f1917f143ba16efe98a589b5d"
+checksum = "0ffa179e2d07eee8ad8f57493436566c7cc30ac536a3379fdf008f47f6bb7ae1"
[[package]]
-name = "windows_x86_64_gnu"
-version = "0.52.6"
+name = "windows_x86_64_msvc"
+version = "0.53.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78"
+checksum = "d6bbff5f0aada427a1e5a6da5f1f98158182f26556f345ac9e04d36d0ebed650"
[[package]]
-name = "windows_x86_64_gnu"
-version = "0.53.0"
+name = "winnow"
+version = "0.7.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "2e55b5ac9ea33f2fc1716d1742db15574fd6fc8dadc51caab1c16a3d3b4190ba"
+checksum = "5a5364e9d77fcdeeaa6062ced926ee3381faa2ee02d3eb83a5c27a8825540829"
[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.52.6"
+name = "wit-bindgen"
+version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d"
+checksum = "d7249219f66ced02969388cf2bb044a09756a083d0fab1e566056b04d9fbcaa5"
+dependencies = [
+ "wit-bindgen-rust-macro",
+]
[[package]]
-name = "windows_x86_64_gnullvm"
-version = "0.53.0"
+name = "wit-bindgen-core"
+version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0a6e035dd0599267ce1ee132e51c27dd29437f63325753051e71dd9e42406c57"
+checksum = "ea61de684c3ea68cb082b7a88508a8b27fcc8b797d738bfc99a82facf1d752dc"
+dependencies = [
+ "anyhow",
+ "heck",
+ "wit-parser",
+]
[[package]]
-name = "windows_x86_64_msvc"
-version = "0.52.6"
+name = "wit-bindgen-rust"
+version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec"
+checksum = "b7c566e0f4b284dd6561c786d9cb0142da491f46a9fbed79ea69cdad5db17f21"
+dependencies = [
+ "anyhow",
+ "heck",
+ "indexmap",
+ "prettyplease",
+ "syn",
+ "wasm-metadata",
+ "wit-bindgen-core",
+ "wit-component",
+]
[[package]]
-name = "windows_x86_64_msvc"
-version = "0.53.0"
+name = "wit-bindgen-rust-macro"
+version = "0.51.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "271414315aff87387382ec3d271b52d7ae78726f5d44ac98b4f4030c91880486"
+checksum = "0c0f9bfd77e6a48eccf51359e3ae77140a7f50b1e2ebfe62422d8afdaffab17a"
+dependencies = [
+ "anyhow",
+ "prettyplease",
+ "proc-macro2",
+ "quote",
+ "syn",
+ "wit-bindgen-core",
+ "wit-bindgen-rust",
+]
[[package]]
-name = "winnow"
-version = "0.7.13"
+name = "wit-component"
+version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "21a0236b59786fed61e2a80582dd500fe61f18b5dca67a4a067d0bc9039339cf"
+checksum = "9d66ea20e9553b30172b5e831994e35fbde2d165325bec84fc43dbf6f4eb9cb2"
+dependencies = [
+ "anyhow",
+ "bitflags 2.11.0",
+ "indexmap",
+ "log",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "wasm-encoder",
+ "wasm-metadata",
+ "wasmparser",
+ "wit-parser",
+]
[[package]]
-name = "wit-bindgen"
-version = "0.46.0"
+name = "wit-parser"
+version = "0.244.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59"
+checksum = "ecc8ac4bc1dc3381b7f59c34f00b67e18f910c2c0f50015669dde7def656a736"
+dependencies = [
+ "anyhow",
+ "id-arena",
+ "indexmap",
+ "log",
+ "semver",
+ "serde",
+ "serde_derive",
+ "serde_json",
+ "unicode-xid",
+ "wasmparser",
+]
[[package]]
name = "write-json"
@@ -3612,9 +3743,9 @@ checksum = "23f6174b2566cc4a74f95e1367ec343e7fa80c93cc8087f5c4a3d6a1088b2118"
[[package]]
name = "writeable"
-version = "0.6.1"
+version = "0.6.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "ea2f10b9bb0928dfb1b42b65e1f9e36f7f54dbdf08457afefb38afcdec4fa2bb"
+checksum = "9edde0db4769d2dc68579893f2306b26c6ecfbe0ef499b013d731b7b9247e0b9"
[[package]]
name = "xflags"
@@ -3668,11 +3799,10 @@ dependencies = [
[[package]]
name = "yoke"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5f41bb01b8226ef4bfd589436a297c53d118f65921786300e427be8d487695cc"
+checksum = "72d6e5c6afb84d73944e5cedb052c4680d5657337201555f9f2a16b7406d4954"
dependencies = [
- "serde",
"stable_deref_trait",
"yoke-derive",
"zerofrom",
@@ -3680,9 +3810,9 @@ dependencies = [
[[package]]
name = "yoke-derive"
-version = "0.8.0"
+version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "38da3c9736e16c5d3c8c597a9aaa5d1fa565d0532ae05e27c24aa62fb32c0ab6"
+checksum = "b659052874eb698efe5b9e8cf382204678a0086ebf46982b79d6ca3182927e5d"
dependencies = [
"proc-macro2",
"quote",
@@ -3692,18 +3822,18 @@ dependencies = [
[[package]]
name = "zerocopy"
-version = "0.8.27"
+version = "0.8.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "0894878a5fa3edfd6da3f88c4805f4c8558e2b996227a3d864f47fe11e38282c"
+checksum = "db6d35d663eadb6c932438e763b262fe1a70987f9ae936e60158176d710cae4a"
dependencies = [
"zerocopy-derive",
]
[[package]]
name = "zerocopy-derive"
-version = "0.8.27"
+version = "0.8.39"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "88d2b8d9c68ad2b9e4340d7832716a4d21a22a1154777ad56ea55c51a9cf3831"
+checksum = "4122cd3169e94605190e77839c9a40d40ed048d305bfdc146e7df40ab0f3e517"
dependencies = [
"proc-macro2",
"quote",
@@ -3733,9 +3863,9 @@ dependencies = [
[[package]]
name = "zerotrie"
-version = "0.2.2"
+version = "0.2.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "36f0bbd478583f79edad978b407914f61b2972f5af6fa089686016be8f9af595"
+checksum = "2a59c17a5562d507e4b54960e8569ebee33bee890c70aa3fe7b97e85a9fd7851"
dependencies = [
"displaydoc",
"yoke",
@@ -3744,9 +3874,9 @@ dependencies = [
[[package]]
name = "zerovec"
-version = "0.11.4"
+version = "0.11.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "e7aa2bd55086f1ab526693ecbe444205da57e25f4489879da80635a46d90e73b"
+checksum = "6c28719294829477f525be0186d13efa9a3c602f7ec202ca9e353d310fb9a002"
dependencies = [
"yoke",
"zerofrom",
@@ -3755,9 +3885,9 @@ dependencies = [
[[package]]
name = "zerovec-derive"
-version = "0.11.1"
+version = "0.11.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
-checksum = "5b96237efa0c878c64bd89c436f661be4e46b2f3eff1ebb976f7ef2321d2f58f"
+checksum = "eadce39539ca5cb3985590102671f2567e659fca9666581ad3411d59207951f3"
dependencies = [
"proc-macro2",
"quote",
@@ -3777,3 +3907,9 @@ dependencies = [
"memchr",
"time",
]
+
+[[package]]
+name = "zmij"
+version = "1.0.21"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa"
diff --git a/crates/base-db/src/lib.rs b/crates/base-db/src/lib.rs
index a209a0e631..92a7f938bd 100644
--- a/crates/base-db/src/lib.rs
+++ b/crates/base-db/src/lib.rs
@@ -402,17 +402,19 @@ impl DbPanicContext {
let default_hook = panic::take_hook();
panic::set_hook(Box::new(move |panic_info| {
default_hook(panic_info);
- if let Some(backtrace) = salsa::Backtrace::capture() {
- eprintln!("{backtrace:#}");
- }
- DbPanicContext::with_ctx(|ctx| {
- if !ctx.is_empty() {
- eprintln!("additional context:");
- for (idx, frame) in ctx.iter().enumerate() {
- eprintln!("{idx:>4}: {frame}\n");
- }
+ if std::env::var("RA_BT").is_ok() {
+ if let Some(backtrace) = salsa::Backtrace::capture() {
+ eprintln!("{backtrace:#}");
}
- });
+ DbPanicContext::with_ctx(|ctx| {
+ if !ctx.is_empty() {
+ eprintln!("additional context:");
+ for (idx, frame) in ctx.iter().enumerate() {
+ eprintln!("{idx:>4}: {frame}\n");
+ }
+ }
+ });
+ }
}));
}
diff --git a/crates/ide/src/file_structure.rs b/crates/ide/src/file_structure.rs
index 21254fc4d6..e0a4fa61d9 100644
--- a/crates/ide/src/file_structure.rs
+++ b/crates/ide/src/file_structure.rs
@@ -1,7 +1,7 @@
use ide_db::SymbolKind;
use syntax::{
AstNode, AstToken, NodeOrToken, SourceFile, SyntaxNode, SyntaxToken, TextRange, WalkEvent,
- ast::{self, HasAttrs, HasGenericParams, HasName},
+ ast::{self, HasAttrs, HasGenericParams, HasName, HasVisibility},
match_ast,
};
@@ -11,6 +11,7 @@ pub struct StructureNode {
pub label: String,
pub navigation_range: TextRange,
pub node_range: TextRange,
+ pub sticky_range: Option<TextRange>,
pub kind: StructureNodeKind,
pub detail: Option<String>,
pub deprecated: bool,
@@ -112,6 +113,7 @@ fn structure_node(node: &SyntaxNode, config: &FileStructureConfig) -> Option<Str
kind,
detail,
deprecated: node.attrs().filter_map(|x| x.simple_name()).any(|x| x == "deprecated"),
+ sticky_range: None,
})
}
@@ -155,7 +157,15 @@ fn structure_node(node: &SyntaxNode, config: &FileStructureConfig) -> Option<Str
SymbolKind::Method
} else {
SymbolKind::Function
- }))
+ })).map(|x| {
+ let sticky_range = it.name().zip(it.visibility()).map(|(name, vis)| {
+ let end = it.ret_type().map(|x| x.syntax().text_range().end()).or_else(|| {
+ it.param_list().map(|x| x.syntax().text_range().end())
+ }).unwrap_or(name.syntax().text_range().end());
+ TextRange::new(vis.syntax().text_range().start(), end)
+ });
+ StructureNode { sticky_range, ..x }
+ })
},
ast::Struct(it) => decl(it, StructureNodeKind::SymbolKind(SymbolKind::Struct)),
ast::Union(it) => decl(it, StructureNodeKind::SymbolKind(SymbolKind::Union)),
@@ -190,6 +200,7 @@ fn structure_node(node: &SyntaxNode, config: &FileStructureConfig) -> Option<Str
kind: StructureNodeKind::SymbolKind(SymbolKind::Impl),
detail: None,
deprecated: false,
+ sticky_range: None,
};
Some(node)
},
@@ -211,6 +222,7 @@ fn structure_node(node: &SyntaxNode, config: &FileStructureConfig) -> Option<Str
kind: StructureNodeKind::SymbolKind(SymbolKind::Local),
detail: it.ty().map(|ty| ty.to_string()),
deprecated: false,
+ sticky_range: None,
};
Some(node)
},
@@ -229,6 +241,7 @@ fn structure_node(node: &SyntaxNode, config: &FileStructureConfig) -> Option<Str
kind: StructureNodeKind::ExternBlock,
detail: None,
deprecated: false,
+ sticky_range: None,
})
},
_ => None,
@@ -251,6 +264,7 @@ fn structure_token(token: SyntaxToken) -> Option<StructureNode> {
kind: StructureNodeKind::Region,
detail: None,
deprecated: false,
+ sticky_range: None,
});
}
}
diff --git a/crates/ide/src/lib.rs b/crates/ide/src/lib.rs
index e131e7bdd1..f26cfaa9ef 100644
--- a/crates/ide/src/lib.rs
+++ b/crates/ide/src/lib.rs
@@ -382,7 +382,6 @@ impl Analysis {
matching_brace::matching_brace(&file, position.offset)
})
}
-
pub fn view_syntax_tree(&self, file_id: FileId) -> Cancellable<String> {
self.with_db(|db| view_syntax_tree::view_syntax_tree(db, file_id))
}
diff --git a/crates/ide/src/typing.rs b/crates/ide/src/typing.rs
index a49a85fe78..7f3f878936 100644
--- a/crates/ide/src/typing.rs
+++ b/crates/ide/src/typing.rs
@@ -99,8 +99,8 @@ fn on_char_typed_(
'.' => on_dot_typed(&file.tree(), offset),
'=' => on_eq_typed(&file.tree(), offset),
'>' => on_right_angle_typed(&file.tree(), offset),
- '{' | '(' | '<' => on_opening_delimiter_typed(file, offset, char_typed, edition),
- '|' => on_pipe_typed(&file.tree(), offset),
+ '{' | '(' | '<' => return on_opening_delimiter_typed(file, offset, char_typed, edition),
+ '|' => return on_pipe_typed(&file.tree(), offset),
'+' => on_plus_typed(&file.tree(), offset),
_ => None,
}
@@ -118,7 +118,7 @@ fn on_opening_delimiter_typed(
offset: TextSize,
opening_bracket: char,
edition: Edition,
-) -> Option<TextEdit> {
+) -> Option<ExtendedTextEdit> {
type FilterFn = fn(SyntaxKind) -> bool;
let (closing_bracket, expected_ast_bracket, allowed_kinds) = match opening_bracket {
'{' => ('}', SyntaxKind::L_CURLY, &[ast::Expr::can_cast as FilterFn] as &[FilterFn]),
@@ -147,11 +147,11 @@ fn on_opening_delimiter_typed(
if let Some(edit) =
on_delimited_node_typed(&reparsed, offset, opening_bracket, closing_bracket, allowed_kinds)
{
- return Some(edit);
+ return Some(conv(edit));
}
match opening_bracket {
- '{' => on_left_brace_typed(&reparsed, offset),
+ '{' => on_left_brace_typed(&reparsed, offset).map(conv),
'<' => on_left_angle_typed(&file.tree(), &reparsed, offset),
_ => None,
}
@@ -364,7 +364,7 @@ fn on_left_angle_typed(
file: &SourceFile,
reparsed: &SourceFile,
offset: TextSize,
-) -> Option<TextEdit> {
+) -> Option<ExtendedTextEdit> {
let file_text = reparsed.syntax().text();
// Find the next non-whitespace char in the line, check if its a `>`
@@ -385,13 +385,16 @@ fn on_left_angle_typed(
})
{
// Insert the closing bracket right after
- Some(TextEdit::insert(offset + TextSize::of('<'), '>'.to_string()))
+ Some(ExtendedTextEdit {
+ edit: TextEdit::insert(offset + TextSize::of('<'), "$0>".to_string()),
+ is_snippet: true,
+ })
} else {
None
}
}
-fn on_pipe_typed(file: &SourceFile, offset: TextSize) -> Option<TextEdit> {
+fn on_pipe_typed(file: &SourceFile, offset: TextSize) -> Option<ExtendedTextEdit> {
let pipe_token = file.syntax().token_at_offset(offset).right_biased()?;
if pipe_token.kind() != SyntaxKind::PIPE {
return None;
@@ -400,7 +403,11 @@ fn on_pipe_typed(file: &SourceFile, offset: TextSize) -> Option<TextEdit> {
return None;
}
let after_lpipe = offset + TextSize::of('|');
- Some(TextEdit::insert(after_lpipe, "|".to_owned()))
+
+ Some(ExtendedTextEdit {
+ edit: TextEdit::insert(after_lpipe, "$0|".to_owned()),
+ is_snippet: true,
+ })
}
fn on_plus_typed(file: &SourceFile, offset: TextSize) -> Option<TextEdit> {
diff --git a/crates/rust-analyzer/Cargo.toml b/crates/rust-analyzer/Cargo.toml
index 27d9576e29..922962fd1a 100644
--- a/crates/rust-analyzer/Cargo.toml
+++ b/crates/rust-analyzer/Cargo.toml
@@ -15,9 +15,9 @@ rust-version.workspace = true
[lib]
doctest = false
-[[bin]]
-name = "rust-analyzer"
-path = "src/bin/main.rs"
+# [[bin]]
+# name = "rust-analyzer"
+# path = "src/bin/main.rs"
[dependencies]
anyhow.workspace = true
@@ -28,8 +28,11 @@ dissimilar.workspace = true
ide-completion.workspace = true
indexmap.workspace = true
itertools.workspace = true
+
scip = "0.7.1"
-lsp-types = { version = "=0.95.0", features = ["proposed"] }
+lsp-types = { git = "https://git.bendn.org/helix", package = "helix-lsp-types", features = [
+ "proposed",
+] }
parking_lot = "0.12.4"
xflags = "0.3.2"
oorandom = "11.1.5"
@@ -41,8 +44,8 @@ serde_derive.workspace = true
tenthash = "1.1.0"
num_cpus = "1.17.0"
mimalloc = { version = "0.1.46", default-features = false, optional = true }
-lsp-server.workspace = true
smallvec.workspace = true
+lsp-server = { version = "0.7.9", path = "../../lib/lsp-server" }
tracing.workspace = true
tracing-subscriber.workspace = true
tracing-tree.workspace = true
diff --git a/crates/rust-analyzer/src/bin/main.rs b/crates/rust-analyzer/src/bin/mod.rs
index 44c442ffd8..552e3f57b9 100644
--- a/crates/rust-analyzer/src/bin/main.rs
+++ b/crates/rust-analyzer/src/bin/mod.rs
@@ -12,14 +12,14 @@ mod rustc_wrapper;
use std::{env, fs, path::PathBuf, process::ExitCode, sync::Arc};
-use anyhow::Context;
-use lsp_server::Connection;
-use paths::Utf8PathBuf;
-use rust_analyzer::{
+use crate::{
cli::flags,
config::{Config, ConfigChange, ConfigErrors},
from_json,
};
+use anyhow::Context;
+use lsp_server::Connection;
+use paths::Utf8PathBuf;
use tracing_subscriber::fmt::writer::BoxMakeWriter;
use vfs::AbsPathBuf;
@@ -60,7 +60,7 @@ fn actual_main() -> anyhow::Result<ExitCode> {
break 'lsp_server;
}
if cmd.version {
- println!("rust-analyzer {}", rust_analyzer::version());
+ println!("rust-analyzer {}", crate::version());
break 'lsp_server;
}
@@ -68,11 +68,11 @@ fn actual_main() -> anyhow::Result<ExitCode> {
// a secondary latency-sensitive thread with an increased stack size.
// We use this thread intent because any delay in the main loop
// will make actions like hitting enter in the editor slow.
- with_extra_thread(
- "LspServer",
- stdx::thread::ThreadIntent::LatencySensitive,
- run_server,
- )?;
+ // with_extra_thread(
+ // "LspServer",
+ // stdx::thread::ThreadIntent::LatencySensitive,
+ // run_server,
+ // )?;
}
flags::RustAnalyzerCmd::Parse(cmd) => cmd.run()?,
flags::RustAnalyzerCmd::Symbols(cmd) => cmd.run()?,
@@ -158,7 +158,7 @@ fn setup_logging(log_file_flag: Option<PathBuf>) -> anyhow::Result<()> {
None => BoxMakeWriter::new(std::io::stderr),
};
- rust_analyzer::tracing::Config {
+ crate::tracing::Config {
writer,
// Deliberately enable all `warn` logs if the user has not set RA_LOG, as there is usually
// useful information in there for debugging.
@@ -190,17 +190,43 @@ fn with_extra_thread(
Ok(())
}
-fn run_server() -> anyhow::Result<()> {
- tracing::info!("server version {} will start", rust_analyzer::version());
+pub fn run_server(connection: Connection) -> anyhow::Result<()> {
+ let log_file = env::var("RA_LOG_FILE").ok().map(PathBuf::from);
+ let log_file = match log_file {
+ Some(path) => {
+ if let Some(parent) = path.parent() {
+ let _ = fs::create_dir_all(parent);
+ }
+ Some(
+ fs::File::create(&path)
+ .with_context(|| format!("can't create log file at {}", path.display()))?,
+ )
+ }
+ None => None,
+ };
+
+ let writer = match log_file {
+ Some(file) => BoxMakeWriter::new(Arc::new(file)),
+ None => BoxMakeWriter::new(std::io::stderr),
+ };
+
+ crate::tracing::Config {
+ writer,
+ // Deliberately enable all `warn` logs if the user has not set RA_LOG, as there is usually
+ // useful information in there for debugging.
+ filter: env::var("RA_LOG").ok().unwrap_or_else(|| "warn".to_owned()),
+ chalk_filter: env::var("CHALK_DEBUG").ok(),
+ profile_filter: env::var("RA_PROFILE").ok(),
+ json_profile_filter: std::env::var("RA_PROFILE_JSON").ok(),
+ }
+ .init()?;
- let (connection, io_threads) = Connection::stdio();
+ tracing::info!("server version {} will start", crate::version());
let (initialize_id, initialize_params) = match connection.initialize_start() {
Ok(it) => it,
Err(e) => {
- if e.channel_is_disconnected() {
- io_threads.join()?;
- }
+ if e.channel_is_disconnected() {}
return Err(e.into());
}
};
@@ -280,13 +306,13 @@ fn run_server() -> anyhow::Result<()> {
}
}
- let server_capabilities = rust_analyzer::server_capabilities(&config);
+ let server_capabilities = crate::server_capabilities(&config);
let initialize_result = lsp_types::InitializeResult {
capabilities: server_capabilities,
server_info: Some(lsp_types::ServerInfo {
name: String::from("rust-analyzer"),
- version: Some(rust_analyzer::version().to_string()),
+ version: Some(crate::version().to_string()),
}),
offset_encoding: None,
};
@@ -294,9 +320,7 @@ fn run_server() -> anyhow::Result<()> {
let initialize_result = serde_json::to_value(initialize_result).unwrap();
if let Err(e) = connection.initialize_finish(initialize_id, initialize_result) {
- if e.channel_is_disconnected() {
- io_threads.join()?;
- }
+ if e.channel_is_disconnected() {}
return Err(e.into());
}
@@ -308,18 +332,13 @@ fn run_server() -> anyhow::Result<()> {
}
rayon::ThreadPoolBuilder::new()
- .thread_name(|ix| format!("RayonWorker{}", ix))
+ .thread_name(|ix| format!("RARayonWorker{}", ix))
.build_global()
.unwrap();
// If the io_threads have an error, there's usually an error on the main
// loop too because the channels are closed. Ensure we report both errors.
- match (rust_analyzer::main_loop(config, connection), io_threads.join()) {
- (Err(loop_e), Err(join_e)) => anyhow::bail!("{loop_e}\n{join_e}"),
- (Ok(_), Err(join_e)) => anyhow::bail!("{join_e}"),
- (Err(loop_e), Ok(_)) => anyhow::bail!("{loop_e}"),
- (Ok(_), Ok(_)) => {}
- }
+ crate::main_loop(config, connection)?;
tracing::info!("server did shut down");
Ok(())
diff --git a/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs b/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs
index a6d7bcb9c7..201b5f8360 100644
--- a/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs
+++ b/crates/rust-analyzer/src/diagnostics/flycheck_to_proto.rs
@@ -455,33 +455,9 @@ pub(crate) fn map_rust_diagnostic_to_lsp(
tags: tag.clone().map(|tag| vec![tag]),
data: Some(serde_json::json!({ "rendered": rendered })),
},
- fix: None,
+ // i dont like it.
+ fix: subdiagnostics.iter().flat_map(|x| x.suggested_fix.clone()).next(),
});
-
- // Emit hint-level diagnostics for all `related_information` entries such as "help"s.
- // This is useful because they will show up in the user's editor, unlike
- // `related_information`, which just produces hard-to-read links, at least in VS Code.
- let back_ref = lsp_types::DiagnosticRelatedInformation {
- location: primary_location,
- message: "original diagnostic".to_owned(),
- };
- for sub in &subdiagnostics {
- diagnostics.push(MappedRustDiagnostic {
- url: sub.related.location.uri.clone(),
- fix: sub.suggested_fix.clone(),
- diagnostic: lsp_types::Diagnostic {
- range: sub.related.location.range,
- severity: Some(lsp_types::DiagnosticSeverity::HINT),
- code: code.map(ToOwned::to_owned).map(lsp_types::NumberOrString::String),
- code_description: code_description.clone(),
- source: Some(source.to_owned()),
- message: sub.related.message.clone(),
- related_information: Some(vec![back_ref.clone()]),
- tags: None, // don't apply modifiers again
- data: None,
- },
- });
- }
}
diagnostics
}
diff --git a/crates/rust-analyzer/src/handlers/dispatch.rs b/crates/rust-analyzer/src/handlers/dispatch.rs
index 67bd643fce..f3b24bf0e7 100644
--- a/crates/rust-analyzer/src/handlers/dispatch.rs
+++ b/crates/rust-analyzer/src/handlers/dispatch.rs
@@ -421,6 +421,9 @@ impl NotificationDispatcher<'_> {
self.not = Some(not);
return self;
}
+ Err(ExtractError::NoResult) => {
+ panic!()
+ }
};
tracing::debug!(?params);
diff --git a/crates/rust-analyzer/src/handlers/request.rs b/crates/rust-analyzer/src/handlers/request.rs
index ca6a2e70b0..7aad7255e2 100644
--- a/crates/rust-analyzer/src/handlers/request.rs
+++ b/crates/rust-analyzer/src/handlers/request.rs
@@ -395,7 +395,7 @@ pub(crate) fn handle_selection_range(
pub(crate) fn handle_matching_brace(
snap: GlobalStateSnapshot,
params: lsp_ext::MatchingBraceParams,
-) -> anyhow::Result<Vec<Position>> {
+) -> anyhow::Result<Vec<Option<Position>>> {
let _p = tracing::info_span!("handle_matching_brace").entered();
let file_id = try_default!(from_proto::file_id(&snap, &params.text_document.uri)?);
let line_index = snap.file_line_index(file_id)?;
@@ -405,11 +405,10 @@ pub(crate) fn handle_matching_brace(
.map(|position| {
let offset = from_proto::offset(&line_index, position);
offset.map(|offset| {
- let offset = match snap.analysis.matching_brace(FilePosition { file_id, offset }) {
- Ok(Some(matching_brace_offset)) => matching_brace_offset,
- Err(_) | Ok(None) => offset,
- };
- to_proto::position(&line_index, offset)
+ match snap.analysis.matching_brace(FilePosition { file_id, offset }) {
+ Ok(Some(x)) => Some(to_proto::position(&line_index, x)),
+ Err(_) | Ok(None) => None,
+ }
})
})
.collect()
@@ -613,6 +612,7 @@ pub(crate) fn handle_document_symbol(
range: to_proto::range(&line_index, node.node_range),
selection_range: to_proto::range(&line_index, node.navigation_range),
children: None,
+ sticky_range: node.sticky_range.map(|x| to_proto::range(&line_index, x)),
};
symbols.push((symbol, node.parent));
}
diff --git a/crates/rust-analyzer/src/lib.rs b/crates/rust-analyzer/src/lib.rs
index 4a37bb34ab..5152d3c754 100644
--- a/crates/rust-analyzer/src/lib.rs
+++ b/crates/rust-analyzer/src/lib.rs
@@ -28,8 +28,8 @@ pub const MINIMUM_SUPPORTED_TOOLCHAIN_VERSION: semver::Version = semver::Version
build: semver::BuildMetadata::EMPTY,
};
+pub mod bin;
pub mod cli;
-
mod command;
mod diagnostics;
mod discover;
diff --git a/crates/rust-analyzer/src/lsp/capabilities.rs b/crates/rust-analyzer/src/lsp/capabilities.rs
index 3ad4cb70b4..eefc8280c3 100644
--- a/crates/rust-analyzer/src/lsp/capabilities.rs
+++ b/crates/rust-analyzer/src/lsp/capabilities.rs
@@ -170,7 +170,7 @@ pub fn server_capabilities(config: &Config) -> ServerCapabilities {
})),
diagnostic_provider: Some(lsp_types::DiagnosticServerCapabilities::Options(
lsp_types::DiagnosticOptions {
- identifier: Some("rust-analyzer".to_owned()),
+ identifier: Some("rust-analyzer".into()),
inter_file_dependencies: true,
// FIXME
workspace_diagnostics: false,
diff --git a/crates/rust-analyzer/src/lsp/ext.rs b/crates/rust-analyzer/src/lsp/ext.rs
index 754d6e65fe..e748731160 100644
--- a/crates/rust-analyzer/src/lsp/ext.rs
+++ b/crates/rust-analyzer/src/lsp/ext.rs
@@ -10,9 +10,9 @@ use std::ops;
use lsp_types::Url;
use lsp_types::request::Request;
-use lsp_types::{
+pub use lsp_types::{
CodeActionKind, DocumentOnTypeFormattingParams, PartialResultParams, Position, Range,
- TextDocumentIdentifier, WorkDoneProgressParams, notification::Notification,
+ SnippetTextEdit, TextDocumentIdentifier, WorkDoneProgressParams, notification::Notification,
};
use paths::Utf8PathBuf;
use rustc_hash::FxHashMap;
@@ -45,6 +45,7 @@ pub struct InternalTestingFetchConfigParams {
pub text_document: Option<TextDocumentIdentifier>,
pub config: InternalTestingFetchConfigOption,
}
+#[derive(Debug)]
pub enum AnalyzerStatus {}
impl Request for AnalyzerStatus {
@@ -83,7 +84,7 @@ pub struct FetchDependencyListParams {}
pub struct FetchDependencyListResult {
pub crates: Vec<CrateInfoResult>,
}
-
+#[derive(Debug)]
pub enum MemoryUsage {}
impl Request for MemoryUsage {
@@ -91,7 +92,7 @@ impl Request for MemoryUsage {
type Result = String;
const METHOD: &'static str = "rust-analyzer/memoryUsage";
}
-
+#[derive(Debug)]
pub enum ReloadWorkspace {}
impl Request for ReloadWorkspace {
@@ -99,7 +100,7 @@ impl Request for ReloadWorkspace {
type Result = ();
const METHOD: &'static str = "rust-analyzer/reloadWorkspace";
}
-
+#[derive(Debug)]
pub enum RebuildProcMacros {}
impl Request for RebuildProcMacros {
@@ -130,6 +131,7 @@ impl Request for ViewHir {
const METHOD: &'static str = "rust-analyzer/viewHir";
}
+#[derive(Debug)]
pub enum ViewMir {}
impl Request for ViewMir {
@@ -137,7 +139,7 @@ impl Request for ViewMir {
type Result = String;
const METHOD: &'static str = "rust-analyzer/viewMir";
}
-
+#[derive(Debug)]
pub enum InterpretFunction {}
impl Request for InterpretFunction {
@@ -160,7 +162,7 @@ pub struct ViewCrateGraphParams {
/// Include *all* crates, not just crates in the workspace.
pub full: bool,
}
-
+#[derive(Debug)]
pub enum ViewCrateGraph {}
impl Request for ViewCrateGraph {
@@ -174,7 +176,7 @@ impl Request for ViewCrateGraph {
pub struct ViewItemTreeParams {
pub text_document: TextDocumentIdentifier,
}
-
+#[derive(Debug)]
pub enum ViewItemTree {}
impl Request for ViewItemTree {
@@ -217,7 +219,7 @@ pub struct DiscoverTestResults {
pub scope: Option<Vec<String>>,
pub scope_file: Option<Vec<TextDocumentIdentifier>>,
}
-
+#[derive(Debug)]
pub enum DiscoverTest {}
impl Request for DiscoverTest {
@@ -225,7 +227,7 @@ impl Request for DiscoverTest {
type Result = DiscoverTestResults;
const METHOD: &'static str = "experimental/discoverTest";
}
-
+#[derive(Debug)]
pub enum DiscoveredTests {}
impl Notification for DiscoveredTests {
@@ -239,7 +241,7 @@ pub struct RunTestParams {
pub include: Option<Vec<String>>,
pub exclude: Option<Vec<String>>,
}
-
+#[derive(Debug)]
pub enum RunTest {}
impl Request for RunTest {
@@ -247,6 +249,7 @@ impl Request for RunTest {
type Result = ();
const METHOD: &'static str = "experimental/runTest";
}
+#[derive(Debug)]
pub enum EndRunTest {}
@@ -254,14 +257,14 @@ impl Notification for EndRunTest {
type Params = ();
const METHOD: &'static str = "experimental/endRunTest";
}
-
+#[derive(Debug)]
pub enum AppendOutputToRunTest {}
impl Notification for AppendOutputToRunTest {
type Params = String;
const METHOD: &'static str = "experimental/appendOutputToRunTest";
}
-
+#[derive(Debug)]
pub enum AbortRunTest {}
impl Notification for AbortRunTest {
@@ -285,7 +288,7 @@ pub struct ChangeTestStateParams {
pub test_id: String,
pub state: TestState,
}
-
+#[derive(Debug)]
pub enum ChangeTestState {}
impl Notification for ChangeTestState {
@@ -314,7 +317,7 @@ pub struct ExpandedMacro {
pub name: String,
pub expansion: String,
}
-
+#[derive(Debug)]
pub enum ViewRecursiveMemoryLayout {}
impl Request for ViewRecursiveMemoryLayout {
@@ -348,21 +351,21 @@ impl Notification for CancelFlycheck {
type Params = ();
const METHOD: &'static str = "rust-analyzer/cancelFlycheck";
}
-
+#[derive(Debug)]
pub enum RunFlycheck {}
impl Notification for RunFlycheck {
type Params = RunFlycheckParams;
const METHOD: &'static str = "rust-analyzer/runFlycheck";
}
-
+#[derive(Debug)]
pub enum ClearFlycheck {}
impl Notification for ClearFlycheck {
type Params = ();
const METHOD: &'static str = "rust-analyzer/clearFlycheck";
}
-
+#[derive(Debug)]
pub enum OpenServerLogs {}
impl Notification for OpenServerLogs {
@@ -380,7 +383,7 @@ pub enum MatchingBrace {}
impl Request for MatchingBrace {
type Params = MatchingBraceParams;
- type Result = Vec<Position>;
+ type Result = Vec<Option<Position>>;
const METHOD: &'static str = "experimental/matchingBrace";
}
@@ -390,7 +393,7 @@ pub struct MatchingBraceParams {
pub text_document: TextDocumentIdentifier,
pub positions: Vec<Position>,
}
-
+#[derive(Debug)]
pub enum ParentModule {}
impl Request for ParentModule {
@@ -398,7 +401,7 @@ impl Request for ParentModule {
type Result = Option<lsp_types::GotoDefinitionResponse>;
const METHOD: &'static str = "experimental/parentModule";
}
-
+#[derive(Debug)]
pub enum ChildModules {}
impl Request for ChildModules {
@@ -406,7 +409,7 @@ impl Request for ChildModules {
type Result = Option<lsp_types::GotoDefinitionResponse>;
const METHOD: &'static str = "experimental/childModules";
}
-
+#[derive(Debug)]
pub enum JoinLines {}
impl Request for JoinLines {
@@ -487,7 +490,7 @@ pub struct ShellRunnableArgs {
pub program: String,
pub args: Vec<String>,
}
-
+#[derive(Debug)]
pub enum RelatedTests {}
impl Request for RelatedTests {
@@ -500,7 +503,7 @@ impl Request for RelatedTests {
pub struct TestInfo {
pub runnable: Runnable,
}
-
+#[derive(Debug)]
pub enum Ssr {}
impl Request for Ssr {
@@ -629,19 +632,7 @@ pub struct SnippetTextDocumentEdit {
pub text_document: lsp_types::OptionalVersionedTextDocumentIdentifier,
pub edits: Vec<SnippetTextEdit>,
}
-
-#[derive(Debug, Eq, PartialEq, Clone, Default, Deserialize, Serialize)]
-#[serde(rename_all = "camelCase")]
-pub struct SnippetTextEdit {
- pub range: Range,
- pub new_text: String,
- #[serde(skip_serializing_if = "Option::is_none")]
- pub insert_text_format: Option<lsp_types::InsertTextFormat>,
- /// The annotation id if this is an annotated
- #[serde(skip_serializing_if = "Option::is_none")]
- pub annotation_id: Option<lsp_types::ChangeAnnotationIdentifier>,
-}
-
+#[derive(Debug)]
pub enum HoverRequest {}
impl Request for HoverRequest {
@@ -690,7 +681,7 @@ pub struct CommandLink {
#[serde(skip_serializing_if = "Option::is_none")]
pub tooltip: Option<String>,
}
-
+#[derive(Debug)]
pub enum ExternalDocs {}
impl Request for ExternalDocs {
@@ -718,7 +709,7 @@ pub struct ExternalDocsPair {
pub web: Option<lsp_types::Url>,
pub local: Option<lsp_types::Url>,
}
-
+#[derive(Debug)]
pub enum OpenCargoToml {}
impl Request for OpenCargoToml {
@@ -747,7 +738,7 @@ pub enum CodeLensResolveDataKind {
Impls(lsp_types::request::GotoImplementationParams),
References(lsp_types::TextDocumentPositionParams),
}
-
+#[derive(Debug)]
pub enum MoveItem {}
impl Request for MoveItem {
@@ -858,7 +849,7 @@ pub struct CompletionImport {
pub struct ClientCommandOptions {
pub commands: Vec<String>,
}
-
+#[derive(Debug)]
pub enum GetFailedObligations {}
#[derive(Deserialize, Serialize, Debug)]
diff --git a/crates/rust-analyzer/src/lsp/to_proto.rs b/crates/rust-analyzer/src/lsp/to_proto.rs
index eff5477969..1bc97f3951 100644
--- a/crates/rust-analyzer/src/lsp/to_proto.rs
+++ b/crates/rust-analyzer/src/lsp/to_proto.rs
@@ -64,13 +64,13 @@ pub(crate) fn symbol_kind(symbol_kind: SymbolKind) -> lsp_types::SymbolKind {
SymbolKind::Enum => lsp_types::SymbolKind::ENUM,
SymbolKind::Variant => lsp_types::SymbolKind::ENUM_MEMBER,
SymbolKind::Trait => lsp_types::SymbolKind::INTERFACE,
- SymbolKind::Macro
- | SymbolKind::ProcMacro
- | SymbolKind::BuiltinAttr
- | SymbolKind::Attribute
- | SymbolKind::Derive
- | SymbolKind::DeriveHelper => lsp_types::SymbolKind::FUNCTION,
+ SymbolKind::Macro => lsp_types::SymbolKind::MACRO,
+ SymbolKind::ProcMacro => lsp_types::SymbolKind::PROC_MACRO,
+ SymbolKind::BuiltinAttr => lsp_types::SymbolKind::BUILTIN_ATTRIBUTE,
+ SymbolKind::Attribute => lsp_types::SymbolKind::ATTRIBUTE,
+ SymbolKind::Derive => lsp_types::SymbolKind::DERIVE,
SymbolKind::CrateRoot => lsp_types::SymbolKind::PACKAGE,
+ SymbolKind::DeriveHelper => lsp_types::SymbolKind::DERIVE_HELPER,
SymbolKind::Module | SymbolKind::ToolModule => lsp_types::SymbolKind::MODULE,
SymbolKind::TypeAlias | SymbolKind::TypeParam | SymbolKind::SelfType => {
lsp_types::SymbolKind::TYPE_PARAMETER
@@ -1473,22 +1473,6 @@ impl From<lsp_ext::SnippetWorkspaceEdit> for lsp_types::WorkspaceEdit {
}
}
-impl From<lsp_ext::SnippetTextEdit>
- for lsp_types::OneOf<lsp_types::TextEdit, lsp_types::AnnotatedTextEdit>
-{
- fn from(
- lsp_ext::SnippetTextEdit { annotation_id, insert_text_format:_, new_text, range }: lsp_ext::SnippetTextEdit,
- ) -> Self {
- match annotation_id {
- Some(annotation_id) => lsp_types::OneOf::Right(lsp_types::AnnotatedTextEdit {
- text_edit: lsp_types::TextEdit { range, new_text },
- annotation_id,
- }),
- None => lsp_types::OneOf::Left(lsp_types::TextEdit { range, new_text }),
- }
- }
-}
-
pub(crate) fn call_hierarchy_item(
snap: &GlobalStateSnapshot,
target: NavigationTarget,
diff --git a/crates/rust-analyzer/src/main_loop.rs b/crates/rust-analyzer/src/main_loop.rs
index a9ce6f728b..95ecc509cf 100644
--- a/crates/rust-analyzer/src/main_loop.rs
+++ b/crates/rust-analyzer/src/main_loop.rs
@@ -271,8 +271,10 @@ impl GlobalState {
}
select! {
- recv(inbox) -> msg =>
- return Ok(msg.ok().map(Event::Lsp)),
+ recv(inbox) -> msg => {
+ tracing::debug!("{msg:?}");
+ return Ok(msg.ok().map(Event::Lsp))
+ },
recv(self.task_pool.receiver) -> task =>
task.map(Event::Task),
@@ -309,9 +311,10 @@ impl GlobalState {
let event_dbg_msg = format!("{event:?}");
tracing::debug!(?loop_start, ?event, "handle_event");
if tracing::enabled!(tracing::Level::TRACE) {
+ // tracing::debug!(?loop_start, ?event, "handle_event");
let task_queue_len = self.task_pool.handle.len();
if task_queue_len > 0 {
- tracing::trace!("task queue len: {}", task_queue_len);
+ tracing::info!("task queue len: {}", task_queue_len);
}
}
diff --git a/lib/lsp-server/Cargo.toml b/lib/lsp-server/Cargo.toml
index f56a0de616..03a4f08108 100644
--- a/lib/lsp-server/Cargo.toml
+++ b/lib/lsp-server/Cargo.toml
@@ -12,9 +12,10 @@ serde_json = "1.0.140"
serde = { version = "1.0.219" }
serde_derive = { version = "1.0.219" }
crossbeam-channel.workspace = true
+lsp-types = { git = "https://git.bendn.org/helix", package = "helix-lsp-types" }
[dev-dependencies]
-lsp-types = "=0.95"
+lsp-types = { git = "https://git.bendn.org/helix", package = "helix-lsp-types" }
ctrlc = "3.4.7"
anyhow.workspace = true
rustc-hash.workspace = true
diff --git a/lib/lsp-server/src/error.rs b/lib/lsp-server/src/error.rs
index da55393339..572d651c65 100644
--- a/lib/lsp-server/src/error.rs
+++ b/lib/lsp-server/src/error.rs
@@ -30,6 +30,8 @@ impl fmt::Display for ProtocolError {
#[derive(Debug)]
pub enum ExtractError<T> {
+ /// Not found
+ NoResult,
/// The extracted message was of a different method than expected.
MethodMismatch(T),
/// Failed to deserialize the message.
@@ -40,6 +42,9 @@ impl std::error::Error for ExtractError<Request> {}
impl fmt::Display for ExtractError<Request> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
+ ExtractError::NoResult => {
+ write!(f, "unfound")
+ }
ExtractError::MethodMismatch(req) => {
write!(f, "Method mismatch for request '{}'", req.method)
}
@@ -54,6 +59,9 @@ impl std::error::Error for ExtractError<Notification> {}
impl fmt::Display for ExtractError<Notification> {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
+ ExtractError::NoResult => {
+ write!(f, "unfound")
+ }
ExtractError::MethodMismatch(req) => {
write!(f, "Method mismatch for notification '{}'", req.method)
}
diff --git a/lib/lsp-server/src/lib.rs b/lib/lsp-server/src/lib.rs
index 315cb2d5c3..66ecbf8c33 100644
--- a/lib/lsp-server/src/lib.rs
+++ b/lib/lsp-server/src/lib.rs
@@ -6,12 +6,12 @@
#![warn(rust_2018_idioms, unused_lifetimes)]
#![allow(clippy::print_stdout, clippy::disallowed_types)]
-
-mod error;
-mod msg;
-mod req_queue;
-mod socket;
-mod stdio;
+#![feature(bool_to_result)]
+pub mod error;
+pub mod msg;
+pub mod req_queue;
+pub mod socket;
+pub mod stdio;
use std::{
io::{self, Stdin, Stdout},
diff --git a/lib/lsp-server/src/msg.rs b/lib/lsp-server/src/msg.rs
index eb8b6bbf04..cdc75153bc 100644
--- a/lib/lsp-server/src/msg.rs
+++ b/lib/lsp-server/src/msg.rs
@@ -234,12 +234,29 @@ impl Response {
let error = ResponseError { code, message, data: None };
Response { id, result: None, error: Some(error) }
}
+ pub fn load<P: DeserializeOwned>(self) -> Result<P, ExtractError<Request>> {
+ self.result.ok_or(ExtractError::NoResult).and_then(|x| {
+ serde_json::from_value(x)
+ .map_err(|error| ExtractError::JsonError { method: "".into(), error })
+ })
+ }
}
impl Request {
pub fn new<P: serde::Serialize>(id: RequestId, method: String, params: P) -> Request {
Request { id, method, params: serde_json::to_value(params).unwrap() }
}
+ pub fn load<P: lsp_types::request::Request>(
+ self,
+ ) -> Result<(RequestId, P::Params), ExtractError<Request>> {
+ if self.method != P::METHOD {
+ return Err(ExtractError::MethodMismatch(self));
+ }
+ match serde_json::from_value(self.params) {
+ Ok(params) => Ok((self.id, params)),
+ Err(error) => Err(ExtractError::JsonError { method: self.method, error }),
+ }
+ }
pub fn extract<P: DeserializeOwned>(
self,
method: &str,
@@ -265,6 +282,14 @@ impl Notification {
pub fn new(method: String, params: impl serde::Serialize) -> Notification {
Notification { method, params: serde_json::to_value(params).unwrap() }
}
+ pub fn load<T: lsp_types::notification::Notification>(
+ self,
+ ) -> Result<T::Params, ExtractError<Notification>> {
+ (self.method == T::METHOD).ok_or(ExtractError::NoResult).and_then(|()| {
+ serde_json::from_value(self.params)
+ .map_err(|e| ExtractError::JsonError { method: self.method, error: e })
+ })
+ }
pub fn extract<P: DeserializeOwned>(
self,
method: &str,
diff --git a/lib/lsp-server/src/socket.rs b/lib/lsp-server/src/socket.rs
index 793073d1f7..59d0dc7b0c 100644
--- a/lib/lsp-server/src/socket.rs
+++ b/lib/lsp-server/src/socket.rs
@@ -16,10 +16,7 @@ pub(crate) fn socket_transport(
) -> (Sender<Message>, Receiver<Message>, IoThreads) {
let (reader_receiver, reader) = make_reader(stream.try_clone().unwrap());
let (writer_sender, writer, messages_to_drop) = make_write(stream);
- let dropper = std::thread::spawn(move || {
- messages_to_drop.into_iter().for_each(drop);
- });
- let io_threads = make_io_threads(reader, writer, dropper);
+ let io_threads = make_io_threads(reader, writer);
(writer_sender, reader_receiver, io_threads)
}
diff --git a/lib/lsp-server/src/stdio.rs b/lib/lsp-server/src/stdio.rs
index 711c4e9907..d14d8ee55d 100644
--- a/lib/lsp-server/src/stdio.rs
+++ b/lib/lsp-server/src/stdio.rs
@@ -3,41 +3,35 @@ use std::{
thread,
};
-use log::debug;
+use log::{debug, trace};
-use crossbeam_channel::{Receiver, Sender, bounded};
+use crossbeam_channel::{Receiver, Sender, bounded, unbounded};
use crate::Message;
-
/// Creates an LSP connection via stdio.
-pub(crate) fn stdio_transport(
+pub fn stdio_transport(
mut read_from: impl Read + std::io::BufRead + Sync + Send + 'static,
mut write_to: impl Write + Sync + Send + 'static,
) -> (Sender<Message>, Receiver<Message>, IoThreads) {
- let (drop_sender, drop_receiver) = bounded::<Message>(0);
- let (writer_sender, writer_receiver) = bounded::<Message>(0);
+ let (writer_sender, writer_receiver) = unbounded::<Message>();
let writer = thread::Builder::new()
- .name("LspServerWriter".to_owned())
+ .name("send to lsp".to_owned())
.spawn(move || {
- writer_receiver.into_iter().try_for_each(|it| {
- let result = it.write(&mut write_to);
- let _ = drop_sender.send(it);
+ loop {
+ let it = writer_receiver.recv().unwrap();
+ trace!("sent message {it:#?}");
+ let result = it.write(&mut write_to).unwrap();
result
- })
+ }
})
.unwrap();
- let dropper = thread::Builder::new()
- .name("LspMessageDropper".to_owned())
- .spawn(move || drop_receiver.into_iter().for_each(drop))
- .unwrap();
let (reader_sender, reader_receiver) = bounded::<Message>(0);
let reader: thread::JoinHandle<Result<(), io::Error>> = thread::Builder::new()
- .name("LspServerReader".to_owned())
+ .name("read from lsp".to_owned())
.spawn(move || {
while let Some(msg) = Message::read(&mut read_from)? {
let is_exit = matches!(&msg, Message::Notification(n) if n.is_exit());
-
- debug!("sending message {msg:#?}");
+ trace!("received message {msg:#?}");
if let Err(e) = reader_sender.send(msg) {
return Err(io::Error::other(e));
}
@@ -49,7 +43,7 @@ pub(crate) fn stdio_transport(
Ok(())
})
.unwrap();
- let threads = IoThreads { reader, writer, dropper };
+ let threads = IoThreads { reader, writer };
(writer_sender, reader_receiver, threads)
}
@@ -57,15 +51,13 @@ pub(crate) fn stdio_transport(
pub(crate) fn make_io_threads(
reader: thread::JoinHandle<io::Result<()>>,
writer: thread::JoinHandle<io::Result<()>>,
- dropper: thread::JoinHandle<()>,
) -> IoThreads {
- IoThreads { reader, writer, dropper }
+ IoThreads { reader, writer }
}
pub struct IoThreads {
- reader: thread::JoinHandle<io::Result<()>>,
- writer: thread::JoinHandle<io::Result<()>>,
- dropper: thread::JoinHandle<()>,
+ pub reader: thread::JoinHandle<io::Result<()>>,
+ pub writer: thread::JoinHandle<io::Result<()>>,
}
impl IoThreads {
@@ -74,12 +66,6 @@ impl IoThreads {
Ok(r) => r?,
Err(err) => std::panic::panic_any(err),
}
- match self.dropper.join() {
- Ok(_) => (),
- Err(err) => {
- std::panic::panic_any(err);
- }
- }
match self.writer.join() {
Ok(r) => r,
Err(err) => {
diff --git a/lib/smol_str/src/lib.rs b/lib/smol_str/src/lib.rs
index b76c1c7d14..412f6a7bd2 100644
--- a/lib/smol_str/src/lib.rs
+++ b/lib/smol_str/src/lib.rs
@@ -1,3 +1,4 @@
+#![feature(deref_pure_trait)]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![debugger_visualizer(gdb_script_file = "gdb_smolstr_printer.py")]
@@ -12,6 +13,7 @@ use core::{
fmt, hash, iter, mem, ops,
str::FromStr,
};
+use std::ops::DerefPure;
/// A `SmolStr` is a string type that has the following properties:
///
@@ -33,6 +35,8 @@ use core::{
/// `WS`: A string of 32 newlines followed by 128 spaces.
pub struct SmolStr(Repr);
+unsafe impl DerefPure for SmolStr {}
+
impl SmolStr {
/// The maximum byte length of a string that can be stored inline
/// without heap allocation.