Bump Tree-sitter for bug fixes affecting YAML parser loaded via WASM (#25054)

Closes https://github.com/zed-industries/zed/issues/24742
Closes #24632

This PR bumps Tree-sitter to bring in bug fixes:
* https://github.com/tree-sitter/tree-sitter/pull/4218
* https://github.com/tree-sitter/tree-sitter/pull/4213
* https://github.com/tree-sitter/tree-sitter/pull/4210

I've also bumped Wasmtime and wit-bindgen, since the new Tree-sitter
uses a newer wasmtime.

Release Notes:

- Fixed a parsing bug that caused memory leaks and crashes when using
the Ansible extension

---------

Co-authored-by: Anthony <anthony@zed.dev>
Co-authored-by: Anthony Eid <hello@anthonyeid.me>
This commit is contained in:
Max Brunsfeld 2025-02-17 21:29:27 -08:00 committed by GitHub
parent 8942e657aa
commit 813d870a03
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
15 changed files with 225 additions and 211 deletions

371
Cargo.lock generated
View file

@ -27,7 +27,7 @@ version = "0.24.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1"
dependencies = [ dependencies = [
"gimli 0.31.1", "gimli",
] ]
[[package]] [[package]]
@ -2057,6 +2057,9 @@ name = "bumpalo"
version = "3.16.0" version = "3.16.0"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c"
dependencies = [
"allocator-api2",
]
[[package]] [[package]]
name = "by_address" name = "by_address"
@ -2421,7 +2424,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02" checksum = "d067ad48b8650848b989a59a86c6c36a995d02d2bf778d45c3c5d57bc2718f02"
dependencies = [ dependencies = [
"smallvec", "smallvec",
"target-lexicon", "target-lexicon 0.12.16",
] ]
[[package]] [[package]]
@ -3328,18 +3331,18 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-bforest" name = "cranelift-bforest"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "69792bd40d21be8059f7c709f44200ded3bbd073df7eb3fa3c282b387c7ffa5b" checksum = "e15d04a0ce86cb36ead88ad68cf693ffd6cda47052b9e0ac114bc47fd9cd23c4"
dependencies = [ dependencies = [
"cranelift-entity", "cranelift-entity",
] ]
[[package]] [[package]]
name = "cranelift-bitset" name = "cranelift-bitset"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "38da1eb6f7d8cdfa92f05acfae63c9a1d7a337e49ce7a2d0769c7fa03a2613a5" checksum = "7c6e3969a7ce267259ce244b7867c5d3bc9e65b0a87e81039588dfdeaede9f34"
dependencies = [ dependencies = [
"serde", "serde",
"serde_derive", "serde_derive",
@ -3347,9 +3350,9 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-codegen" name = "cranelift-codegen"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "709f5567a2bff9f06edf911a7cb5ebb091e4c81701714dc6ab574d08b4a69a0d" checksum = "2c22032c4cb42558371cf516bb47f26cdad1819d3475c133e93c49f50ebf304e"
dependencies = [ dependencies = [
"bumpalo", "bumpalo",
"cranelift-bforest", "cranelift-bforest",
@ -3359,44 +3362,45 @@ dependencies = [
"cranelift-control", "cranelift-control",
"cranelift-entity", "cranelift-entity",
"cranelift-isle", "cranelift-isle",
"gimli 0.29.0", "gimli",
"hashbrown 0.14.5", "hashbrown 0.14.5",
"log", "log",
"regalloc2", "regalloc2",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"serde",
"smallvec", "smallvec",
"target-lexicon", "target-lexicon 0.13.2",
] ]
[[package]] [[package]]
name = "cranelift-codegen-meta" name = "cranelift-codegen-meta"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "72d39a6b194c069fd091ca1f17b9d86ff1a4627ccad8806095828f61989a691f" checksum = "c904bc71c61b27fc57827f4a1379f29de64fe95653b620a3db77d59655eee0b8"
dependencies = [ dependencies = [
"cranelift-codegen-shared", "cranelift-codegen-shared",
] ]
[[package]] [[package]]
name = "cranelift-codegen-shared" name = "cranelift-codegen-shared"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "18f81aefad1f80ed4132ae33f40b92779eeb57edeb1e28bb24424a4098c963a2" checksum = "40180f5497572f644ce88c255480981ae2ec1d7bb4d8e0c0136a13b87a2f2ceb"
[[package]] [[package]]
name = "cranelift-control" name = "cranelift-control"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6adbaac785ad4683c4f199686f9e15c1471f52ae2f4c013a3be039b4719db754" checksum = "26d132c6d0bd8a489563472afc171759da0707804a65ece7ceb15a8c6d7dd5ef"
dependencies = [ dependencies = [
"arbitrary", "arbitrary",
] ]
[[package]] [[package]]
name = "cranelift-entity" name = "cranelift-entity"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "70b85ed43567e13782cd1b25baf42a8167ee57169a60dfd3d7307c6ca3839da0" checksum = "4b2d0d9618275474fbf679dd018ac6e009acbd6ae6850f6a67be33fb3b00b323"
dependencies = [ dependencies = [
"cranelift-bitset", "cranelift-bitset",
"serde", "serde",
@ -3405,47 +3409,31 @@ dependencies = [
[[package]] [[package]]
name = "cranelift-frontend" name = "cranelift-frontend"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8349f71373bb69c6f73992c6c1606236a66c8134e7a60e04e03fbd64b1aa7dcf" checksum = "4fac41e16729107393174b0c9e3730fb072866100e1e64e80a1a963b2e484d57"
dependencies = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"log", "log",
"smallvec", "smallvec",
"target-lexicon", "target-lexicon 0.13.2",
] ]
[[package]] [[package]]
name = "cranelift-isle" name = "cranelift-isle"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "464a6b958ce05e0c237c8b25508012b6c644e8c37348213a8c786ba29e28cfdb" checksum = "1ca20d576e5070044d0a72a9effc2deacf4d6aa650403189d8ea50126483944d"
[[package]] [[package]]
name = "cranelift-native" name = "cranelift-native"
version = "0.112.3" version = "0.116.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ffc4acaf6894ee323ff4e9ce786bec09f0ebbe49941e8012f1c1052f1d965034" checksum = "b8dee82f3f1f2c4cba9177f1cc5e350fe98764379bcd29340caa7b01f85076c7"
dependencies = [ dependencies = [
"cranelift-codegen", "cranelift-codegen",
"libc", "libc",
"target-lexicon", "target-lexicon 0.13.2",
]
[[package]]
name = "cranelift-wasm"
version = "0.112.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b878860895cca97454ef8d8b12bfda9d0889dd49efee175dba78d54ff8363ec2"
dependencies = [
"cranelift-codegen",
"cranelift-entity",
"cranelift-frontend",
"itertools 0.12.1",
"log",
"smallvec",
"wasmparser 0.217.1",
"wasmtime-types",
] ]
[[package]] [[package]]
@ -4445,9 +4433,9 @@ dependencies = [
"serde_json", "serde_json",
"toml 0.8.20", "toml 0.8.20",
"util", "util",
"wasm-encoder 0.217.1", "wasm-encoder 0.221.3",
"wasmparser 0.217.1", "wasmparser 0.221.3",
"wit-component", "wit-component 0.221.3",
] ]
[[package]] [[package]]
@ -4515,7 +4503,7 @@ dependencies = [
"toml 0.8.20", "toml 0.8.20",
"url", "url",
"util", "util",
"wasmparser 0.217.1", "wasmparser 0.221.3",
"wasmtime", "wasmtime",
"wasmtime-wasi", "wasmtime-wasi",
] ]
@ -5263,21 +5251,15 @@ dependencies = [
[[package]] [[package]]
name = "gimli" name = "gimli"
version = "0.29.0" version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
dependencies = [ dependencies = [
"fallible-iterator", "fallible-iterator",
"indexmap", "indexmap",
"stable_deref_trait", "stable_deref_trait",
] ]
[[package]]
name = "gimli"
version = "0.31.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f"
[[package]] [[package]]
name = "git" name = "git"
version = "0.1.0" version = "0.1.0"
@ -5706,7 +5688,6 @@ checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1"
dependencies = [ dependencies = [
"ahash 0.8.11", "ahash 0.8.11",
"allocator-api2", "allocator-api2",
"serde",
] ]
[[package]] [[package]]
@ -5718,6 +5699,7 @@ dependencies = [
"allocator-api2", "allocator-api2",
"equivalent", "equivalent",
"foldhash", "foldhash",
"serde",
] ]
[[package]] [[package]]
@ -10449,6 +10431,18 @@ version = "0.10.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bd348ff538bc9caeda7ee8cad2d1d48236a1f443c1fa3913c6a02fe0043b1dd3" checksum = "bd348ff538bc9caeda7ee8cad2d1d48236a1f443c1fa3913c6a02fe0043b1dd3"
[[package]]
name = "pulley-interpreter"
version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62d95f8575df49a2708398182f49a888cf9dc30210fb1fd2df87c889edcee75d"
dependencies = [
"cranelift-bitset",
"log",
"sptr",
"wasmtime-math",
]
[[package]] [[package]]
name = "qoi" name = "qoi"
version = "0.4.1" version = "0.4.1"
@ -10829,14 +10823,15 @@ dependencies = [
[[package]] [[package]]
name = "regalloc2" name = "regalloc2"
version = "0.10.2" version = "0.11.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "12908dbeb234370af84d0579b9f68258a0f67e201412dd9a2814e6f45b2fc0f0" checksum = "145c1c267e14f20fb0f88aa76a1c5ffec42d592c1d28b3cd9148ae35916158d3"
dependencies = [ dependencies = [
"hashbrown 0.14.5", "allocator-api2",
"bumpalo",
"hashbrown 0.15.2",
"log", "log",
"rustc-hash 2.1.1", "rustc-hash 2.1.1",
"slice-group-by",
"smallvec", "smallvec",
] ]
@ -12351,12 +12346,6 @@ dependencies = [
"zed_extension_api 0.1.0", "zed_extension_api 0.1.0",
] ]
[[package]]
name = "slice-group-by"
version = "0.3.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "826167069c09b99d56f31e9ae5c99049e932a98c9dc2dac47645b08dbbf76ba7"
[[package]] [[package]]
name = "slotmap" name = "slotmap"
version = "1.0.7" version = "1.0.7"
@ -13272,6 +13261,12 @@ version = "0.12.16"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1" checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
[[package]]
name = "target-lexicon"
version = "0.13.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e502f78cdbb8ba4718f566c418c52bc729126ffd16baee5baa718cf25dd5a69a"
[[package]] [[package]]
name = "task" name = "task"
version = "0.1.0" version = "0.1.0"
@ -14115,14 +14110,26 @@ dependencies = [
] ]
[[package]] [[package]]
name = "tree-sitter" name = "trait-variant"
version = "0.24.7" version = "0.1.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a5387dffa7ffc7d2dae12b50c6f7aab8ff79d6210147c6613561fc3d474c6f75" checksum = "70977707304198400eb4835a78f6a9f928bf41bba420deb8fdb175cd965d77a7"
dependencies = [
"proc-macro2",
"quote",
"syn 2.0.90",
]
[[package]]
name = "tree-sitter"
version = "0.25.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5168a515fe492af54c5cc8800ff8c840be09fa5168de45838afaecd3e008bce4"
dependencies = [ dependencies = [
"cc", "cc",
"regex", "regex",
"regex-syntax 0.8.5", "regex-syntax 0.8.5",
"serde_json",
"streaming-iterator", "streaming-iterator",
"tree-sitter-language", "tree-sitter-language",
"wasmtime-c-api-impl", "wasmtime-c-api-impl",
@ -14246,12 +14253,12 @@ dependencies = [
[[package]] [[package]]
name = "tree-sitter-html" name = "tree-sitter-html"
version = "0.20.4" version = "0.23.2"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8766b5ad3721517f8259e6394aefda9c686aebf7a8c74ab8624f2c3b46902fd5" checksum = "261b708e5d92061ede329babaaa427b819329a9d427a1d710abb0f67bbef63ee"
dependencies = [ dependencies = [
"cc", "cc",
"tree-sitter", "tree-sitter-language",
] ]
[[package]] [[package]]
@ -15034,11 +15041,12 @@ dependencies = [
[[package]] [[package]]
name = "wasm-encoder" name = "wasm-encoder"
version = "0.217.1" version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "10961fd76db420582926af70816dd205019d8152d9e51e1b939125dd1639f854" checksum = "dc8444fe4920de80a4fe5ab564fff2ae58b6b73166b89751f8c6c93509da32e5"
dependencies = [ dependencies = [
"leb128", "leb128",
"wasmparser 0.221.3",
] ]
[[package]] [[package]]
@ -15057,6 +15065,22 @@ dependencies = [
"wasmparser 0.201.0", "wasmparser 0.201.0",
] ]
[[package]]
name = "wasm-metadata"
version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "11f4ef50d17e103a88774cd4aa5d06bfb1ae44036a8f3f1325e0e9b3e3417ac4"
dependencies = [
"anyhow",
"indexmap",
"serde",
"serde_derive",
"serde_json",
"spdx",
"wasm-encoder 0.221.3",
"wasmparser 0.221.3",
]
[[package]] [[package]]
name = "wasm-streams" name = "wasm-streams"
version = "0.4.2" version = "0.4.2"
@ -15083,13 +15107,12 @@ dependencies = [
[[package]] [[package]]
name = "wasmparser" name = "wasmparser"
version = "0.217.1" version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "65a5a0689975b9fd93c02f5400cfd9669858b99607e54e7b892c6080cba598bb" checksum = "d06bfa36ab3ac2be0dee563380147a5b81ba10dd8885d7fbbc9eb574be67d185"
dependencies = [ dependencies = [
"ahash 0.8.11",
"bitflags 2.8.0", "bitflags 2.8.0",
"hashbrown 0.14.5", "hashbrown 0.15.2",
"indexmap", "indexmap",
"semver", "semver",
"serde", "serde",
@ -15097,20 +15120,20 @@ dependencies = [
[[package]] [[package]]
name = "wasmprinter" name = "wasmprinter"
version = "0.217.1" version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "324c6782d7b81c01625335d252653b26ea68e835ddb4aef4cb1ed3ea40ae3a49" checksum = "7343c42a97f2926c7819ff81b64012092ae954c5d83ddd30c9fcdefd97d0b283"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"termcolor", "termcolor",
"wasmparser 0.217.1", "wasmparser 0.221.3",
] ]
[[package]] [[package]]
name = "wasmtime" name = "wasmtime"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f38dbf42dc56a6fe41ccd77211ea8ec90855de05e52cd00df5a0a3bca87d6147" checksum = "11976a250672556d1c4c04c6d5d7656ac9192ac9edc42a4587d6c21460010e69"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -15122,7 +15145,6 @@ dependencies = [
"hashbrown 0.14.5", "hashbrown 0.14.5",
"indexmap", "indexmap",
"libc", "libc",
"libm",
"log", "log",
"mach2", "mach2",
"memfd", "memfd",
@ -15131,14 +15153,16 @@ dependencies = [
"paste", "paste",
"postcard", "postcard",
"psm", "psm",
"pulley-interpreter",
"rustix", "rustix",
"semver", "semver",
"serde", "serde",
"serde_derive", "serde_derive",
"smallvec", "smallvec",
"sptr", "sptr",
"target-lexicon", "target-lexicon 0.13.2",
"wasmparser 0.217.1", "trait-variant",
"wasmparser 0.221.3",
"wasmtime-asm-macros", "wasmtime-asm-macros",
"wasmtime-component-macro", "wasmtime-component-macro",
"wasmtime-component-util", "wasmtime-component-util",
@ -15146,30 +15170,30 @@ dependencies = [
"wasmtime-environ", "wasmtime-environ",
"wasmtime-fiber", "wasmtime-fiber",
"wasmtime-jit-icache-coherence", "wasmtime-jit-icache-coherence",
"wasmtime-math",
"wasmtime-slab", "wasmtime-slab",
"wasmtime-versioned-export-macros", "wasmtime-versioned-export-macros",
"wasmtime-winch", "wasmtime-winch",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
name = "wasmtime-asm-macros" name = "wasmtime-asm-macros"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30e0c7f9983c2d60109a939d9ab0e0df301901085c3608e1c22c27c98390a027" checksum = "1f178b0d125201fbe9f75beaf849bd3e511891f9e45ba216a5b620802ccf64f2"
dependencies = [ dependencies = [
"cfg-if", "cfg-if",
] ]
[[package]] [[package]]
name = "wasmtime-c-api-impl" name = "wasmtime-c-api-impl"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ebfcdb4aa0f68020934099815cf6ef11dbbedaf070ef800b3f0a7f6ec7b7d005" checksum = "ea30cef3608f2de5797c7bbb94c1ba4f3676d9a7f81ae86ced1b512e2766ed0c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"log", "log",
"once_cell",
"tracing", "tracing",
"wasmtime", "wasmtime",
"wasmtime-c-api-macros", "wasmtime-c-api-macros",
@ -15177,9 +15201,9 @@ dependencies = [
[[package]] [[package]]
name = "wasmtime-c-api-macros" name = "wasmtime-c-api-macros"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "842c213ad4546fb0178735910b96ee7da303e1d745c3f42f4178b0de1da138b6" checksum = "022a79ebe1124d5d384d82463d7e61c6b4dd857d81f15cb8078974eeb86db65b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -15187,9 +15211,9 @@ dependencies = [
[[package]] [[package]]
name = "wasmtime-component-macro" name = "wasmtime-component-macro"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0929ffffaca32dd8770b56848c94056036963ca05de25fb47cac644e20262168" checksum = "d74de6592ed945d0a602f71243982a304d5d02f1e501b638addf57f42d57dfaf"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"proc-macro2", "proc-macro2",
@ -15197,20 +15221,20 @@ dependencies = [
"syn 2.0.90", "syn 2.0.90",
"wasmtime-component-util", "wasmtime-component-util",
"wasmtime-wit-bindgen", "wasmtime-wit-bindgen",
"wit-parser 0.217.1", "wit-parser 0.221.3",
] ]
[[package]] [[package]]
name = "wasmtime-component-util" name = "wasmtime-component-util"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "fdc29d2b56629d66d2fd791d1b46471d0016e0d684ed2dc299e870d127082268" checksum = "707dc7b3c112ab5a366b30cfe2fb5b2f8e6a0f682f16df96a5ec582bfe6f056e"
[[package]] [[package]]
name = "wasmtime-cranelift" name = "wasmtime-cranelift"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f8c8af1197703f4de556a274384adf5db36a146f9892bc9607bad16881e75c80" checksum = "366be722674d4bf153290fbcbc4d7d16895cc82fb3e869f8d550ff768f9e9e87"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cfg-if", "cfg-if",
@ -15219,29 +15243,29 @@ dependencies = [
"cranelift-entity", "cranelift-entity",
"cranelift-frontend", "cranelift-frontend",
"cranelift-native", "cranelift-native",
"cranelift-wasm", "gimli",
"gimli 0.29.0", "itertools 0.12.1",
"log", "log",
"object", "object",
"smallvec", "smallvec",
"target-lexicon", "target-lexicon 0.13.2",
"thiserror 1.0.69", "thiserror 1.0.69",
"wasmparser 0.217.1", "wasmparser 0.221.3",
"wasmtime-environ", "wasmtime-environ",
"wasmtime-versioned-export-macros", "wasmtime-versioned-export-macros",
] ]
[[package]] [[package]]
name = "wasmtime-environ" name = "wasmtime-environ"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f1b5af7bac868c5bce3b78a366a10677caacf6e6467c156301297e36ed31f3e" checksum = "cdadc1af7097347aa276a4f008929810f726b5b46946971c660b6d421e9994ad"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cpp_demangle", "cpp_demangle",
"cranelift-bitset", "cranelift-bitset",
"cranelift-entity", "cranelift-entity",
"gimli 0.29.0", "gimli",
"indexmap", "indexmap",
"log", "log",
"object", "object",
@ -15250,19 +15274,19 @@ dependencies = [
"semver", "semver",
"serde", "serde",
"serde_derive", "serde_derive",
"target-lexicon", "smallvec",
"wasm-encoder 0.217.1", "target-lexicon 0.13.2",
"wasmparser 0.217.1", "wasm-encoder 0.221.3",
"wasmparser 0.221.3",
"wasmprinter", "wasmprinter",
"wasmtime-component-util", "wasmtime-component-util",
"wasmtime-types",
] ]
[[package]] [[package]]
name = "wasmtime-fiber" name = "wasmtime-fiber"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "665ccc1bb0f28496e6fa02e94c575ee9ad6e3202c7df8591e5dda78106d5aa4a" checksum = "ccba90d4119f081bca91190485650730a617be1fff5228f8c4757ce133d21117"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cc", "cc",
@ -15270,46 +15294,41 @@ dependencies = [
"rustix", "rustix",
"wasmtime-asm-macros", "wasmtime-asm-macros",
"wasmtime-versioned-export-macros", "wasmtime-versioned-export-macros",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
name = "wasmtime-jit-icache-coherence" name = "wasmtime-jit-icache-coherence"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5d7314e32c624f645ad7d6b9fc3ac89eb7d2b9aa06695d6445cec087958ec27d" checksum = "ec5e8552e01692e6c2e5293171704fed8abdec79d1a6995a0870ab190e5747d1"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cfg-if", "cfg-if",
"libc", "libc",
"windows-sys 0.52.0", "windows-sys 0.59.0",
]
[[package]]
name = "wasmtime-math"
version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "29210ec2aa25e00f4d54605cedaf080f39ec01a872c5bd520ad04c67af1dde17"
dependencies = [
"libm",
] ]
[[package]] [[package]]
name = "wasmtime-slab" name = "wasmtime-slab"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f75cba1a8cc327839f493cfc3036c9de3d077d59ab76296bc710ee5f95be5391" checksum = "fcb5821a96fa04ac14bc7b158bb3d5cd7729a053db5a74dad396cd513a5e5ccf"
[[package]]
name = "wasmtime-types"
version = "25.0.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "c6d83a7816947a4974e2380c311eacb1db009b8bad86081dc726b705603c93c7"
dependencies = [
"anyhow",
"cranelift-entity",
"serde",
"serde_derive",
"smallvec",
"wasmparser 0.217.1",
]
[[package]] [[package]]
name = "wasmtime-versioned-export-macros" name = "wasmtime-versioned-export-macros"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6879a8e168aef3fe07335343b7fbede12fa494215e83322e173d4018e124a846" checksum = "86ff86db216dc0240462de40c8290887a613dddf9685508eb39479037ba97b5b"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -15318,9 +15337,9 @@ dependencies = [
[[package]] [[package]]
name = "wasmtime-wasi" name = "wasmtime-wasi"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d042ea66b2834fb03b8a6968ef1a99a4b537211b00f7502a4d6a37f4eb2049b2" checksum = "8d1be69bfcab1bdac74daa7a1f9695ab992b9c8e21b9b061e7d66434097e0ca4"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -15335,30 +15354,30 @@ dependencies = [
"futures 0.3.31", "futures 0.3.31",
"io-extras", "io-extras",
"io-lifetimes", "io-lifetimes",
"once_cell",
"rustix", "rustix",
"system-interface", "system-interface",
"thiserror 1.0.69", "thiserror 1.0.69",
"tokio", "tokio",
"tracing", "tracing",
"trait-variant",
"url", "url",
"wasmtime", "wasmtime",
"wiggle", "wiggle",
"windows-sys 0.52.0", "windows-sys 0.59.0",
] ]
[[package]] [[package]]
name = "wasmtime-winch" name = "wasmtime-winch"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6baca2a919a288df653246069868b4de80f07e9679a8ef9b78ad79fc658ffd12" checksum = "fdbabfb8f20502d5e1d81092b9ead3682ae59988487aafcd7567387b7a43cf8f"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cranelift-codegen", "cranelift-codegen",
"gimli 0.29.0", "gimli",
"object", "object",
"target-lexicon", "target-lexicon 0.13.2",
"wasmparser 0.217.1", "wasmparser 0.221.3",
"wasmtime-cranelift", "wasmtime-cranelift",
"wasmtime-environ", "wasmtime-environ",
"winch-codegen", "winch-codegen",
@ -15366,14 +15385,14 @@ dependencies = [
[[package]] [[package]]
name = "wasmtime-wit-bindgen" name = "wasmtime-wit-bindgen"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3f571f63ac1d532e986eb3973bbef3a45e4ae83de521a8d573b0fe0594dc9608" checksum = "8358319c2dd1e4db79e3c1c5d3a5af84956615343f9f89f4e4996a36816e06e6"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"heck 0.4.1", "heck 0.5.0",
"indexmap", "indexmap",
"wit-parser 0.217.1", "wit-parser 0.221.3",
] ]
[[package]] [[package]]
@ -15601,9 +15620,9 @@ dependencies = [
[[package]] [[package]]
name = "wiggle" name = "wiggle"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4c8fdcd81702e0f46a8ab2ed28a5bf824aabf4a1af1673af496a020aacd0b6f9" checksum = "4b9af35bc9629c52c261465320a9a07959164928b4241980ba1cf923b9e6751d"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"async-trait", "async-trait",
@ -15616,12 +15635,12 @@ dependencies = [
[[package]] [[package]]
name = "wiggle-generate" name = "wiggle-generate"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "14f745361f0a9071aaabd05de1bb2b782d9f0597f30d9c0f20326224902e64d5" checksum = "2cf267dd05673912c8138f4b54acabe6bd53407d9d1536f0fadb6520dd16e101"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"heck 0.4.1", "heck 0.5.0",
"proc-macro2", "proc-macro2",
"quote", "quote",
"shellexpand 2.1.2", "shellexpand 2.1.2",
@ -15631,9 +15650,9 @@ dependencies = [
[[package]] [[package]]
name = "wiggle-macro" name = "wiggle-macro"
version = "25.0.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bfbdae3574621921ed3c13325edc910388487759d10fb330f656cfc69bee38db" checksum = "08c5c473d4198e6c2d377f3809f713ff0c110cab88a0805ae099a82119ee250c"
dependencies = [ dependencies = [
"proc-macro2", "proc-macro2",
"quote", "quote",
@ -15674,17 +15693,18 @@ checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f"
[[package]] [[package]]
name = "winch-codegen" name = "winch-codegen"
version = "0.23.3" version = "29.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "01cd1dc56c5a45d509ff06e7ca8817eaa9ec3240096f07e71915d5d528658e8a" checksum = "2f849ef2c5f46cb0a20af4b4487aaa239846e52e2c03f13fa3c784684552859c"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"cranelift-codegen", "cranelift-codegen",
"gimli 0.29.0", "gimli",
"regalloc2", "regalloc2",
"smallvec", "smallvec",
"target-lexicon", "target-lexicon 0.13.2",
"wasmparser 0.217.1", "thiserror 1.0.69",
"wasmparser 0.221.3",
"wasmtime-cranelift", "wasmtime-cranelift",
"wasmtime-environ", "wasmtime-environ",
] ]
@ -16178,9 +16198,9 @@ dependencies = [
"anyhow", "anyhow",
"heck 0.4.1", "heck 0.4.1",
"indexmap", "indexmap",
"wasm-metadata", "wasm-metadata 0.201.0",
"wit-bindgen-core", "wit-bindgen-core",
"wit-component", "wit-component 0.201.0",
] ]
[[package]] [[package]]
@ -16211,11 +16231,30 @@ dependencies = [
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"wasm-encoder 0.201.0", "wasm-encoder 0.201.0",
"wasm-metadata", "wasm-metadata 0.201.0",
"wasmparser 0.201.0", "wasmparser 0.201.0",
"wit-parser 0.201.0", "wit-parser 0.201.0",
] ]
[[package]]
name = "wit-component"
version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "66c55ca8772d2b270e28066caed50ce4e53a28c3ac10e01efbd90e5be31e448b"
dependencies = [
"anyhow",
"bitflags 2.8.0",
"indexmap",
"log",
"serde",
"serde_derive",
"serde_json",
"wasm-encoder 0.221.3",
"wasm-metadata 0.221.3",
"wasmparser 0.221.3",
"wit-parser 0.221.3",
]
[[package]] [[package]]
name = "wit-parser" name = "wit-parser"
version = "0.201.0" version = "0.201.0"
@ -16236,9 +16275,9 @@ dependencies = [
[[package]] [[package]]
name = "wit-parser" name = "wit-parser"
version = "0.217.1" version = "0.221.3"
source = "registry+https://github.com/rust-lang/crates.io-index" source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e5aaf02882453eaeec4fe30f1e4263cfd8b8ea36dd00e1fe7d902d9cb498bccd" checksum = "896112579ed56b4a538b07a3d16e562d101ff6265c46b515ce0c701eef16b2ac"
dependencies = [ dependencies = [
"anyhow", "anyhow",
"id-arena", "id-arena",
@ -16249,7 +16288,7 @@ dependencies = [
"serde_derive", "serde_derive",
"serde_json", "serde_json",
"unicode-xid", "unicode-xid",
"wasmparser 0.217.1", "wasmparser 0.221.3",
] ]
[[package]] [[package]]

View file

@ -526,7 +526,7 @@ tiny_http = "0.8"
toml = "0.8" toml = "0.8"
tokio = { version = "1" } tokio = { version = "1" }
tower-http = "0.4.4" tower-http = "0.4.4"
tree-sitter = { version = "0.24", features = ["wasm"] } tree-sitter = { version = "0.25.2", features = ["wasm"] }
tree-sitter-bash = "0.23" tree-sitter-bash = "0.23"
tree-sitter-c = "0.23" tree-sitter-c = "0.23"
tree-sitter-cpp = "0.23" tree-sitter-cpp = "0.23"
@ -539,7 +539,7 @@ tree-sitter-go-mod = { git = "https://github.com/camdencheek/tree-sitter-go-mod"
tree-sitter-gowork = { git = "https://github.com/zed-industries/tree-sitter-go-work", rev = "acb0617bf7f4fda02c6217676cc64acb89536dc7" } tree-sitter-gowork = { git = "https://github.com/zed-industries/tree-sitter-go-work", rev = "acb0617bf7f4fda02c6217676cc64acb89536dc7" }
tree-sitter-heex = { git = "https://github.com/zed-industries/tree-sitter-heex", rev = "1dd45142fbb05562e35b2040c6129c9bca346592" } tree-sitter-heex = { git = "https://github.com/zed-industries/tree-sitter-heex", rev = "1dd45142fbb05562e35b2040c6129c9bca346592" }
tree-sitter-diff = "0.1.0" tree-sitter-diff = "0.1.0"
tree-sitter-html = "0.20" tree-sitter-html = "0.23"
tree-sitter-jsdoc = "0.23" tree-sitter-jsdoc = "0.23"
tree-sitter-json = "0.24" tree-sitter-json = "0.24"
tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", rev = "9a23c1a96c0513d8fc6520972beedd419a973539" } tree-sitter-md = { git = "https://github.com/tree-sitter-grammars/tree-sitter-markdown", rev = "9a23c1a96c0513d8fc6520972beedd419a973539" }
@ -555,18 +555,18 @@ unicode-segmentation = "1.10"
unicode-script = "0.5.7" unicode-script = "0.5.7"
url = "2.2" url = "2.2"
uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] } uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] }
wasmparser = "0.217" wasmparser = "0.221"
wasm-encoder = "0.217" wasm-encoder = "0.221"
wasmtime = { version = "25", default-features = false, features = [ wasmtime = { version = "29", default-features = false, features = [
"async", "async",
"demangle", "demangle",
"runtime", "runtime",
"cranelift", "cranelift",
"component-model", "component-model",
] } ] }
wasmtime-wasi = "25" wasmtime-wasi = "29"
which = "6.0.0" which = "6.0.0"
wit-component = "0.201" wit-component = "0.221"
zed_llm_client = "0.4" zed_llm_client = "0.4"
zstd = "0.11" zstd = "0.11"
metal = "0.31" metal = "0.31"

View file

@ -6283,7 +6283,7 @@ async fn test_autoclose_with_embedded_language(cx: &mut gpui::TestAppContext) {
autoclose_before: "})]>".into(), autoclose_before: "})]>".into(),
..Default::default() ..Default::default()
}, },
Some(tree_sitter_html::language()), Some(tree_sitter_html::LANGUAGE.into()),
) )
.with_injection_query( .with_injection_query(
r#" r#"
@ -9685,7 +9685,7 @@ async fn test_toggle_block_comment(cx: &mut gpui::TestAppContext) {
block_comment: Some(("<!-- ".into(), " -->".into())), block_comment: Some(("<!-- ".into(), " -->".into())),
..Default::default() ..Default::default()
}, },
Some(tree_sitter_html::language()), Some(tree_sitter_html::LANGUAGE.into()),
) )
.with_injection_query( .with_injection_query(
r#" r#"

View file

@ -254,7 +254,7 @@ impl EditorLspTestContext {
word_characters: ['-'].into_iter().collect(), word_characters: ['-'].into_iter().collect(),
..Default::default() ..Default::default()
}, },
Some(tree_sitter_html::language()), Some(tree_sitter_html::LANGUAGE.into()),
) )
.with_queries(LanguageQueries { .with_queries(LanguageQueries {
brackets: Some(Cow::from(indoc! {r#" brackets: Some(Cow::from(indoc! {r#"

View file

@ -168,7 +168,7 @@ impl ExtensionBuilder {
let wasm_bytes = fs::read(&wasm_path) let wasm_bytes = fs::read(&wasm_path)
.with_context(|| format!("failed to read output module `{}`", wasm_path.display()))?; .with_context(|| format!("failed to read output module `{}`", wasm_path.display()))?;
let encoder = ComponentEncoder::default() let mut encoder = ComponentEncoder::default()
.module(&wasm_bytes)? .module(&wasm_bytes)?
.adapter("wasi_snapshot_preview1", &adapter_bytes) .adapter("wasi_snapshot_preview1", &adapter_bytes)
.context("failed to load adapter module")? .context("failed to load adapter module")?

View file

@ -2,7 +2,6 @@ use super::latest;
use crate::wasm_host::wit::since_v0_0_4; use crate::wasm_host::wit::since_v0_0_4;
use crate::wasm_host::WasmState; use crate::wasm_host::WasmState;
use anyhow::Result; use anyhow::Result;
use async_trait::async_trait;
use extension::{ExtensionLanguageServerProxy, WorktreeDelegate}; use extension::{ExtensionLanguageServerProxy, WorktreeDelegate};
use language::LanguageServerBinaryStatus; use language::LanguageServerBinaryStatus;
use semantic_version::SemanticVersion; use semantic_version::SemanticVersion;
@ -59,7 +58,6 @@ impl From<Command> for latest::Command {
} }
} }
#[async_trait]
impl HostWorktree for WasmState { impl HostWorktree for WasmState {
async fn read_text_file( async fn read_text_file(
&mut self, &mut self,
@ -89,7 +87,6 @@ impl HostWorktree for WasmState {
} }
} }
#[async_trait]
impl ExtensionImports for WasmState { impl ExtensionImports for WasmState {
async fn node_binary_path(&mut self) -> wasmtime::Result<Result<String, String>> { async fn node_binary_path(&mut self) -> wasmtime::Result<Result<String, String>> {
latest::nodejs::Host::node_binary_path(self).await latest::nodejs::Host::node_binary_path(self).await

View file

@ -1,7 +1,6 @@
use super::latest; use super::latest;
use crate::wasm_host::WasmState; use crate::wasm_host::WasmState;
use anyhow::Result; use anyhow::Result;
use async_trait::async_trait;
use extension::WorktreeDelegate; use extension::WorktreeDelegate;
use semantic_version::SemanticVersion; use semantic_version::SemanticVersion;
use std::sync::{Arc, OnceLock}; use std::sync::{Arc, OnceLock};
@ -67,7 +66,6 @@ impl From<Command> for latest::Command {
} }
} }
#[async_trait]
impl HostWorktree for WasmState { impl HostWorktree for WasmState {
async fn read_text_file( async fn read_text_file(
&mut self, &mut self,
@ -98,7 +96,6 @@ impl HostWorktree for WasmState {
} }
} }
#[async_trait]
impl ExtensionImports for WasmState { impl ExtensionImports for WasmState {
async fn node_binary_path(&mut self) -> wasmtime::Result<Result<String, String>> { async fn node_binary_path(&mut self) -> wasmtime::Result<Result<String, String>> {
latest::nodejs::Host::node_binary_path(self).await latest::nodejs::Host::node_binary_path(self).await

View file

@ -1,7 +1,6 @@
use super::{latest, since_v0_1_0}; use super::{latest, since_v0_1_0};
use crate::wasm_host::WasmState; use crate::wasm_host::WasmState;
use anyhow::Result; use anyhow::Result;
use async_trait::async_trait;
use extension::WorktreeDelegate; use extension::WorktreeDelegate;
use semantic_version::SemanticVersion; use semantic_version::SemanticVersion;
use std::sync::{Arc, OnceLock}; use std::sync::{Arc, OnceLock};
@ -111,7 +110,6 @@ impl From<CodeLabel> for latest::CodeLabel {
} }
} }
#[async_trait]
impl HostWorktree for WasmState { impl HostWorktree for WasmState {
async fn id(&mut self, delegate: Resource<Arc<dyn WorktreeDelegate>>) -> wasmtime::Result<u64> { async fn id(&mut self, delegate: Resource<Arc<dyn WorktreeDelegate>>) -> wasmtime::Result<u64> {
latest::HostWorktree::id(self, delegate).await latest::HostWorktree::id(self, delegate).await
@ -153,7 +151,6 @@ impl HostWorktree for WasmState {
} }
} }
#[async_trait]
impl ExtensionImports for WasmState { impl ExtensionImports for WasmState {
async fn get_settings( async fn get_settings(
&mut self, &mut self,

View file

@ -4,7 +4,6 @@ use ::settings::{Settings, WorktreeId};
use anyhow::{anyhow, bail, Context, Result}; use anyhow::{anyhow, bail, Context, Result};
use async_compression::futures::bufread::GzipDecoder; use async_compression::futures::bufread::GzipDecoder;
use async_tar::Archive; use async_tar::Archive;
use async_trait::async_trait;
use extension::{ExtensionLanguageServerProxy, KeyValueStoreDelegate, WorktreeDelegate}; use extension::{ExtensionLanguageServerProxy, KeyValueStoreDelegate, WorktreeDelegate};
use futures::{io::BufReader, FutureExt as _}; use futures::{io::BufReader, FutureExt as _};
use futures::{lock::Mutex, AsyncReadExt}; use futures::{lock::Mutex, AsyncReadExt};
@ -228,7 +227,6 @@ impl From<latest::lsp::SymbolKind> for lsp::SymbolKind {
} }
} }
#[async_trait]
impl HostKeyValueStore for WasmState { impl HostKeyValueStore for WasmState {
async fn insert( async fn insert(
&mut self, &mut self,
@ -246,7 +244,6 @@ impl HostKeyValueStore for WasmState {
} }
} }
#[async_trait]
impl HostWorktree for WasmState { impl HostWorktree for WasmState {
async fn id(&mut self, delegate: Resource<Arc<dyn WorktreeDelegate>>) -> wasmtime::Result<u64> { async fn id(&mut self, delegate: Resource<Arc<dyn WorktreeDelegate>>) -> wasmtime::Result<u64> {
latest::HostWorktree::id(self, delegate).await latest::HostWorktree::id(self, delegate).await
@ -288,10 +285,8 @@ impl HostWorktree for WasmState {
} }
} }
#[async_trait]
impl common::Host for WasmState {} impl common::Host for WasmState {}
#[async_trait]
impl http_client::Host for WasmState { impl http_client::Host for WasmState {
async fn fetch( async fn fetch(
&mut self, &mut self,
@ -328,7 +323,6 @@ impl http_client::Host for WasmState {
} }
} }
#[async_trait]
impl http_client::HostHttpResponseStream for WasmState { impl http_client::HostHttpResponseStream for WasmState {
async fn next_chunk( async fn next_chunk(
&mut self, &mut self,
@ -415,10 +409,8 @@ async fn convert_response(
Ok(extension_response) Ok(extension_response)
} }
#[async_trait]
impl lsp::Host for WasmState {} impl lsp::Host for WasmState {}
#[async_trait]
impl ExtensionImports for WasmState { impl ExtensionImports for WasmState {
async fn get_settings( async fn get_settings(
&mut self, &mut self,

View file

@ -247,7 +247,6 @@ impl From<SlashCommandArgumentCompletion> for extension::SlashCommandArgumentCom
} }
} }
#[async_trait]
impl HostKeyValueStore for WasmState { impl HostKeyValueStore for WasmState {
async fn insert( async fn insert(
&mut self, &mut self,
@ -265,7 +264,6 @@ impl HostKeyValueStore for WasmState {
} }
} }
#[async_trait]
impl HostProject for WasmState { impl HostProject for WasmState {
async fn worktree_ids( async fn worktree_ids(
&mut self, &mut self,
@ -281,7 +279,6 @@ impl HostProject for WasmState {
} }
} }
#[async_trait]
impl HostWorktree for WasmState { impl HostWorktree for WasmState {
async fn id(&mut self, delegate: Resource<Arc<dyn WorktreeDelegate>>) -> wasmtime::Result<u64> { async fn id(&mut self, delegate: Resource<Arc<dyn WorktreeDelegate>>) -> wasmtime::Result<u64> {
let delegate = self.table.get(&delegate)?; let delegate = self.table.get(&delegate)?;
@ -331,10 +328,8 @@ impl HostWorktree for WasmState {
} }
} }
#[async_trait]
impl common::Host for WasmState {} impl common::Host for WasmState {}
#[async_trait]
impl http_client::Host for WasmState { impl http_client::Host for WasmState {
async fn fetch( async fn fetch(
&mut self, &mut self,
@ -371,7 +366,6 @@ impl http_client::Host for WasmState {
} }
} }
#[async_trait]
impl http_client::HostHttpResponseStream for WasmState { impl http_client::HostHttpResponseStream for WasmState {
async fn next_chunk( async fn next_chunk(
&mut self, &mut self,
@ -458,7 +452,6 @@ async fn convert_response(
Ok(extension_response) Ok(extension_response)
} }
#[async_trait]
impl nodejs::Host for WasmState { impl nodejs::Host for WasmState {
async fn node_binary_path(&mut self) -> wasmtime::Result<Result<String, String>> { async fn node_binary_path(&mut self) -> wasmtime::Result<Result<String, String>> {
self.host self.host
@ -525,7 +518,6 @@ impl From<::http_client::github::GithubReleaseAsset> for github::GithubReleaseAs
} }
} }
#[async_trait]
impl github::Host for WasmState { impl github::Host for WasmState {
async fn latest_github_release( async fn latest_github_release(
&mut self, &mut self,
@ -565,7 +557,6 @@ impl github::Host for WasmState {
} }
} }
#[async_trait]
impl platform::Host for WasmState { impl platform::Host for WasmState {
async fn current_platform(&mut self) -> Result<(platform::Os, platform::Architecture)> { async fn current_platform(&mut self) -> Result<(platform::Os, platform::Architecture)> {
Ok(( Ok((
@ -588,7 +579,6 @@ impl platform::Host for WasmState {
#[async_trait] #[async_trait]
impl slash_command::Host for WasmState {} impl slash_command::Host for WasmState {}
#[async_trait]
impl ExtensionImports for WasmState { impl ExtensionImports for WasmState {
async fn get_settings( async fn get_settings(
&mut self, &mut self,

View file

@ -2915,7 +2915,7 @@ impl BufferSnapshot {
let mut error_ranges = Vec::<Range<Point>>::new(); let mut error_ranges = Vec::<Range<Point>>::new();
let mut matches = self.syntax.matches(range.clone(), &self.text, |grammar| { let mut matches = self.syntax.matches(range.clone(), &self.text, |grammar| {
Some(&grammar.error_query) grammar.error_query.as_ref()
}); });
while let Some(mat) = matches.peek() { while let Some(mat) = matches.peek() {
let node = mat.captures[0].node; let node = mat.captures[0].node;

View file

@ -3149,7 +3149,7 @@ fn html_lang() -> Language {
block_comment: Some(("<!--".into(), "-->".into())), block_comment: Some(("<!--".into(), "-->".into())),
..Default::default() ..Default::default()
}, },
Some(tree_sitter_html::language()), Some(tree_sitter_html::LANGUAGE.into()),
) )
.with_indents_query( .with_indents_query(
" "

View file

@ -915,7 +915,7 @@ impl GrammarId {
pub struct Grammar { pub struct Grammar {
id: GrammarId, id: GrammarId,
pub ts_language: tree_sitter::Language, pub ts_language: tree_sitter::Language,
pub(crate) error_query: Query, pub(crate) error_query: Option<Query>,
pub(crate) highlights_query: Option<Query>, pub(crate) highlights_query: Option<Query>,
pub(crate) brackets_config: Option<BracketConfig>, pub(crate) brackets_config: Option<BracketConfig>,
pub(crate) redactions_config: Option<RedactionConfig>, pub(crate) redactions_config: Option<RedactionConfig>,
@ -1070,7 +1070,7 @@ impl Language {
override_config: None, override_config: None,
redactions_config: None, redactions_config: None,
runnable_config: None, runnable_config: None,
error_query: Query::new(&ts_language, "(ERROR) @error").unwrap(), error_query: Query::new(&ts_language, "(ERROR) @error").ok(),
ts_language, ts_language,
highlight_map: Default::default(), highlight_map: Default::default(),
}) })
@ -1723,12 +1723,13 @@ impl Grammar {
.expect("incompatible grammar"); .expect("incompatible grammar");
let mut chunks = text.chunks_in_range(0..text.len()); let mut chunks = text.chunks_in_range(0..text.len());
parser parser
.parse_with( .parse_with_options(
&mut move |offset, _| { &mut move |offset, _| {
chunks.seek(offset); chunks.seek(offset);
chunks.next().unwrap_or("").as_bytes() chunks.next().unwrap_or("").as_bytes()
}, },
old_tree.as_ref(), old_tree.as_ref(),
None,
) )
.unwrap() .unwrap()
}) })

View file

@ -1238,12 +1238,13 @@ fn parse_text(
parser.set_included_ranges(&ranges)?; parser.set_included_ranges(&ranges)?;
parser.set_language(&grammar.ts_language)?; parser.set_language(&grammar.ts_language)?;
parser parser
.parse_with( .parse_with_options(
&mut move |offset, _| { &mut move |offset, _| {
chunks.seek(start_byte + offset); chunks.seek(start_byte + offset);
chunks.next().unwrap_or("").as_bytes() chunks.next().unwrap_or("").as_bytes()
}, },
old_tree.as_ref(), old_tree.as_ref(),
None,
) )
.ok_or_else(|| anyhow::anyhow!("failed to parse")) .ok_or_else(|| anyhow::anyhow!("failed to parse"))
}) })

View file

@ -1134,7 +1134,7 @@ fn html_lang() -> Language {
}, },
..Default::default() ..Default::default()
}, },
Some(tree_sitter_html::language()), Some(tree_sitter_html::LANGUAGE.into()),
) )
.with_highlights_query( .with_highlights_query(
r#" r#"