diff --git a/Cargo.lock b/Cargo.lock index c620cb2b88..e6dbada745 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -130,7 +130,7 @@ source = "git+https://github.com/zed-industries/alacritty?rev=33306142195b354ef3 dependencies = [ "log", "serde", - "toml 0.7.6", + "toml 0.7.8", ] [[package]] @@ -140,7 +140,7 @@ source = "git+https://github.com/zed-industries/alacritty?rev=33306142195b354ef3 dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -159,14 +159,14 @@ dependencies = [ "mio-anonymous-pipes", "mio-extras", "miow 0.3.7", - "nix 0.26.2", + "nix 0.26.4", "parking_lot 0.12.1", "regex-automata 0.1.10", "serde", "serde_yaml", "signal-hook", "signal-hook-mio", - "toml 0.7.6", + "toml 0.7.8", "unicode-width", "vte", "windows-sys", @@ -229,24 +229,23 @@ dependencies = [ [[package]] name = "anstream" -version = "0.3.2" +version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0ca84f3628370c59db74ee214b3263d58f9aadd9b4fe7e711fd87dc452b7f163" +checksum = "b1f58811cfac344940f1a400b6e6231ce35171f614f26439e80f8c1465c5cc0c" dependencies = [ "anstyle", "anstyle-parse", "anstyle-query", "anstyle-wincon", "colorchoice", - "is-terminal 0.4.9", "utf8parse", ] [[package]] name = "anstyle" -version = "1.0.2" +version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "15c4c2c83f81532e5845a733998b6971faca23490340a418e9b72a3ec9de12ea" +checksum = "b84bf0a05bbb2a83e5eb6fa36bb6e87baa08193c35ff52bbf6b38d8af2890e46" [[package]] name = "anstyle-parse" @@ -268,9 +267,9 @@ dependencies = [ [[package]] name = "anstyle-wincon" -version = "1.0.2" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c677ab05e09154296dd37acecd46420c17b9713e8366facafa8fc0885167cf4c" +checksum = "58f54d10c6dfa51283a066ceab3ec1ab78d13fae00aa49243a45e4571fb79dfd" dependencies = [ "anstyle", "windows-sys", @@ -337,7 +336,7 @@ dependencies = [ "futures-core", "futures-io", "once_cell", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", ] @@ -351,7 +350,7 @@ dependencies = [ "futures-core", "futures-io", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", ] [[package]] @@ -476,13 +475,13 @@ dependencies = [ [[package]] name = "async-recursion" -version = "1.0.4" +version = "1.0.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0e97ce7de6cf12de5d7226c73f5ba9811622f4db3a5b91b55c53e987e5f91cba" +checksum = "5fd55a5ba1179988837d24ab4c7cc8ed6efdeff578ede0416b4225a5fca35bd0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -505,7 +504,7 @@ dependencies = [ "log", "memchr", "once_cell", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "pin-utils", "slab", "wasm-bindgen-futures", @@ -519,7 +518,7 @@ checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" dependencies = [ "async-stream-impl", "futures-core", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", ] [[package]] @@ -530,7 +529,7 @@ checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -573,7 +572,7 @@ checksum = "bc00ceb34980c03614e35a3a4e218276a0a824e911d07651cd0d858a51e8c0f0" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -586,7 +585,7 @@ dependencies = [ "futures-io", "futures-util", "log", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tungstenite 0.16.0", ] @@ -675,7 +674,7 @@ dependencies = [ "axum-core", "base64 0.13.1", "bitflags 1.3.2", - "bytes 1.4.0", + "bytes 1.5.0", "futures-util", "headers", "http", @@ -686,7 +685,7 @@ dependencies = [ "memchr", "mime", "percent-encoding", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "serde", "serde_json", "serde_urlencoded", @@ -707,7 +706,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37e5939e02c56fecd5c017c37df4238c0a839fa76b7f97acdd7efb804fd181cc" dependencies = [ "async-trait", - "bytes 1.4.0", + "bytes 1.5.0", "futures-util", "http", "http-body", @@ -723,11 +722,11 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69034b3b0fd97923eee2ce8a47540edb21e07f48f87f67d44bb4271cec622bdb" dependencies = [ "axum", - "bytes 1.4.0", + "bytes 1.5.0", "futures-util", "http", "mime", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "serde", "serde_json", "tokio", @@ -748,7 +747,7 @@ dependencies = [ "cfg-if 1.0.0", "libc", "miniz_oxide 0.7.1", - "object 0.32.0", + "object 0.32.1", "rustc-demangle", ] @@ -773,9 +772,9 @@ checksum = "9e1b586273c5702936fe7b7d6896644d8be71e6314cfe09d3167c95f712589e8" [[package]] name = "base64" -version = "0.21.2" +version = "0.21.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "604178f6c5c21f02dc555784810edfb88d34ac2c73b2eae109655649ee73ce3d" +checksum = "9ba43ea6f343b788c8764558649e08df62f86c6ef251fdaeb1ffd010a9ae50a2" [[package]] name = "base64ct" @@ -831,7 +830,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.29", + "syn 2.0.37", "which", ] @@ -968,7 +967,7 @@ dependencies = [ "collections", "editor", "gpui", - "itertools", + "itertools 0.10.5", "language", "outline", "project", @@ -991,20 +990,20 @@ dependencies = [ [[package]] name = "bstr" -version = "1.6.0" +version = "1.6.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6798148dccfbff0fae41c7574d2fa8f1ef3492fba0face179de5d8d447d67b05" +checksum = "4c2f7349907b712260e64b0afe2f84692af14a454be26187d9df565c7f69266a" dependencies = [ "memchr", - "regex-automata 0.3.6", + "regex-automata 0.3.8", "serde", ] [[package]] name = "bumpalo" -version = "3.13.0" +version = "3.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a3e2c3daef883ecc1b5d58c15adae93470a91d425f3532ba1695849656af3fc1" +checksum = "7f30e7476521f6f8af1a1c4c0b8cc94f0bee37d91763d0ca2665f299b6cd8aec" [[package]] name = "bytecheck" @@ -1030,9 +1029,9 @@ dependencies = [ [[package]] name = "bytemuck" -version = "1.13.1" +version = "1.14.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "17febce684fd15d89027105661fec94afb475cb995fbc59d2865198446ba2eea" +checksum = "374d28ec25809ee0e23827c2ab573d729e293f281dfe393500e7ad618baa61c6" [[package]] name = "byteorder" @@ -1052,9 +1051,9 @@ dependencies = [ [[package]] name = "bytes" -version = "1.4.0" +version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89b2fd2a0dcf38d7971e2194b6b6eebab45ae01067456a7fd93d5547a61b70be" +checksum = "a2bd12c1caf447e69cd4528f47f94d203fd2582878ecb9e9465484c4148a8223" [[package]] name = "call" @@ -1220,7 +1219,7 @@ dependencies = [ "tempfile", "text", "thiserror", - "time 0.3.27", + "time", "tiny_http", "url", "util", @@ -1229,18 +1228,17 @@ dependencies = [ [[package]] name = "chrono" -version = "0.4.26" +version = "0.4.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec837a71355b28f6556dbd569b37b3f363091c0bd4b2e735674521b4c5fd9bc5" +checksum = "7f2c685bad3eb3d45a01354cedb7d5faa66194d1d58ba6e267a8de788f79db38" dependencies = [ "android-tzdata", "iana-time-zone", "js-sys", "num-traits", "serde", - "time 0.1.45", "wasm-bindgen", - "winapi 0.3.9", + "windows-targets 0.48.5", ] [[package]] @@ -1288,24 +1286,23 @@ dependencies = [ [[package]] name = "clap" -version = "4.3.24" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fb690e81c7840c0d7aade59f242ea3b41b9bc27bcd5997890e7702ae4b32e487" +checksum = "b1d7b8d5ec32af0fadc644bf1fd509a688c2103b185644bb1e29d164e0703136" dependencies = [ "clap_builder", - "clap_derive 4.3.12", - "once_cell", + "clap_derive 4.4.2", ] [[package]] name = "clap_builder" -version = "4.3.24" +version = "4.4.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5ed2e96bc16d8d740f6f48d663eddf4b8a0983e79210fd55479b7bcd0a69860e" +checksum = "5179bb514e4d7c2051749d8fcefa2ed6d06a9f4e6d69faf3805f5d80b8cf8d56" dependencies = [ "anstream", "anstyle", - "clap_lex 0.5.0", + "clap_lex 0.5.1", "strsim", ] @@ -1324,14 +1321,14 @@ dependencies = [ [[package]] name = "clap_derive" -version = "4.3.12" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "54a9bb5758fc5dfe728d1019941681eccaf0cf8a4189b692a0ee2f2ecf90a050" +checksum = "0862016ff20d69b84ef8247369fabf5c008a7417002411897d40ee1f4532b873" dependencies = [ "heck 0.4.1", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -1345,9 +1342,9 @@ dependencies = [ [[package]] name = "clap_lex" -version = "0.5.0" +version = "0.5.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2da6da31387c7e4ef160ffab6d5e7f00c42626fe39aea70a7b0f1773f7dd6c1b" +checksum = "cd7cc57abe963c6d3b9d8be5b06ba7c8957a930305ca90304f24ef040aa6f961" [[package]] name = "cli" @@ -1393,7 +1390,7 @@ dependencies = [ "tempfile", "text", "thiserror", - "time 0.3.27", + "time", "tiny_http", "url", "util", @@ -1501,7 +1498,7 @@ dependencies = [ "sqlx", "text", "theme", - "time 0.3.27", + "time", "tokio", "tokio-tungstenite", "toml 0.5.11", @@ -1547,7 +1544,7 @@ dependencies = [ "settings", "theme", "theme_selector", - "time 0.3.27", + "time", "util", "vcs_menu", "workspace", @@ -1579,7 +1576,7 @@ version = "4.6.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35ed6e9d84f0b51a7f52daf1c7d71dd136fd7a3f41a8462b8cdb8c78d920fad4" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "memchr", ] @@ -1748,9 +1745,9 @@ dependencies = [ [[package]] name = "core-services" -version = "0.2.0" +version = "0.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "51b344b958cae90858bf6086f49599ecc5ec8698eacad0ea155509ba11fab347" +checksum = "92567e81db522550ebaf742c5d875624ec7820c2c7ee5f8c60e4ce7c2ae3c0fd" dependencies = [ "core-foundation", ] @@ -1919,7 +1916,7 @@ dependencies = [ "cranelift-codegen", "cranelift-entity", "cranelift-frontend", - "itertools", + "itertools 0.10.5", "log", "smallvec", "wasmparser", @@ -2050,9 +2047,9 @@ dependencies = [ [[package]] name = "curl-sys" -version = "0.4.65+curl-8.2.1" +version = "0.4.66+curl-8.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "961ba061c9ef2fe34bbd12b807152d96f0badd2bebe7b90ce6c8c8b7572a0986" +checksum = "70c44a72e830f0e40ad90dda8a6ab6ed6314d39776599a58a2e5e37fbc6db5b9" dependencies = [ "cc", "libc", @@ -2060,14 +2057,14 @@ dependencies = [ "openssl-sys", "pkg-config", "vcpkg", - "winapi 0.3.9", + "windows-sys", ] [[package]] name = "dashmap" -version = "5.5.1" +version = "5.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "edd72493923899c6f10c641bdbdeddc7183d6396641d99c1a0d1597f37f92e28" +checksum = "978747c1d849a7d2ee5e8adc0159961c48fb7e5db2f06af6723b80123bb53856" dependencies = [ "cfg-if 1.0.0", "hashbrown 0.14.0", @@ -2315,9 +2312,9 @@ dependencies = [ [[package]] name = "dyn-clone" -version = "1.0.13" +version = "1.0.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bbfc4744c1b8f2a09adc0e55242f60b1af195d88596bd8700be74418c056c555" +checksum = "23d2f3407d9a573d666de4b5bdf10569d73ca9478087346697dcbae6244bfbcd" [[package]] name = "editor" @@ -2340,7 +2337,7 @@ dependencies = [ "git", "gpui", "indoc", - "itertools", + "itertools 0.10.5", "language", "lazy_static", "log", @@ -2430,9 +2427,9 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" [[package]] name = "erased-serde" -version = "0.3.29" +version = "0.3.31" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fc978899517288e3ebbd1a3bfc1d9537dbb87eeab149e53ea490e63bcdff561a" +checksum = "6c138974f9d5e7fe373eb04df7cae98833802ae4b11c24ac7039a21d5af4b26c" dependencies = [ "serde", ] @@ -2450,9 +2447,9 @@ dependencies = [ [[package]] name = "errno" -version = "0.3.2" +version = "0.3.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6b30f669a7961ef1631673d2766cc92f52d64f7ef354d4fe0ddfd30ed52f0f4f" +checksum = "136526188508e25c6fef639d7927dfb3e0e3084488bf202267829cf7fc23dbdd" dependencies = [ "errno-dragonfly", "libc", @@ -2613,6 +2610,12 @@ dependencies = [ "windows-sys", ] +[[package]] +name = "finl_unicode" +version = "1.2.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "8fcfdc7a0362c9f4444381a9e697c79d435fe65b52a37466fc2c1184cee9edc6" + [[package]] name = "fixedbitset" version = "0.4.2" @@ -2765,7 +2768,7 @@ dependencies = [ "sum_tree", "tempfile", "text", - "time 0.3.27", + "time", "util", ] @@ -2903,7 +2906,7 @@ dependencies = [ "futures-io", "memchr", "parking", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "waker-fn", ] @@ -2915,7 +2918,7 @@ checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -2944,7 +2947,7 @@ dependencies = [ "futures-sink", "futures-task", "memchr", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "pin-utils", "slab", "tokio-io", @@ -3130,7 +3133,7 @@ dependencies = [ "futures 0.3.28", "gpui_macros", "image", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "media", @@ -3159,7 +3162,7 @@ dependencies = [ "sum_tree", "taffy", "thiserror", - "time 0.3.27", + "time", "tiny-skia", "usvg", "util", @@ -3219,7 +3222,7 @@ version = "0.3.21" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "91fc23aa11be92976ef4729127f1a74adf36d8436f7816b185d18df956790833" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "fnv", "futures-core", "futures-sink", @@ -3280,22 +3283,21 @@ dependencies = [ [[package]] name = "hashlink" -version = "0.8.3" +version = "0.8.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "312f66718a2d7789ffef4f4b7b213138ed9f1eb3aa1d0d82fc99f88fb3ffd26f" +checksum = "e8094feaf31ff591f651a2664fb9cfd92bba7a60ce3197265e9482ebe753c8f7" dependencies = [ "hashbrown 0.14.0", ] [[package]] name = "headers" -version = "0.3.8" +version = "0.3.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f3e372db8e5c0d213e0cd0b9be18be2aca3d44cf2fe30a9d46a65581cd454584" +checksum = "06683b93020a07e3dbcf5f8c0f6d40080d725bea7936fc01ad345c01b97dc270" dependencies = [ - "base64 0.13.1", - "bitflags 1.3.2", - "bytes 1.4.0", + "base64 0.21.4", + "bytes 1.5.0", "headers-core", "http", "httpdate", @@ -3409,7 +3411,7 @@ version = "0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bd6effc99afb63425aff9b05836f029929e345a6148a14b7ecd5ab67af944482" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "fnv", "itoa", ] @@ -3420,9 +3422,9 @@ version = "0.4.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d5f38f16d184e36f2408a55281cd658ecbd3ca05cce6d6510a176eca393e26d1" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "http", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", ] [[package]] @@ -3445,9 +3447,9 @@ checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" [[package]] name = "human_bytes" -version = "0.4.2" +version = "0.4.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "27e2b089f28ad15597b48d8c0a8fe94eeb1c1cb26ca99b6f66ac9582ae10c5e6" +checksum = "91f255a4535024abf7640cb288260811fc14794f62b063652ed349f9a6c2348e" [[package]] name = "humantime" @@ -3461,7 +3463,7 @@ version = "0.14.27" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ffb1cfd654a8219eaef89881fdb3bb3b1cdc5fa75ded05d6933b2b382e395468" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-channel", "futures-core", "futures-util", @@ -3471,7 +3473,7 @@ dependencies = [ "httparse", "httpdate", "itoa", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "socket2 0.4.9", "tokio", "tower-service", @@ -3486,7 +3488,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bbb958482e8c7be4bc3cf272a766a2b0bf1a6755e7a6ae777f017a31d11b13b1" dependencies = [ "hyper", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", "tokio-io-timeout", ] @@ -3497,7 +3499,7 @@ version = "0.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "d6183ddfa99b85da61a140bea0efc93fdf56ceaa041b37d553518030827f9905" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "hyper", "native-tls", "tokio", @@ -3704,7 +3706,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cb0889898416213fab133e1d33a0e5858a48177452750691bde3666d0fdbaf8b" dependencies = [ "hermit-abi 0.3.2", - "rustix 0.38.8", + "rustix 0.38.13", "windows-sys", ] @@ -3744,6 +3746,15 @@ dependencies = [ "either", ] +[[package]] +name = "itertools" +version = "0.11.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" +dependencies = [ + "either", +] + [[package]] name = "itoa" version = "1.0.9" @@ -3998,9 +4009,9 @@ checksum = "884e2677b40cc8c339eaefcb701c32ef1fd2493d71118dc0ca4b6a736c93bd67" [[package]] name = "libc" -version = "0.2.147" +version = "0.2.148" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b4668fb0ea861c1df094127ac5f1da3409a82116a4ba74fca2e58ef927159bb3" +checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b" [[package]] name = "libgit2-sys" @@ -4092,9 +4103,9 @@ checksum = "ef53942eb7bf7ff43a617b3e2c1c4a5ecf5944a7c1bc12d7ee39bbb15e5c1519" [[package]] name = "linux-raw-sys" -version = "0.4.5" +version = "0.4.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "57bcfdad1b858c2db7c38303a6d2ad4dfaf5eb53dfeb0910128b2c26d6158503" +checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128" [[package]] name = "lipsum" @@ -4115,7 +4126,7 @@ dependencies = [ "async-trait", "block", "byteorder", - "bytes 1.4.0", + "bytes 1.5.0", "cocoa", "collections", "core-foundation", @@ -4293,7 +4304,7 @@ dependencies = [ "anyhow", "bindgen 0.65.1", "block", - "bytes 1.4.0", + "bytes 1.5.0", "core-foundation", "foreign-types", "metal", @@ -4302,9 +4313,9 @@ dependencies = [ [[package]] name = "memchr" -version = "2.6.0" +version = "2.6.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76fc44e2588d5b436dbc3c6cf62aef290f90dab6235744a93dfe1cc18f451e2c" +checksum = "8f232d6ef707e1956a43342693d2a31e72989554d58299d7a88738cc95b0d35c" [[package]] name = "memfd" @@ -4592,14 +4603,13 @@ dependencies = [ [[package]] name = "nix" -version = "0.26.2" +version = "0.26.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bfdda3d196821d6af13126e40375cdf7da646a96114af134d5f417a9a1dc8e1a" +checksum = "598beaf3cc6fdd9a5dfb1630c2800c7acd31df7aaf0f565796fba2b53ca1af1b" dependencies = [ "bitflags 1.3.2", "cfg-if 1.0.0", "libc", - "static_assertions", ] [[package]] @@ -4820,8 +4830,8 @@ dependencies = [ [[package]] name = "nvim-rs" -version = "0.5.0" -source = "git+https://github.com/KillTheMule/nvim-rs?branch=master#d701c2790dcb2579f8f4d7003ba30e2100a7d25b" +version = "0.6.0-pre" +source = "git+https://github.com/KillTheMule/nvim-rs?branch=master#0d2b1c884f3c39a76b5b7aac0b429f4624843954" dependencies = [ "async-trait", "futures 0.3.28", @@ -4866,9 +4876,9 @@ dependencies = [ [[package]] name = "object" -version = "0.32.0" +version = "0.32.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ac5bbd07aea88c60a577a1ce218075ffd59208b2d7ca97adf9bfc5aeb21ebe" +checksum = "9cf5f9dd3933bd50a9e1f149ec995f39ae2c496d31fd772c1fd45ebc27e902b0" dependencies = [ "memchr", ] @@ -4910,11 +4920,11 @@ checksum = "624a8340c38c1b80fd549087862da4ba43e08858af025b236e509b6649fc13d5" [[package]] name = "openssl" -version = "0.10.56" +version = "0.10.57" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "729b745ad4a5575dd06a3e1af1414bd330ee561c01b3899eb584baeaa8def17e" +checksum = "bac25ee399abb46215765b1cb35bc0212377e58a061560d8b29b024fd0430e7c" dependencies = [ - "bitflags 1.3.2", + "bitflags 2.4.0", "cfg-if 1.0.0", "foreign-types", "libc", @@ -4931,7 +4941,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -4942,9 +4952,9 @@ checksum = "ff011a302c396a5197692431fc1948019154afc178baf7d8e37367442a4601cf" [[package]] name = "openssl-sys" -version = "0.9.91" +version = "0.9.93" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "866b5f16f90776b9bb8dc1e1802ac6f0513de3a7a7465867bfbc563dc737faac" +checksum = "db4d56a4c0478783083cfafcc42493dd4a981d41669da64b4572a2a089b51b1d" dependencies = [ "cc", "libc", @@ -5172,10 +5182,11 @@ checksum = "9b2a4787296e9989611394c33f193f676704af1686e70b8f8033ab5ba9a35a94" [[package]] name = "pest" -version = "2.7.2" +version = "2.7.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1acb4a4365a13f749a93f1a094a7805e5cfa0955373a9de860d962eaa3a5fe5a" +checksum = "d7a4d085fd991ac8d5b05a147b437791b4260b76326baf0fc60cf7c9c27ecd33" dependencies = [ + "memchr", "thiserror", "ucd-trie", ] @@ -5230,7 +5241,7 @@ checksum = "4359fd9c9171ec6e8c62926d6faaf553a8dc3f64e1507e76da7911b4f6a04405" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -5241,9 +5252,9 @@ checksum = "257b64915a082f7811703966789728173279bdebb956b143dbcd23f6f970a777" [[package]] name = "pin-project-lite" -version = "0.2.12" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "12cc1b0bf1727a77a54b6654e7b5f1af8604923edc8b81885f8ec92f9e3f0a05" +checksum = "8afb450f006bf6385ca15ef45d71d2288452bc3683ce2e2cacc0d18e4be60b58" [[package]] name = "pin-utils" @@ -5263,12 +5274,12 @@ version = "1.5.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "bdc0001cfea3db57a2e24bc0d818e9e20e554b5f97fabb9bc231dc240269ae06" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", "indexmap 1.9.3", "line-wrap", "quick-xml", "serde", - "time 0.3.27", + "time", ] [[package]] @@ -5333,7 +5344,7 @@ dependencies = [ "concurrent-queue", "libc", "log", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "windows-sys", ] @@ -5378,12 +5389,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.12" +version = "0.2.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c64d9ba0963cdcea2e1b2230fbae2bab30eb25a174be395c41e764bfb65dd62" +checksum = "ae005bd773ab59b4725093fd7df83fd7892f7d8eafb48dbd7de6e024e4215f9d" dependencies = [ "proc-macro2", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -5431,9 +5442,9 @@ dependencies = [ [[package]] name = "proc-macro2" -version = "1.0.66" +version = "1.0.67" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "18fb31db3f9bddb2ea821cde30a9f70117e3f119938b5ee630b7403aa6e2ead9" +checksum = "3d433d9f1a3e8c1263d9456598b16fec66f4acc9a74dacffd35c7bb09b3a1328" dependencies = [ "unicode-ident", ] @@ -5473,7 +5484,7 @@ dependencies = [ "globset", "gpui", "ignore", - "itertools", + "itertools 0.10.5", "language", "lazy_static", "log", @@ -5575,7 +5586,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "de5e2533f59d08fcf364fd374ebda0692a70bd6d7e66ef97f306f45c6c5d8020" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "prost-derive 0.8.0", ] @@ -5585,7 +5596,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "444879275cb4fd84958b1a1d5420d15e6fcf7c235fe47f053c9c2a80aceb6001" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "prost-derive 0.9.0", ] @@ -5595,9 +5606,9 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "heck 0.3.3", - "itertools", + "itertools 0.10.5", "lazy_static", "log", "multimap", @@ -5616,7 +5627,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "600d2f334aa05acb02a755e217ef1ab6dea4d51b58b7846588b747edec04efba" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -5629,7 +5640,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f9cc1a3263e07e0bf68e96268f37665207b49560d98739662cdfaae215c720fe" dependencies = [ "anyhow", - "itertools", + "itertools 0.10.5", "proc-macro2", "quote", "syn 1.0.109", @@ -5641,7 +5652,7 @@ version = "0.8.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "603bbd6394701d13f3f25aada59c7de9d35a6a5887cfc156181234a44002771b" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "prost 0.8.0", ] @@ -5651,7 +5662,7 @@ version = "0.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "534b7a0e836e3c482d2693070f982e39e7611da9695d4d1f5a4b186b51faef0a" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "prost 0.9.0", ] @@ -5959,14 +5970,14 @@ dependencies = [ [[package]] name = "regex" -version = "1.9.3" +version = "1.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "81bc1d4caf89fac26a70747fe603c130093b53c773888797a6329091246d651a" +checksum = "697061221ea1b4a94a624f67d0ae2bfe4e22b8a17b6a192afb11046542cc8c47" dependencies = [ "aho-corasick", "memchr", - "regex-automata 0.3.6", - "regex-syntax 0.7.4", + "regex-automata 0.3.8", + "regex-syntax 0.7.5", ] [[package]] @@ -5980,13 +5991,13 @@ dependencies = [ [[package]] name = "regex-automata" -version = "0.3.6" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fed1ceff11a1dddaee50c9dc8e4938bd106e9d89ae372f192311e7da498e3b69" +checksum = "c2f401f4955220693b56f8ec66ee9c78abffd8d1c4f23dc41a23839eb88f0795" dependencies = [ "aho-corasick", "memchr", - "regex-syntax 0.7.4", + "regex-syntax 0.7.5", ] [[package]] @@ -5997,9 +6008,9 @@ checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" [[package]] name = "regex-syntax" -version = "0.7.4" +version = "0.7.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e5ea92a5b6195c6ef2a0295ea818b312502c6fc94dde986c5553242e18fd4ce2" +checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da" [[package]] name = "region" @@ -6033,12 +6044,12 @@ dependencies = [ [[package]] name = "reqwest" -version = "0.11.19" +version = "0.11.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "20b9b67e2ca7dd9e9f9285b759de30ff538aab981abaaf7bc9bd90b84a0126c3" +checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1" dependencies = [ - "base64 0.21.2", - "bytes 1.4.0", + "base64 0.21.4", + "bytes 1.5.0", "encoding_rs", "futures-core", "futures-util", @@ -6054,7 +6065,7 @@ dependencies = [ "native-tls", "once_cell", "percent-encoding", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "serde", "serde_json", "serde_urlencoded", @@ -6274,7 +6285,7 @@ dependencies = [ "proc-macro2", "quote", "rust-embed-utils", - "syn 2.0.29", + "syn 2.0.37", "walkdir", ] @@ -6297,7 +6308,7 @@ checksum = "a4c4216490d5a413bc6d10fa4742bd7d4955941d062c0ef873141d6b0e7b30fd" dependencies = [ "arrayvec 0.7.4", "borsh", - "bytes 1.4.0", + "bytes 1.5.0", "num-traits", "rand 0.8.5", "rkyv", @@ -6358,7 +6369,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "4d69718bf81c6127a49dc64e44a742e8bb9213c0ff8869a22c308f84c1d4ab06" dependencies = [ "bitflags 1.3.2", - "errno 0.3.2", + "errno 0.3.3", "io-lifetimes 1.0.11", "libc", "linux-raw-sys 0.3.8", @@ -6367,14 +6378,14 @@ dependencies = [ [[package]] name = "rustix" -version = "0.38.8" +version = "0.38.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "19ed4fa021d81c8392ce04db050a3da9a60299050b7ae1cf482d862b54a7218f" +checksum = "d7db8590df6dfcd144d22afd1b83b36c21a18d7cbc1dc4bb5295a8712e9eb662" dependencies = [ "bitflags 2.4.0", - "errno 0.3.2", + "errno 0.3.3", "libc", - "linux-raw-sys 0.4.5", + "linux-raw-sys 0.4.7", "windows-sys", ] @@ -6393,14 +6404,14 @@ dependencies = [ [[package]] name = "rustls" -version = "0.20.8" +version = "0.20.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fff78fc74d175294f4e83b28343315ffcfb114b156f0185e9741cb5570f50e2f" +checksum = "1b80e3dec595989ea8510028f30c408a4630db12c9cbb8de34203b89d6577e99" dependencies = [ "log", "ring", "sct 0.7.0", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] @@ -6409,7 +6420,7 @@ version = "1.0.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "2d3987094b1d07b653b7dfdc3f70ce9a1da9c51ac18c1b06b662e4f9a0e9f4b2" dependencies = [ - "base64 0.21.2", + "base64 0.21.4", ] [[package]] @@ -6484,9 +6495,9 @@ dependencies = [ [[package]] name = "schemars" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "02c613288622e5f0c3fdc5dbd4db1c5fbe752746b1d1a56a0630b78fd00de44f" +checksum = "1f7b0ce13155372a76ee2e1c5ffba1fe61ede73fbea5630d61eee6fac4929c0c" dependencies = [ "dyn-clone", "schemars_derive", @@ -6496,9 +6507,9 @@ dependencies = [ [[package]] name = "schemars_derive" -version = "0.8.12" +version = "0.8.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "109da1e6b197438deb6db99952990c7f959572794b80ff93707d55a232545e7c" +checksum = "e85e2a16b12bdb763244c69ab79363d71db2b4b918a2def53f80b02e0574b13c" dependencies = [ "proc-macro2", "quote", @@ -6573,7 +6584,7 @@ dependencies = [ "serde_json", "sqlx", "thiserror", - "time 0.3.27", + "time", "tracing", "url", "uuid 1.4.1", @@ -6601,7 +6612,7 @@ dependencies = [ "rust_decimal", "sea-query-derive", "serde_json", - "time 0.3.27", + "time", "uuid 1.4.1", ] @@ -6616,7 +6627,7 @@ dependencies = [ "sea-query", "serde_json", "sqlx", - "time 0.3.27", + "time", "uuid 1.4.1", ] @@ -6721,6 +6732,7 @@ dependencies = [ "anyhow", "async-trait", "bincode", + "client", "collections", "ctor", "editor", @@ -6733,6 +6745,7 @@ dependencies = [ "lazy_static", "log", "matrixmultiply", + "node_runtime", "ordered-float", "parking_lot 0.11.2", "parse_duration", @@ -6743,6 +6756,7 @@ dependencies = [ "rand 0.8.5", "rpc", "rusqlite", + "rust-embed", "schemars", "serde", "serde_json", @@ -6751,7 +6765,7 @@ dependencies = [ "smol", "tempdir", "theme", - "tiktoken-rs 0.5.1", + "tiktoken-rs 0.5.4", "tree-sitter", "tree-sitter-cpp", "tree-sitter-elixir", @@ -6765,6 +6779,7 @@ dependencies = [ "unindent", "util", "workspace", + "zed", ] [[package]] @@ -6799,22 +6814,22 @@ checksum = "5a9f47faea3cad316faa914d013d24f471cd90bfca1a0c70f05a3f42c6441e99" [[package]] name = "serde" -version = "1.0.185" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "be9b6f69f1dfd54c3b568ffa45c310d6973a5e5148fd40cf515acaf38cf5bc31" +checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.185" +version = "1.0.188" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc59dfdcbad1437773485e0367fea4b090a2e0a16d9ffc46af47764536a298ec" +checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -6839,9 +6854,9 @@ dependencies = [ [[package]] name = "serde_json" -version = "1.0.105" +version = "1.0.107" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "693151e1ac27563d6dbcec9dee9fbd5da8539b20fa14ad3752b2e6d363ace360" +checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65" dependencies = [ "indexmap 2.0.0", "itoa", @@ -6851,9 +6866,9 @@ dependencies = [ [[package]] name = "serde_json_lenient" -version = "0.1.6" +version = "0.1.7" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "29591aaa3a13f5ad0f2dd1a8a21bcddab11eaae7c3522b20ade2e85e9df52206" +checksum = "26386958a1344003f2b2bcff51a23fbe70461a478ef29247c6c6ab2c1656f53e" dependencies = [ "indexmap 2.0.0", "itoa", @@ -6869,7 +6884,7 @@ checksum = "8725e1dfadb3a50f7e5ce0b1a540466f6ed3fe7a0fca2ac2b8b831d31316bd00" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -7013,9 +7028,9 @@ dependencies = [ [[package]] name = "shlex" -version = "1.1.0" +version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "43b2853a4d09f215c24cc5489c992ce46052d359b5109343cbafbf26bc62f8a3" +checksum = "a7cee0529a6d40f580e7a5e6c495c8fbfe21b7b52795ed4bb5e62cdf92bc6380" [[package]] name = "signal-hook" @@ -7186,9 +7201,9 @@ dependencies = [ [[package]] name = "socket2" -version = "0.5.3" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2538b18701741680e0322a2302176d3253a35388e2e62f172f64f4f16605f877" +checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e" dependencies = [ "libc", "windows-sys", @@ -7244,11 +7259,11 @@ dependencies = [ [[package]] name = "sqlformat" -version = "0.2.1" +version = "0.2.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c12bc9199d1db8234678b7051747c07f517cdcf019262d1847b94ec8b1aee3e" +checksum = "6b7b278788e7be4d0d29c0f39497a0eef3fba6bbc8e70d8bf7fde46edeaa9e85" dependencies = [ - "itertools", + "itertools 0.11.0", "nom", "unicode_categories", ] @@ -7274,7 +7289,7 @@ dependencies = [ "base64 0.13.1", "bitflags 1.3.2", "byteorder", - "bytes 1.4.0", + "bytes 1.5.0", "chrono", "crc", "crossbeam-queue", @@ -7288,7 +7303,7 @@ dependencies = [ "futures-executor", "futures-intrusive", "futures-util", - "hashlink 0.8.3", + "hashlink 0.8.4", "hex", "hkdf", "hmac 0.12.1", @@ -7305,7 +7320,7 @@ dependencies = [ "percent-encoding", "rand 0.8.5", "rust_decimal", - "rustls 0.20.8", + "rustls 0.20.9", "rustls-pemfile", "serde", "serde_json", @@ -7316,7 +7331,7 @@ dependencies = [ "sqlx-rt", "stringprep", "thiserror", - "time 0.3.27", + "time", "tokio-stream", "url", "uuid 1.4.1", @@ -7384,10 +7399,11 @@ dependencies = [ [[package]] name = "stringprep" -version = "0.1.3" +version = "0.1.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "db3737bde7edce97102e0e2b15365bf7a20bfdb5f60f4f9e8d7004258a51a8da" +checksum = "bb41d74e231a107a1b4ee36bd1214b11285b77768d2e3824aedafa988fd36ee6" dependencies = [ + "finl_unicode", "unicode-bidi", "unicode-normalization", ] @@ -7522,9 +7538,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.29" +version = "2.0.37" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c324c494eba9d92503e6f1ef2e6df781e78f6a7705a0202d9801b198807d518a" +checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8" dependencies = [ "proc-macro2", "quote", @@ -7626,7 +7642,7 @@ dependencies = [ "cfg-if 1.0.0", "fastrand 2.0.0", "redox_syscall 0.3.5", - "rustix 0.38.8", + "rustix 0.38.13", "windows-sys", ] @@ -7649,7 +7665,7 @@ dependencies = [ "dirs 4.0.0", "futures 0.3.28", "gpui", - "itertools", + "itertools 0.10.5", "lazy_static", "libc", "mio-extras", @@ -7680,7 +7696,7 @@ dependencies = [ "editor", "futures 0.3.28", "gpui", - "itertools", + "itertools 0.10.5", "language", "lazy_static", "libc", @@ -7772,22 +7788,22 @@ dependencies = [ [[package]] name = "thiserror" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "97a802ec30afc17eee47b2855fc72e0c4cd62be9b4efe6591edde0ec5bd68d8f" +checksum = "9d6d7a740b8a666a7e828dd00da9c0dc290dff53154ea77ac109281de90589b7" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.47" +version = "1.0.48" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6bb623b56e39ab7dcd4b1b98bb6c8f8d907ed255b18de254088016b27a8ee19b" +checksum = "49922ecae66cc8a249b77e68d1d0623c1b2c514f0060c27cdc68bd62a1219d35" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -7824,7 +7840,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "52aacc1cff93ba9d5f198c62c49c77fa0355025c729eed3326beaf7f33bc8614" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.4", "bstr", "fancy-regex", "lazy_static", @@ -7834,12 +7850,12 @@ dependencies = [ [[package]] name = "tiktoken-rs" -version = "0.5.1" +version = "0.5.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2bf14cb08d8fda6e484c75ec2bfb6bcef48347d47abcd011fa9d56ee995a3da0" +checksum = "f9ae5a3c24361e5f038af22517ba7f8e3af4099e30e78a3d56f86b48238fce9d" dependencies = [ "anyhow", - "base64 0.21.2", + "base64 0.21.4", "bstr", "fancy-regex", "lazy_static", @@ -7849,20 +7865,9 @@ dependencies = [ [[package]] name = "time" -version = "0.1.45" +version = "0.3.28" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1b797afad3f312d1c66a56d11d0316f916356d11bd158fbc6ca6389ff6bf805a" -dependencies = [ - "libc", - "wasi 0.10.0+wasi-snapshot-preview1", - "winapi 0.3.9", -] - -[[package]] -name = "time" -version = "0.3.27" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0bb39ee79a6d8de55f48f2293a830e040392f1c5f16e336bdd1788cd0aadce07" +checksum = "17f6bb557fd245c28e6411aa56b6403c689ad95061f50e4be16c274e70a17e48" dependencies = [ "deranged", "itoa", @@ -7879,9 +7884,9 @@ checksum = "7300fbefb4dadc1af235a9cef3737cea692a9d97e1b9cbcd4ebdae6f8868e6fb" [[package]] name = "time-macros" -version = "0.2.13" +version = "0.2.14" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "733d258752e9303d392b94b75230d07b0b9c489350c69b851fc6c065fde3e8f9" +checksum = "1a942f44339478ef67935ab2bbaec2fb0322496cf3cbe84b261e06ac3814c572" dependencies = [ "time-core", ] @@ -7935,14 +7940,14 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9" dependencies = [ "backtrace", - "bytes 1.4.0", + "bytes 1.5.0", "libc", "mio 0.8.8", "num_cpus", "parking_lot 0.12.1", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "signal-hook-registry", - "socket2 0.5.3", + "socket2 0.5.4", "tokio-macros", "windows-sys", ] @@ -7964,7 +7969,7 @@ version = "1.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf" dependencies = [ - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", ] @@ -7976,7 +7981,7 @@ checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -7995,9 +8000,9 @@ version = "0.23.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c43ee83903113e03984cb9e5cebe6c04a5116269e900e3ddba8f068a62adda59" dependencies = [ - "rustls 0.20.8", + "rustls 0.20.9", "tokio", - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] @@ -8007,7 +8012,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "397c988d37662c7dda6d2208364a706264bf3d6138b11d436cbac0ad38832842" dependencies = [ "futures-core", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", ] @@ -8029,11 +8034,11 @@ version = "0.6.10" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "36943ee01a6d67977dd3f84a5a1d2efeb4ada3a1ae771cadfaa535d9d9fc6507" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-sink", "log", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", ] @@ -8043,11 +8048,11 @@ version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "806fe8c2c87eccc8b3267cbae29ed3ab2d0bd37fca70ab622e46aaa9375ddb7d" dependencies = [ - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-io", "futures-sink", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tokio", "tracing", ] @@ -8063,9 +8068,9 @@ dependencies = [ [[package]] name = "toml" -version = "0.7.6" +version = "0.7.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c17e963a819c331dcacd7ab957d80bc2b9a9c1e71c804826d2f283dd65306542" +checksum = "dd79e69d3b627db300ff956027cc6c3798cef26d22526befdfcd12feeb6d2257" dependencies = [ "serde", "serde_spanned", @@ -8084,9 +8089,9 @@ dependencies = [ [[package]] name = "toml_edit" -version = "0.19.14" +version = "0.19.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8123f27e969974a3dfba720fdb560be359f57b44302d280ba72e76a74480e8a" +checksum = "1b5bb770da30e5cbfde35a2d7b9b8a2c4b8ef89548a7a6aeab5c9a576e3e7421" dependencies = [ "indexmap 2.0.0", "serde", @@ -8104,7 +8109,7 @@ dependencies = [ "async-stream", "async-trait", "base64 0.13.1", - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-util", "h2", @@ -8136,7 +8141,7 @@ dependencies = [ "futures-util", "indexmap 1.9.3", "pin-project", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "rand 0.8.5", "slab", "tokio", @@ -8153,13 +8158,13 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "f873044bf02dd1e8239e9c1293ea39dad76dc594ec16185d0a1bf31d8dc8d858" dependencies = [ "bitflags 1.3.2", - "bytes 1.4.0", + "bytes 1.5.0", "futures-core", "futures-util", "http", "http-body", "http-range-header", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tower", "tower-layer", "tower-service", @@ -8185,7 +8190,7 @@ checksum = "8ce8c33a8d48bd45d624a6e523445fd21ec13d3653cd51f681abf67418f54eb8" dependencies = [ "cfg-if 1.0.0", "log", - "pin-project-lite 0.2.12", + "pin-project-lite 0.2.13", "tracing-attributes", "tracing-core", ] @@ -8198,7 +8203,7 @@ checksum = "5f4f31f56159e98206da9efd823404b79b6ef3143b4a7ab76e67b1751b25a4ab" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] @@ -8549,7 +8554,7 @@ checksum = "6ad3713a14ae247f22a728a0456a545df14acf3867f905adff84be99e23b3ad1" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.4.0", + "bytes 1.5.0", "http", "httparse", "log", @@ -8568,7 +8573,7 @@ checksum = "e27992fd6a8c29ee7eef28fc78349aa244134e10ad447ce3b9f0ac0ed0fa4ce0" dependencies = [ "base64 0.13.1", "byteorder", - "bytes 1.4.0", + "bytes 1.5.0", "http", "httparse", "log", @@ -8581,9 +8586,9 @@ dependencies = [ [[package]] name = "typenum" -version = "1.16.0" +version = "1.17.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "497961ef93d974e23eb6f433eb5fe1b7930b659f06d12dec6fc44a8f554c0bba" +checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" [[package]] name = "ucd-trie" @@ -8626,9 +8631,9 @@ checksum = "7f9af028e052a610d99e066b33304625dea9613170a2563314490a4e6ec5cf7f" [[package]] name = "unicode-ident" -version = "1.0.11" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "301abaae475aa91687eb82514b328ab47a211a533026cb25fc3e519b86adfc3c" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" @@ -8683,9 +8688,9 @@ checksum = "a156c684c91ea7d62626509bce3cb4e1d9ed5c4d978f7b4352658f96a4c26b4a" [[package]] name = "url" -version = "2.4.0" +version = "2.4.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "50bff7831e19200a85b17131d085c25d7811bc4e186efdaf54bbd132994a88cb" +checksum = "143b538f18257fac9cad154828a57c6bf5157e1aa604d4816b5995bf6de87ae5" dependencies = [ "form_urlencoded", "idna", @@ -8856,7 +8861,7 @@ dependencies = [ "futures 0.3.28", "gpui", "indoc", - "itertools", + "itertools 0.10.5", "language", "language_selector", "log", @@ -8905,9 +8910,9 @@ checksum = "9d5b2c62b4012a3e1eca5a7e077d13b3bf498c4073e33ccd58626607748ceeca" [[package]] name = "walkdir" -version = "2.3.3" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "36df944cda56c7d8d8b7496af378e6b16de9284591917d307c9b4d313c44e698" +checksum = "d71d857dc86794ca4c280d616f7da00d2dbfd8cd788846559a6813e6aa4b54ee" dependencies = [ "same-file", "winapi-util", @@ -8928,12 +8933,6 @@ version = "0.9.0+wasi-snapshot-preview1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "cccddf32554fecc6acb585f82a32a72e28b48f8c4c1883ddfeeeaa96f7d8e519" -[[package]] -name = "wasi" -version = "0.10.0+wasi-snapshot-preview1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1a143597ca7c7793eff794def352d41792a93c481eb1042423ff7ff72ba2c31f" - [[package]] name = "wasi" version = "0.11.0+wasi-snapshot-preview1" @@ -9003,7 +9002,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", "wasm-bindgen-shared", ] @@ -9037,7 +9036,7 @@ checksum = "54681b18a46765f095758388f2d0cf16eb8d4169b639ab575a8f5693af210c7b" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -9050,9 +9049,9 @@ checksum = "ca6ad05a4870b2bf5fe995117d3728437bd27d7cd5f06f13c17443ef369775a1" [[package]] name = "wasm-encoder" -version = "0.31.1" +version = "0.33.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "41763f20eafed1399fff1afb466496d3a959f58241436cfdc17e3f5ca954de16" +checksum = "b39de0723a53d3c8f54bed106cfbc0d06b3e4d945c5c5022115a61e3b29183ae" dependencies = [ "leb128", ] @@ -9274,9 +9273,9 @@ dependencies = [ [[package]] name = "wast" -version = "63.0.0" +version = "65.0.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2560471f60a48b77fccefaf40796fda61c97ce1e790b59dfcec9dc3995c9f63a" +checksum = "5fd8c1cbadf94a0b0d1071c581d3cfea1b7ed5192c79808dd15406e508dd0afb" dependencies = [ "leb128", "memchr", @@ -9286,11 +9285,11 @@ dependencies = [ [[package]] name = "wat" -version = "1.0.70" +version = "1.0.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3bdc306c2c4c2f2bf2ba69e083731d0d2a77437fc6a350a19db139636e7e416c" +checksum = "3209e35eeaf483714f4c6be93f4a03e69aad5f304e3fa66afa7cb90fe1c8051f" dependencies = [ - "wast 63.0.0", + "wast 65.0.1", ] [[package]] @@ -9315,9 +9314,9 @@ dependencies = [ [[package]] name = "webpki" -version = "0.22.0" +version = "0.22.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f095d78192e208183081cc07bc5515ef55216397af48b873e5edcd72637fa1bd" +checksum = "f0e74f82d49d545ad128049b7e88f6576df2da6b02e9ce565c6f533be576957e" dependencies = [ "ring", "untrusted", @@ -9338,7 +9337,7 @@ version = "0.22.6" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b6c71e40d7d2c34a5106301fb632274ca37242cd0c9d3e64dbece371a40a2d87" dependencies = [ - "webpki 0.22.0", + "webpki 0.22.1", ] [[package]] @@ -9373,13 +9372,14 @@ dependencies = [ [[package]] name = "which" -version = "4.4.0" +version = "4.4.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2441c784c52b289a054b7201fc93253e288f094e2f4be9058343127c4226a269" +checksum = "87ba24419a2078cd2b0f2ede2691b6c66d8e47836da3b6db8265ebad47afbfc7" dependencies = [ "either", - "libc", + "home", "once_cell", + "rustix 0.38.13", ] [[package]] @@ -9620,9 +9620,9 @@ checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" [[package]] name = "winnow" -version = "0.5.14" +version = "0.5.15" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d09770118a7eb1ccaf4a594a221334119a44a814fcb0d31c5b85e83e97227a97" +checksum = "7c2e3184b9c4e92ad5167ca73039d0c42476302ab603e2fec4487511f38ccefc" dependencies = [ "memchr", ] @@ -9674,7 +9674,7 @@ name = "workspace" version = "0.1.0" dependencies = [ "anyhow", - "async-recursion 1.0.4", + "async-recursion 1.0.5", "bincode", "call", "channel", @@ -9689,7 +9689,7 @@ dependencies = [ "gpui", "indoc", "install_cli", - "itertools", + "itertools 0.10.5", "language", "lazy_static", "log", @@ -9754,7 +9754,7 @@ name = "xtask" version = "0.1.0" dependencies = [ "anyhow", - "clap 4.3.24", + "clap 4.4.4", "schemars", "serde_json", "theme", @@ -9938,7 +9938,7 @@ checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" dependencies = [ "proc-macro2", "quote", - "syn 2.0.29", + "syn 2.0.37", ] [[package]] diff --git a/Cargo.toml b/Cargo.toml index 96070658b9..c1876434ad 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -116,6 +116,7 @@ toml = { version = "0.5" } tree-sitter = "0.20" unindent = { version = "0.1.7" } pretty_assertions = "1.3.0" +git2 = { version = "0.15", default-features = false} tree-sitter-bash = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "1b0321ee85701d5036c334a6f04761cdc672e64c" } tree-sitter-c = "0.20.1" diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.toml index 7584dec21a..78146c3a9d 100644 --- a/crates/fs/Cargo.toml +++ b/crates/fs/Cargo.toml @@ -26,7 +26,7 @@ lazy_static.workspace = true parking_lot.workspace = true smol.workspace = true regex.workspace = true -git2 = { version = "0.15", default-features = false } +git2.workspace = true serde.workspace = true serde_derive.workspace = true serde_json.workspace = true diff --git a/crates/git/Cargo.toml b/crates/git/Cargo.toml index 8b91ee5373..72668ba766 100644 --- a/crates/git/Cargo.toml +++ b/crates/git/Cargo.toml @@ -20,7 +20,7 @@ smol.workspace = true parking_lot.workspace = true async-trait.workspace = true futures.workspace = true -git2 = { version = "0.15", default-features = false } +git2.workspace = true [dev-dependencies] unindent.workspace = true diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml index 0dc76ed54a..ffea6646e9 100644 --- a/crates/project/Cargo.toml +++ b/crates/project/Cargo.toml @@ -75,6 +75,6 @@ lsp = { path = "../lsp", features = ["test-support"] } settings = { path = "../settings", features = ["test-support"] } util = { path = "../util", features = ["test-support"] } rpc = { path = "../rpc", features = ["test-support"] } -git2 = { version = "0.15", default-features = false } +git2.workspace = true tempdir.workspace = true unindent.workspace = true diff --git a/crates/semantic_index/Cargo.toml b/crates/semantic_index/Cargo.toml index 45b02722ac..44afecb0c2 100644 --- a/crates/semantic_index/Cargo.toml +++ b/crates/semantic_index/Cargo.toml @@ -51,6 +51,10 @@ project = { path = "../project", features = ["test-support"] } rpc = { path = "../rpc", features = ["test-support"] } workspace = { path = "../workspace", features = ["test-support"] } settings = { path = "../settings", features = ["test-support"]} +rust-embed = { version = "8.0", features = ["include-exclude"] } +client = { path = "../client" } +zed = { path = "../zed"} +node_runtime = { path = "../node_runtime"} pretty_assertions.workspace = true rand.workspace = true @@ -68,3 +72,6 @@ tree-sitter-elixir.workspace = true tree-sitter-lua.workspace = true tree-sitter-ruby.workspace = true tree-sitter-php.workspace = true + +[[example]] +name = "eval" diff --git a/crates/semantic_index/README.md b/crates/semantic_index/README.md index 86e68dc414..85f83af121 100644 --- a/crates/semantic_index/README.md +++ b/crates/semantic_index/README.md @@ -1,31 +1,20 @@ -WIP: Sample SQL Queries -/* +# Semantic Index -create table "files" ( -"id" INTEGER PRIMARY KEY, -"path" VARCHAR, -"sha1" VARCHAR, -); +## Evaluation -create table symbols ( -"file_id" INTEGER REFERENCES("files", "id") ON CASCADE DELETE, -"offset" INTEGER, -"embedding" VECTOR, -); +### Metrics -insert into "files" ("path", "sha1") values ("src/main.rs", "sha1") return id; -insert into symbols ( -"file_id", -"start", -"end", -"embedding" -) values ( -(id,), -(id,), -(id,), -(id,), -) +nDCG@k: +- "The value of NDCG is determined by comparing the relevance of the items returned by the search engine to the relevance of the item that a hypothetical "ideal" search engine would return. +- "The relevance of result is represented by a score (also known as a 'grade') that is assigned to the search query. The scores of these results are then discounted based on their position in the search results -- did they get recommended first or last?" +MRR@k: +- "Mean reciprocal rank quantifies the rank of the first relevant item found in teh recommendation list." -*/ +MAP@k: +- "Mean average precision averages the precision@k metric at each relevant item position in the recommendation list. + +Resources: +- [Evaluating recommendation metrics](https://www.shaped.ai/blog/evaluating-recommendation-systems-map-mmr-ndcg) +- [Math Walkthrough](https://towardsdatascience.com/demystifying-ndcg-bee3be58cfe0) diff --git a/crates/semantic_index/eval/gpt-engineer.json b/crates/semantic_index/eval/gpt-engineer.json new file mode 100644 index 0000000000..d008cc65d1 --- /dev/null +++ b/crates/semantic_index/eval/gpt-engineer.json @@ -0,0 +1,114 @@ +{ + "repo": "https://github.com/AntonOsika/gpt-engineer.git", + "commit": "7735a6445bae3611c62f521e6464c67c957f87c2", + "assertions": [ + { + "query": "How do I contribute to this project?", + "matches": [ + ".github/CONTRIBUTING.md:1", + "ROADMAP.md:48" + ] + }, + { + "query": "What version of the openai package is active?", + "matches": [ + "pyproject.toml:14" + ] + }, + { + "query": "Ask user for clarification", + "matches": [ + "gpt_engineer/steps.py:69" + ] + }, + { + "query": "generate tests for python code", + "matches": [ + "gpt_engineer/steps.py:153" + ] + }, + { + "query": "get item from database based on key", + "matches": [ + "gpt_engineer/db.py:42", + "gpt_engineer/db.py:68" + ] + }, + { + "query": "prompt user to select files", + "matches": [ + "gpt_engineer/file_selector.py:171", + "gpt_engineer/file_selector.py:306", + "gpt_engineer/file_selector.py:289", + "gpt_engineer/file_selector.py:234" + ] + }, + { + "query": "send to rudderstack", + "matches": [ + "gpt_engineer/collect.py:11", + "gpt_engineer/collect.py:38" + ] + }, + { + "query": "parse code blocks from chat messages", + "matches": [ + "gpt_engineer/chat_to_files.py:10", + "docs/intro/chat_parsing.md:1" + ] + }, + { + "query": "how do I use the docker cli?", + "matches": [ + "docker/README.md:1" + ] + }, + { + "query": "ask the user if the code ran successfully?", + "matches": [ + "gpt_engineer/learning.py:54" + ] + }, + { + "query": "how is consent granted by the user?", + "matches": [ + "gpt_engineer/learning.py:107", + "gpt_engineer/learning.py:130", + "gpt_engineer/learning.py:152" + ] + }, + { + "query": "what are all the different steps the agent can take?", + "matches": [ + "docs/intro/steps_module.md:1", + "gpt_engineer/steps.py:391" + ] + }, + { + "query": "ask the user for clarification?", + "matches": [ + "gpt_engineer/steps.py:69" + ] + }, + { + "query": "what models are available?", + "matches": [ + "gpt_engineer/ai.py:315", + "gpt_engineer/ai.py:341", + "docs/open-models.md:1" + ] + }, + { + "query": "what is the current focus of the project?", + "matches": [ + "ROADMAP.md:11" + ] + }, + { + "query": "does the agent know how to fix code?", + "matches": [ + "gpt_engineer/steps.py:367" + ] + } + ] +} diff --git a/crates/semantic_index/eval/tree-sitter.json b/crates/semantic_index/eval/tree-sitter.json new file mode 100644 index 0000000000..d3dcc86937 --- /dev/null +++ b/crates/semantic_index/eval/tree-sitter.json @@ -0,0 +1,104 @@ +{ + "repo": "https://github.com/tree-sitter/tree-sitter.git", + "commit": "46af27796a76c72d8466627d499f2bca4af958ee", + "assertions": [ + { + "query": "What attributes are available for the tags configuration struct?", + "matches": [ + "tags/src/lib.rs:24" + ] + }, + { + "query": "create a new tag configuration", + "matches": [ + "tags/src/lib.rs:119" + ] + }, + { + "query": "generate tags based on config", + "matches": [ + "tags/src/lib.rs:261" + ] + }, + { + "query": "match on ts quantifier in rust", + "matches": [ + "lib/binding_rust/lib.rs:139" + ] + }, + { + "query": "cli command to generate tags", + "matches": [ + "cli/src/tags.rs:10" + ] + }, + { + "query": "what version of the tree-sitter-tags package is active?", + "matches": [ + "tags/Cargo.toml:4" + ] + }, + { + "query": "Insert a new parse state", + "matches": [ + "cli/src/generate/build_tables/build_parse_table.rs:153" + ] + }, + { + "query": "Handle conflict when numerous actions occur on the same symbol", + "matches": [ + "cli/src/generate/build_tables/build_parse_table.rs:363", + "cli/src/generate/build_tables/build_parse_table.rs:442" + ] + }, + { + "query": "Match based on associativity of actions", + "matches": [ + "cri/src/generate/build_tables/build_parse_table.rs:542" + ] + }, + { + "query": "Format token set display", + "matches": [ + "cli/src/generate/build_tables/item.rs:246" + ] + }, + { + "query": "extract choices from rule", + "matches": [ + "cli/src/generate/prepare_grammar/flatten_grammar.rs:124" + ] + }, + { + "query": "How do we identify if a symbol is being used?", + "matches": [ + "cli/src/generate/prepare_grammar/flatten_grammar.rs:175" + ] + }, + { + "query": "How do we launch the playground?", + "matches": [ + "cli/src/playground.rs:46" + ] + }, + { + "query": "How do we test treesitter query matches in rust?", + "matches": [ + "cli/src/query_testing.rs:152", + "cli/src/tests/query_test.rs:781", + "cli/src/tests/query_test.rs:2163", + "cli/src/tests/query_test.rs:3781", + "cli/src/tests/query_test.rs:887" + ] + }, + { + "query": "What does the CLI do?", + "matches": [ + "cli/README.md:10", + "cli/loader/README.md:3", + "docs/section-5-implementation.md:14", + "docs/section-5-implementation.md:18" + ] + } + ] +} diff --git a/crates/semantic_index/examples/eval.rs b/crates/semantic_index/examples/eval.rs new file mode 100644 index 0000000000..15406cf63e --- /dev/null +++ b/crates/semantic_index/examples/eval.rs @@ -0,0 +1,531 @@ +use anyhow::{anyhow, Result}; +use client::{self, UserStore}; +use gpui::{AsyncAppContext, ModelHandle, Task}; +use language::LanguageRegistry; +use node_runtime::RealNodeRuntime; +use project::{Project, RealFs}; +use semantic_index::embedding::OpenAIEmbeddings; +use semantic_index::semantic_index_settings::SemanticIndexSettings; +use semantic_index::{SearchResult, SemanticIndex}; +use serde::{Deserialize, Serialize}; +use settings::{default_settings, SettingsStore}; +use std::path::{Path, PathBuf}; +use std::process::Command; +use std::sync::Arc; +use std::time::{Duration, Instant}; +use std::{cmp, env, fs}; +use util::channel::{RELEASE_CHANNEL, RELEASE_CHANNEL_NAME}; +use util::http::{self}; +use util::paths::EMBEDDINGS_DIR; +use zed::languages; + +#[derive(Deserialize, Clone, Serialize)] +struct EvaluationQuery { + query: String, + matches: Vec, +} + +impl EvaluationQuery { + fn match_pairs(&self) -> Vec<(PathBuf, u32)> { + let mut pairs = Vec::new(); + for match_identifier in self.matches.iter() { + let mut match_parts = match_identifier.split(":"); + + if let Some(file_path) = match_parts.next() { + if let Some(row_number) = match_parts.next() { + pairs.push((PathBuf::from(file_path), row_number.parse::().unwrap())); + } + } + } + pairs + } +} + +#[derive(Deserialize, Clone)] +struct RepoEval { + repo: String, + commit: String, + assertions: Vec, +} + +const TMP_REPO_PATH: &str = "eval_repos"; + +fn parse_eval() -> anyhow::Result> { + let eval_folder = env::current_dir()? + .as_path() + .parent() + .unwrap() + .join("crates/semantic_index/eval"); + + let mut repo_evals: Vec = Vec::new(); + for entry in fs::read_dir(eval_folder)? { + let file_path = entry.unwrap().path(); + if let Some(extension) = file_path.extension() { + if extension == "json" { + if let Ok(file) = fs::read_to_string(file_path) { + let repo_eval = serde_json::from_str(file.as_str()); + + match repo_eval { + Ok(repo_eval) => { + repo_evals.push(repo_eval); + } + Err(err) => { + println!("Err: {:?}", err); + } + } + } + } + } + } + + Ok(repo_evals) +} + +fn clone_repo(repo_eval: RepoEval) -> anyhow::Result<(String, PathBuf)> { + let repo_name = Path::new(repo_eval.repo.as_str()) + .file_name() + .unwrap() + .to_str() + .unwrap() + .to_owned() + .replace(".git", ""); + + let clone_path = fs::canonicalize(env::current_dir()?)? + .parent() + .ok_or(anyhow!("path canonicalization failed"))? + .parent() + .unwrap() + .join(TMP_REPO_PATH); + + // Delete Clone Path if already exists + let _ = fs::remove_dir_all(&clone_path); + let _ = fs::create_dir(&clone_path); + + let _ = Command::new("git") + .args(["clone", repo_eval.repo.as_str()]) + .current_dir(clone_path.clone()) + .output()?; + // Update clone path to be new directory housing the repo. + let clone_path = clone_path.join(repo_name.clone()); + let _ = Command::new("git") + .args(["checkout", repo_eval.commit.as_str()]) + .current_dir(clone_path.clone()) + .output()?; + + Ok((repo_name, clone_path)) +} + +fn dcg(hits: Vec) -> f32 { + let mut result = 0.0; + for (idx, hit) in hits.iter().enumerate() { + result += *hit as f32 / (2.0 + idx as f32).log2(); + } + + result +} + +fn get_hits( + eval_query: EvaluationQuery, + search_results: Vec, + k: usize, + cx: &AsyncAppContext, +) -> (Vec, Vec) { + let ideal = vec![1; cmp::min(eval_query.matches.len(), k)]; + + let mut hits = Vec::new(); + for result in search_results { + let (path, start_row, end_row) = result.buffer.read_with(cx, |buffer, _cx| { + let path = buffer.file().unwrap().path().to_path_buf(); + let start_row = buffer.offset_to_point(result.range.start.offset).row; + let end_row = buffer.offset_to_point(result.range.end.offset).row; + (path, start_row, end_row) + }); + + let match_pairs = eval_query.match_pairs(); + let mut found = 0; + for (match_path, match_row) in match_pairs { + if match_path == path { + if match_row >= start_row && match_row <= end_row { + found = 1; + break; + } + } + } + + hits.push(found); + } + + // For now, we are calculating ideal_hits a bit different, as technically + // with overlapping ranges, one match can result in more than result. + let mut ideal_hits = hits.clone(); + ideal_hits.retain(|x| x == &1); + + let ideal = if ideal.len() > ideal_hits.len() { + ideal + } else { + ideal_hits + }; + + // Fill ideal to 10 length + let mut filled_ideal = [0; 10]; + for (idx, i) in ideal.to_vec().into_iter().enumerate() { + filled_ideal[idx] = i; + } + + (filled_ideal.to_vec(), hits) +} + +fn evaluate_ndcg(hits: Vec, ideal: Vec) -> Vec { + // NDCG or Normalized Discounted Cumulative Gain, is determined by comparing the relevance of + // items returned by the search engine relative to the hypothetical ideal. + // Relevance is represented as a series of booleans, in which each search result returned + // is identified as being inside the test set of matches (1) or not (0). + + // For example, if result 1, 3 and 5 match the 3 relevant results provided + // actual dcg is calculated against a vector of [1, 0, 1, 0, 1] + // whereas ideal dcg is calculated against a vector of [1, 1, 1, 0, 0] + // as this ideal vector assumes the 3 relevant results provided were returned first + // normalized dcg is then calculated as actual dcg / ideal dcg. + + // NDCG ranges from 0 to 1, which higher values indicating better performance + // Commonly NDCG is expressed as NDCG@k, in which k represents the metric calculated + // including only the top k values returned. + // The @k metrics can help you identify, at what point does the relevant results start to fall off. + // Ie. a NDCG@1 of 0.9 and a NDCG@3 of 0.5 may indicate that the first result returned in usually + // very high quality, whereas rank results quickly drop off after the first result. + + let mut ndcg = Vec::new(); + for idx in 1..(hits.len() + 1) { + let hits_at_k = hits[0..idx].to_vec(); + let ideal_at_k = ideal[0..idx].to_vec(); + + let at_k = dcg(hits_at_k.clone()) / dcg(ideal_at_k.clone()); + + ndcg.push(at_k); + } + + ndcg +} + +fn evaluate_map(hits: Vec) -> Vec { + let mut map_at_k = Vec::new(); + + let non_zero = hits.iter().sum::() as f32; + if non_zero == 0.0 { + return vec![0.0; hits.len()]; + } + + let mut rolling_non_zero = 0.0; + let mut rolling_map = 0.0; + for (idx, h) in hits.into_iter().enumerate() { + rolling_non_zero += h as f32; + if h == 1 { + rolling_map += rolling_non_zero / (idx + 1) as f32; + } + map_at_k.push(rolling_map / non_zero); + } + + map_at_k +} + +fn evaluate_mrr(hits: Vec) -> f32 { + for (idx, h) in hits.into_iter().enumerate() { + if h == 1 { + return 1.0 / (idx + 1) as f32; + } + } + + return 0.0; +} + +fn init_logger() { + env_logger::init(); +} + +#[derive(Serialize)] +struct QueryMetrics { + query: EvaluationQuery, + millis_to_search: Duration, + ndcg: Vec, + map: Vec, + mrr: f32, + hits: Vec, + precision: Vec, + recall: Vec, +} + +#[derive(Serialize)] +struct SummaryMetrics { + millis_to_search: f32, + ndcg: Vec, + map: Vec, + mrr: f32, + precision: Vec, + recall: Vec, +} + +#[derive(Serialize)] +struct RepoEvaluationMetrics { + millis_to_index: Duration, + query_metrics: Vec, + repo_metrics: Option, +} + +impl RepoEvaluationMetrics { + fn new(millis_to_index: Duration) -> Self { + RepoEvaluationMetrics { + millis_to_index, + query_metrics: Vec::new(), + repo_metrics: None, + } + } + + fn save(&self, repo_name: String) -> Result<()> { + let results_string = serde_json::to_string(&self)?; + fs::write(format!("./{}_evaluation.json", repo_name), results_string) + .expect("Unable to write file"); + Ok(()) + } + + fn summarize(&mut self) { + let l = self.query_metrics.len() as f32; + let millis_to_search: f32 = self + .query_metrics + .iter() + .map(|metrics| metrics.millis_to_search.as_millis()) + .sum::() as f32 + / l; + + let mut ndcg_sum = vec![0.0; 10]; + let mut map_sum = vec![0.0; 10]; + let mut precision_sum = vec![0.0; 10]; + let mut recall_sum = vec![0.0; 10]; + let mut mmr_sum = 0.0; + + for query_metric in self.query_metrics.iter() { + for (ndcg, query_ndcg) in ndcg_sum.iter_mut().zip(query_metric.ndcg.clone()) { + *ndcg += query_ndcg; + } + + for (mapp, query_map) in map_sum.iter_mut().zip(query_metric.map.clone()) { + *mapp += query_map; + } + + for (pre, query_pre) in precision_sum.iter_mut().zip(query_metric.precision.clone()) { + *pre += query_pre; + } + + for (rec, query_rec) in recall_sum.iter_mut().zip(query_metric.recall.clone()) { + *rec += query_rec; + } + + mmr_sum += query_metric.mrr; + } + + let ndcg = ndcg_sum.iter().map(|val| val / l).collect::>(); + let map = map_sum.iter().map(|val| val / l).collect::>(); + let precision = precision_sum + .iter() + .map(|val| val / l) + .collect::>(); + let recall = recall_sum.iter().map(|val| val / l).collect::>(); + let mrr = mmr_sum / l; + + self.repo_metrics = Some(SummaryMetrics { + millis_to_search, + ndcg, + map, + mrr, + precision, + recall, + }) + } +} + +fn evaluate_precision(hits: Vec) -> Vec { + let mut rolling_hit: f32 = 0.0; + let mut precision = Vec::new(); + for (idx, hit) in hits.into_iter().enumerate() { + rolling_hit += hit as f32; + precision.push(rolling_hit / ((idx as f32) + 1.0)); + } + + precision +} + +fn evaluate_recall(hits: Vec, ideal: Vec) -> Vec { + let total_relevant = ideal.iter().sum::() as f32; + let mut recall = Vec::new(); + let mut rolling_hit: f32 = 0.0; + for hit in hits { + rolling_hit += hit as f32; + recall.push(rolling_hit / total_relevant); + } + + recall +} + +async fn evaluate_repo( + repo_name: String, + index: ModelHandle, + project: ModelHandle, + query_matches: Vec, + cx: &mut AsyncAppContext, +) -> Result { + // Index Project + let index_t0 = Instant::now(); + index + .update(cx, |index, cx| index.index_project(project.clone(), cx)) + .await?; + let mut repo_metrics = RepoEvaluationMetrics::new(index_t0.elapsed()); + + for query in query_matches { + // Query each match in order + let search_t0 = Instant::now(); + let search_results = index + .update(cx, |index, cx| { + index.search_project(project.clone(), query.clone().query, 10, vec![], vec![], cx) + }) + .await?; + let millis_to_search = search_t0.elapsed(); + + // Get Hits/Ideal + let k = 10; + let (ideal, hits) = self::get_hits(query.clone(), search_results, k, cx); + + // Evaluate ndcg@k, for k = 1, 3, 5, 10 + let ndcg = evaluate_ndcg(hits.clone(), ideal.clone()); + + // Evaluate map@k, for k = 1, 3, 5, 10 + let map = evaluate_map(hits.clone()); + + // Evaluate mrr + let mrr = evaluate_mrr(hits.clone()); + + // Evaluate precision + let precision = evaluate_precision(hits.clone()); + + // Evaluate Recall + let recall = evaluate_recall(hits.clone(), ideal); + + let query_metrics = QueryMetrics { + query, + millis_to_search, + ndcg, + map, + mrr, + hits, + precision, + recall, + }; + + repo_metrics.query_metrics.push(query_metrics); + } + + repo_metrics.summarize(); + let _ = repo_metrics.save(repo_name); + + anyhow::Ok(repo_metrics) +} + +fn main() { + // Launch new repo as a new Zed workspace/project + let app = gpui::App::new(()).unwrap(); + let fs = Arc::new(RealFs); + let http = http::client(); + let http_client = http::client(); + init_logger(); + + app.run(move |cx| { + cx.set_global(*RELEASE_CHANNEL); + + let client = client::Client::new(http.clone(), cx); + let user_store = cx.add_model(|cx| UserStore::new(client.clone(), http_client.clone(), cx)); + + // Initialize Settings + let mut store = SettingsStore::default(); + store + .set_default_settings(default_settings().as_ref(), cx) + .unwrap(); + cx.set_global(store); + + // Initialize Languages + let login_shell_env_loaded = Task::ready(()); + let mut languages = LanguageRegistry::new(login_shell_env_loaded); + languages.set_executor(cx.background().clone()); + let languages = Arc::new(languages); + + let node_runtime = RealNodeRuntime::new(http.clone()); + languages::init(languages.clone(), node_runtime.clone()); + language::init(cx); + + project::Project::init(&client, cx); + semantic_index::init(fs.clone(), http.clone(), languages.clone(), cx); + + settings::register::(cx); + + let db_file_path = EMBEDDINGS_DIR + .join(Path::new(RELEASE_CHANNEL_NAME.as_str())) + .join("embeddings_db"); + + let languages = languages.clone(); + let fs = fs.clone(); + cx.spawn(|mut cx| async move { + let semantic_index = SemanticIndex::new( + fs.clone(), + db_file_path, + Arc::new(OpenAIEmbeddings::new(http_client, cx.background())), + languages.clone(), + cx.clone(), + ) + .await?; + + if let Ok(repo_evals) = parse_eval() { + for repo in repo_evals { + let cloned = clone_repo(repo.clone()); + match cloned { + Ok((repo_name, clone_path)) => { + println!( + "Cloned {:?} @ {:?} into {:?}", + repo.repo, repo.commit, &clone_path + ); + + // Create Project + let project = cx.update(|cx| { + Project::local( + client.clone(), + user_store.clone(), + languages.clone(), + fs.clone(), + cx, + ) + }); + + // Register Worktree + let _ = project + .update(&mut cx, |project, cx| { + project.find_or_create_local_worktree(clone_path, true, cx) + }) + .await; + + let _ = evaluate_repo( + repo_name, + semantic_index.clone(), + project, + repo.assertions, + &mut cx, + ) + .await?; + } + Err(err) => { + println!("Error cloning: {:?}", err); + } + } + } + } + + anyhow::Ok(()) + }) + .detach(); + }); +} diff --git a/crates/semantic_index/src/semantic_index.rs b/crates/semantic_index/src/semantic_index.rs index bf15eae974..c808d33f23 100644 --- a/crates/semantic_index/src/semantic_index.rs +++ b/crates/semantic_index/src/semantic_index.rs @@ -1,5 +1,5 @@ mod db; -mod embedding; +pub mod embedding; mod embedding_queue; mod parsing; pub mod semantic_index_settings; @@ -294,7 +294,7 @@ impl SemanticIndex { } } - async fn new( + pub async fn new( fs: Arc, database_path: PathBuf, embedding_provider: Arc, @@ -966,8 +966,6 @@ impl SemanticIndex { cx: &mut ModelContext, ) -> Task> { if !self.projects.contains_key(&project.downgrade()) { - log::trace!("Registering Project for Semantic Index"); - let subscription = cx.subscribe(&project, |this, project, event, cx| match event { project::Event::WorktreeAdded | project::Event::WorktreeRemoved(_) => { this.project_worktrees_changed(project.clone(), cx); diff --git a/crates/util/Cargo.toml b/crates/util/Cargo.toml index 8d9594fbeb..6ab76b0850 100644 --- a/crates/util/Cargo.toml +++ b/crates/util/Cargo.toml @@ -25,10 +25,10 @@ rust-embed.workspace = true tempdir = { workspace = true, optional = true } serde.workspace = true serde_json.workspace = true -git2 = { version = "0.15", default-features = false, optional = true } +git2 = { workspace = true, optional = true } dirs = "3.0" take-until = "0.2.0" [dev-dependencies] tempdir.workspace = true -git2 = { version = "0.15", default-features = false } +git2.workspace = true diff --git a/script/evaluate_semantic_index b/script/evaluate_semantic_index new file mode 100755 index 0000000000..e9a96a02b4 --- /dev/null +++ b/script/evaluate_semantic_index @@ -0,0 +1,3 @@ +#!/bin/bash + +cargo run -p semantic_index --example eval