From d544470d1d3770f0024651dbf121525564a2657c Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Mon, 5 Oct 2026 12:44:26 +0000 Subject: [PATCH] Reduce the dependency footprint (#65176) Follows-up https://github.com/zed-industries/zed/pull/64862 with similar fixes: * replaces a few dependencies that are almost not used, removes unused dependencies * removed unused features * removes `test-support` dependencies from the regular tree * cleans up build scripts Despite the large diff, the changes are rather mechanical, split by commits. Result: image Release Notes: - N/A - [GPUI] N/A --- Cargo.lock | 489 ++---------------- Cargo.toml | 191 +++---- crates/agent/Cargo.toml | 4 +- crates/agent_servers/Cargo.toml | 8 +- crates/agent_servers/src/custom.rs | 4 +- crates/anthropic/Cargo.toml | 2 +- crates/askpass/Cargo.toml | 2 +- crates/auto_update_helper/Cargo.toml | 10 +- crates/auto_update_helper/build.rs | 2 + crates/bedrock/Cargo.toml | 6 +- crates/bench_metrics/Cargo.toml | 2 + crates/breadcrumbs/Cargo.toml | 4 - crates/buffer_diff/Cargo.toml | 5 +- crates/cli/Cargo.toml | 71 ++- crates/cli/build.rs | 2 +- crates/client/Cargo.toml | 4 +- crates/clock/Cargo.toml | 2 +- crates/cloud_api_client/Cargo.toml | 9 +- crates/cloud_llm_client/Cargo.toml | 6 +- crates/collab/Cargo.toml | 16 +- crates/collab_ui/Cargo.toml | 16 - crates/crashes/Cargo.toml | 4 +- crates/db/Cargo.toml | 2 +- crates/debugger_ui/Cargo.toml | 6 +- crates/deepseek/Cargo.toml | 2 +- crates/docs_preprocessor/Cargo.toml | 2 +- crates/edit_prediction/Cargo.toml | 6 +- crates/edit_prediction_cli/Cargo.toml | 4 +- crates/edit_prediction_cli/build.rs | 1 + crates/edit_prediction_metrics/Cargo.toml | 2 +- crates/editor/Cargo.toml | 13 +- crates/etw_tracing/Cargo.toml | 3 +- crates/explorer_command_injector/Cargo.toml | 2 +- crates/extension_api/build.rs | 1 + crates/extension_cli/Cargo.toml | 6 +- crates/extension_host/Cargo.toml | 2 +- crates/extensions_ui/Cargo.toml | 1 - .../src/components/extension_card.rs | 5 +- crates/feature_flags_macros/Cargo.toml | 2 +- crates/fs/Cargo.toml | 2 +- crates/fuzzy_nucleo/Cargo.toml | 4 + crates/google_ai/src/google_ai.rs | 4 +- crates/gpui/Cargo.toml | 77 +-- crates/gpui/build.rs | 1 + crates/gpui_apple/Cargo.toml | 2 +- crates/gpui_linux/Cargo.toml | 11 +- crates/gpui_macos/Cargo.toml | 18 +- crates/gpui_macros/Cargo.toml | 2 +- crates/gpui_tokio/Cargo.toml | 2 +- crates/gpui_util/Cargo.toml | 2 +- crates/gpui_util/src/lib.rs | 6 + crates/gpui_web/Cargo.toml | 13 +- crates/gpui_wgpu/Cargo.toml | 13 +- crates/gpui_windows/Cargo.toml | 31 +- crates/gpui_windows/build.rs | 2 + crates/html_to_markdown/Cargo.toml | 2 +- crates/http_client/Cargo.toml | 9 +- crates/http_client/src/http_client.rs | 25 +- crates/http_client_tls/Cargo.toml | 2 +- crates/http_proxy/Cargo.toml | 2 +- crates/icons/Cargo.toml | 2 +- crates/inspector_ui/Cargo.toml | 1 - crates/inspector_ui/src/div_inspector.rs | 6 +- crates/install_cli/Cargo.toml | 2 + crates/language/Cargo.toml | 5 +- crates/language/build.rs | 5 - crates/language_core/Cargo.toml | 6 +- crates/language_model_core/Cargo.toml | 9 +- .../src/language_model_core.rs | 2 +- crates/language_model_core/src/provider.rs | 1 + crates/language_models/Cargo.toml | 6 +- crates/languages/Cargo.toml | 2 +- crates/livekit_api/Cargo.toml | 4 +- crates/livekit_client/Cargo.toml | 14 +- crates/lsp/Cargo.toml | 2 +- crates/markdown/Cargo.toml | 2 +- crates/mermaid_render/Cargo.toml | 4 +- crates/miniprofiler_ui/Cargo.toml | 3 - crates/mistral/Cargo.toml | 2 +- crates/net/Cargo.toml | 4 +- crates/node_runtime/Cargo.toml | 2 +- crates/notifications/Cargo.toml | 6 - crates/oauth_callback_server/Cargo.toml | 2 +- crates/ollama/Cargo.toml | 2 +- crates/ollama/src/ollama.rs | 2 +- crates/open_ai/Cargo.toml | 2 +- crates/openai_subscribed/Cargo.toml | 2 +- .../src/openai_subscribed.rs | 2 +- crates/path/Cargo.toml | 5 +- crates/path/src/path.rs | 34 ++ crates/project/Cargo.toml | 1 - crates/project/src/debugger/session.rs | 7 +- crates/project_panel/Cargo.toml | 2 +- crates/proto/Cargo.toml | 2 +- .../refineable/derive_refineable/Cargo.toml | 2 +- crates/remote/Cargo.toml | 8 +- crates/remote/src/transport/ssh.rs | 6 +- crates/remote/src/transport/wsl.rs | 4 +- crates/remote_server/Cargo.toml | 5 +- crates/remote_server/build.rs | 14 +- crates/reqwest_client/Cargo.toml | 2 +- crates/rope/Cargo.toml | 2 +- crates/rope/src/chunk.rs | 6 +- crates/rpc/Cargo.toml | 4 +- crates/rpc/src/peer.rs | 6 +- crates/sandbox/Cargo.toml | 4 +- crates/scheduler/Cargo.toml | 8 +- crates/schema_generator/Cargo.toml | 4 +- crates/search/Cargo.toml | 2 +- crates/settings/Cargo.toml | 4 +- crates/settings_content/Cargo.toml | 2 +- crates/settings_json/Cargo.toml | 8 +- crates/settings_json/src/settings_json.rs | 4 +- crates/settings_macros/Cargo.toml | 5 +- crates/sqlez/Cargo.toml | 6 +- crates/sqlez/src/bindable.rs | 6 +- crates/sqlez_macros/Cargo.toml | 4 +- crates/sum_tree/Cargo.toml | 2 +- crates/telemetry_events/Cargo.toml | 2 +- crates/terminal_view/Cargo.toml | 2 +- crates/text/Cargo.toml | 5 +- crates/text/src/text.rs | 2 +- crates/theme/Cargo.toml | 4 +- crates/theme_importer/Cargo.toml | 6 +- crates/theme_settings/Cargo.toml | 2 +- crates/time_format/Cargo.toml | 6 +- crates/ui/Cargo.toml | 1 - crates/ui/src/components/diff_stat.rs | 6 +- crates/ui/src/utils.rs | 12 + crates/ui_macros/Cargo.toml | 2 +- crates/util/Cargo.toml | 30 +- crates/util/src/paths.rs | 26 +- crates/util/src/util.rs | 6 - crates/util_macros/Cargo.toml | 2 +- crates/vim/Cargo.toml | 6 +- crates/x_ai/Cargo.toml | 4 +- crates/x_ai_subscribed/Cargo.toml | 2 +- crates/x_ai_subscribed/src/x_ai_subscribed.rs | 2 +- crates/zed/Cargo.toml | 14 +- crates/zeta_prompt/Cargo.toml | 2 +- crates/zlog/Cargo.toml | 4 +- crates/ztracing/Cargo.toml | 22 +- tooling/compliance/Cargo.toml | 11 +- tooling/perf/Cargo.toml | 13 +- tooling/xtask/Cargo.toml | 6 +- tooling/xtask/src/tasks/package_conformity.rs | 2 +- 146 files changed, 651 insertions(+), 971 deletions(-) delete mode 100644 crates/language/build.rs diff --git a/Cargo.lock b/Cargo.lock index aeede1b3880..3f03b2ffcba 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -322,7 +322,7 @@ dependencies = [ "web_search", "zed_env_vars", "zlog", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.13.3", ] [[package]] @@ -392,7 +392,6 @@ dependencies = [ "feature_flags", "fs", "futures 0.3.34", - "google_ai", "gpui", "gpui_tokio", "http_client", @@ -539,7 +538,7 @@ dependencies = [ "serde_json", "serde_json_lenient", "settings", - "shlex 1.3.0", + "shlex 2.0.1", "streaming_diff", "task", "telemetry", @@ -561,17 +560,6 @@ dependencies = [ "zed_actions", ] -[[package]] -name = "ahash" -version = "0.7.8" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "891477e0c6a8957309ee5c45a6368af3ae14bb510732d2684ffa19af310920f9" -dependencies = [ - "getrandom 0.2.16", - "once_cell", - "version_check", -] - [[package]] name = "ahash" version = "0.8.12" @@ -2209,8 +2197,6 @@ dependencies = [ "cexpr", "clang-sys", "itertools 0.13.0", - "log", - "prettyplease", "proc-macro2", "quote", "regex", @@ -2279,18 +2265,6 @@ dependencies = [ "core2", ] -[[package]] -name = "bitvec" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" -dependencies = [ - "funty", - "radium", - "tap", - "wyz", -] - [[package]] name = "block" version = "0.1.6" @@ -2387,29 +2361,6 @@ version = "0.2.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "dc0b364ead1874514c8c2855ab558056ebfeb775653e7ae45ff72f28f8f3166c" -[[package]] -name = "borsh" -version = "1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad8646f98db542e39fc66e68a20b2144f6a732636df7c2354e74645faaa433ce" -dependencies = [ - "borsh-derive", - "cfg_aliases", -] - -[[package]] -name = "borsh-derive" -version = "1.5.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "fdd1d3c0c2f5833f22386f252fe8ed005c7f59fdcddeef025c01b4c3b9fd9ac3" -dependencies = [ - "once_cell", - "proc-macro-crate", - "proc-macro2", - "quote", - "syn 2.0.117", -] - [[package]] name = "breadcrumbs" version = "0.1.0" @@ -2498,28 +2449,6 @@ version = "1.2.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "64fa3c856b712db6612c019f14756e64e4bcea13337a6b33b696333a9eaa2d06" -[[package]] -name = "bytecheck" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23cdc57ce23ac53c931e88a43d06d070a6fd142f2617be5855eb75efc9beb1c2" -dependencies = [ - "bytecheck_derive", - "ptr_meta", - "simdutf8", -] - -[[package]] -name = "bytecheck_derive" -version = "0.6.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3db406d29fbcd95542e92559bed4d8ad92636d1ca8b3b72ede10b4bcc010e659" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "bytecount" version = "0.6.9" @@ -2625,7 +2554,7 @@ version = "0.56.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "801927ee168e17809ab8901d9f01f700cd7d8d6a6527997fee44e4b0327a253c" dependencies = [ - "ahash 0.8.12", + "ahash", "cached_proc_macro", "cached_proc_macro_types", "hashbrown 0.15.5", @@ -2779,15 +2708,6 @@ dependencies = [ "rustix", ] -[[package]] -name = "cargo-platform" -version = "0.1.9" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e35af189006b9c0f00a064685c727031e3ed2d8020f7ba284d78cc2671bd36ea" -dependencies = [ - "serde", -] - [[package]] name = "cargo-platform" version = "0.3.2" @@ -2798,20 +2718,6 @@ dependencies = [ "serde_core", ] -[[package]] -name = "cargo_metadata" -version = "0.19.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dd5eb614ed4c27c5d706420e4320fbe3216ab31fa1c33cd8246ac36dae4479ba" -dependencies = [ - "camino", - "cargo-platform 0.1.9", - "semver", - "serde", - "serde_json", - "thiserror 2.0.17", -] - [[package]] name = "cargo_metadata" version = "0.23.1" @@ -2819,7 +2725,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ef987d17b0a113becdd19d3d0022d04d7ef41f9efe4f3fb63ac44ba61df3ade9" dependencies = [ "camino", - "cargo-platform 0.3.2", + "cargo-platform", "semver", "serde", "serde_json", @@ -3029,12 +2935,6 @@ dependencies = [ "zeroize", ] -[[package]] -name = "circular-buffer" -version = "1.2.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "14c638459986b83c2b885179bd4ea6a2cbb05697b001501a56adb3a3d230803b" - [[package]] name = "clang-sys" version = "1.8.1" @@ -4308,14 +4208,14 @@ dependencies = [ "crash-handler", "libc", "log", - "mach2 0.5.0", + "mach2 0.6.0", "minidumper", "parking_lot", "serde", "serde_json", "system_specs", "windows 0.62.2", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.13.3", ] [[package]] @@ -5058,9 +4958,9 @@ dependencies = [ "serde", "serde_json", "serde_json_lenient", - "serde_yaml", + "serde_yaml_ng", "settings", - "shlex 1.3.0", + "shlex 2.0.1", "ui", "util", "walkdir", @@ -5174,7 +5074,6 @@ checksum = "1e0e367e4e7da84520dedcac1901e4da967309406d1e51017ae1abfb97adbd38" dependencies = [ "bitflags 2.13.1", "block2 0.6.2", - "libc", "objc2 0.6.3", ] @@ -5420,7 +5319,7 @@ dependencies = [ "zed_credentials_provider", "zeta_prompt", "zlog", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.13.3", ] [[package]] @@ -6276,7 +6175,6 @@ dependencies = [ "language", "log", "markdown", - "num-format", "paths", "picker", "project", @@ -6333,9 +6231,6 @@ name = "fastrand" version = "2.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" -dependencies = [ - "getrandom 0.2.16", -] [[package]] name = "fax" @@ -6561,7 +6456,6 @@ version = "0.12.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "5e139bc46ca777eb5efaf62df0ab8cc5fd400866427e56c68b22e414e53bd3be" dependencies = [ - "fastrand 2.3.0", "futures-core", "futures-sink", "spin 0.9.8", @@ -6726,7 +6620,7 @@ dependencies = [ "is_executable", "libc", "log", - "notify 9.0.0-rc.4", + "notify", "parking_lot", "path", "paths", @@ -6783,27 +6677,12 @@ version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "42703706b716c37f96a77aea830392ad231f44c9e9a67872fa5548707e11b11c" -[[package]] -name = "fsevent-sys" -version = "4.1.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76ee7a02da4d231650c7cea31349b889be2f45ddb3ef3032d2ec8185f6313fd2" -dependencies = [ - "libc", -] - [[package]] name = "fuchsia-cprng" version = "0.1.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a06f77d526c1a601b7c4cdd98f54b5eaabffc14d5f2f0296febdc7f357c6d3ba" -[[package]] -name = "funty" -version = "2.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" - [[package]] name = "futures" version = "0.1.31" @@ -6971,7 +6850,8 @@ dependencies = [ "fuzzy", "gpui", "gpui_util", - "nucleo", + "nucleo-matcher", + "parking_lot", "path", ] @@ -6981,7 +6861,7 @@ version = "0.2.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0c75195ebd4c5589a505e1f0bf81052c52f55dfa40c1afefac1f95b67846adb1" dependencies = [ - "ahash 0.8.12", + "ahash", "crossbeam-utils", "fnv", "itertools 0.10.5", @@ -7525,7 +7405,6 @@ dependencies = [ "async-task", "backtrace", "bench_metrics", - "bindgen", "bitflags 2.13.1", "chrono", "collections", @@ -7594,7 +7473,6 @@ dependencies = [ "web-sys", "web-time", "windows 0.62.2", - "zed-font-kit", "zed-scap", ] @@ -7618,7 +7496,7 @@ dependencies = [ "image", "libc", "log", - "mach2 0.5.0", + "mach2 0.6.0", "metal", "objc2 0.6.3", "objc2-foundation 0.3.2", @@ -7907,9 +7785,9 @@ version = "0.18.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "790eaa3f2acc0210783d4af5ab8fe019ab07935d8dc0e64324120bbee9b142b7" dependencies = [ - "ahash 0.8.12", + "ahash", "camino", - "cargo_metadata 0.23.1", + "cargo_metadata", "cfg-if", "debug-ignore", "fixedbitset", @@ -8051,9 +7929,6 @@ name = "hashbrown" version = "0.12.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" -dependencies = [ - "ahash 0.7.8", -] [[package]] name = "hashbrown" @@ -8061,7 +7936,7 @@ version = "0.14.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" dependencies = [ - "ahash 0.8.12", + "ahash", "allocator-api2", ] @@ -8191,7 +8066,6 @@ dependencies = [ "lmdb-master-sys", "once_cell", "page_size", - "serde", "synchronoise", "url", ] @@ -8372,7 +8246,6 @@ dependencies = [ "async-fs", "async-tar", "bytes 1.11.1", - "derive_more", "futures 0.3.34", "http 1.3.1", "http-body 1.0.1", @@ -8920,17 +8793,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "inotify" -version = "0.9.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f8069d3ec154eb856955c1c0fbffefbf5f3c40a104ec912d4797314c1801abff" -dependencies = [ - "bitflags 1.3.2", - "inotify-sys", - "libc", -] - [[package]] name = "inotify" version = "0.11.0" @@ -8994,7 +8856,6 @@ dependencies = [ "theme_settings", "ui", "util", - "util_macros", "workspace", "zed_actions", ] @@ -9096,7 +8957,7 @@ dependencies = [ "fnv", "lazy_static", "libc", - "mio 1.2.0", + "mio", "rand 0.8.6", "serde", "tempfile", @@ -9385,7 +9246,7 @@ version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "152999731bfbe0bb82d561550be73b0c31a9827d6ebe3fe96ad47563703b5328" dependencies = [ - "ahash 0.8.12", + "ahash", "bytecount", "data-encoding", "email_address", @@ -9423,7 +9284,7 @@ version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "24373bc85409cb935a46af0ffb41294c5372c08cf9b0709913d908154cd10582" dependencies = [ - "ahash 0.8.12", + "ahash", "bytecount", "fraction", "num-cmp", @@ -9737,7 +9598,7 @@ dependencies = [ "collections", "futures 0.3.34", "gpui_shared_string", - "http_client", + "http 1.3.1", "log", "partial-json-fixer", "pretty_assertions", @@ -10852,27 +10713,19 @@ dependencies = [ "clap_complete", "elasticlunr-rs", "env_logger 0.11.8", - "futures-util", "handlebars 5.1.2", - "ignore", "log", "memchr", - "notify 6.1.1", - "notify-debouncer-mini", "once_cell", "opener", - "pathdiff", "pulldown-cmark 0.10.3", "regex", "serde", "serde_json", "shlex 1.3.0", "tempfile", - "tokio", "toml 0.5.11", "topological-sort", - "walkdir", - "warp", ] [[package]] @@ -11196,18 +11049,6 @@ dependencies = [ "simd-adler32", ] -[[package]] -name = "mio" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" -dependencies = [ - "libc", - "log", - "wasi", - "windows-sys 0.48.0", -] - [[package]] name = "mio" version = "1.2.0" @@ -11538,36 +11379,17 @@ dependencies = [ "zed_actions", ] -[[package]] -name = "notify" -version = "6.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6205bd8bb1e454ad2e27422015fb5e4f2bcc7e08fa8f27058670d208324a4d2d" -dependencies = [ - "bitflags 2.13.1", - "crossbeam-channel", - "filetime", - "fsevent-sys", - "inotify 0.9.6", - "kqueue", - "libc", - "log", - "mio 0.8.11", - "walkdir", - "windows-sys 0.48.0", -] - [[package]] name = "notify" version = "9.0.0-rc.4" source = "git+https://github.com/zed-industries/notify?rev=d842f16b2716bd60f09caf3ae3a894237ab38f54#d842f16b2716bd60f09caf3ae3a894237ab38f54" dependencies = [ "bitflags 2.13.1", - "inotify 0.11.0", + "inotify", "kqueue", "libc", "log", - "mio 1.2.0", + "mio", "notify-types", "objc2-core-foundation", "objc2-core-services", @@ -11576,17 +11398,6 @@ dependencies = [ "xxhash-rust", ] -[[package]] -name = "notify-debouncer-mini" -version = "0.4.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5d40b221972a1fc5ef4d858a2f671fb34c75983eb385463dff3780eeff6a9d43" -dependencies = [ - "crossbeam-channel", - "log", - "notify 6.1.1", -] - [[package]] name = "notify-rust" version = "4.18.0" @@ -11627,17 +11438,6 @@ dependencies = [ "windows-sys 0.61.2", ] -[[package]] -name = "nucleo" -version = "0.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5262af4c94921c2646c5ac6ff7900c2af9cbb08dc26a797e18130a7019c039d4" -dependencies = [ - "nucleo-matcher", - "parking_lot", - "rayon", -] - [[package]] name = "nucleo-matcher" version = "0.3.1" @@ -11737,16 +11537,6 @@ dependencies = [ "syn 2.0.117", ] -[[package]] -name = "num-format" -version = "0.4.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "a652d9771a63711fd3c3deb670acfbe5c30a4072e664d7a3bf5a9e1056ac72c3" -dependencies = [ - "arrayvec", - "itoa", -] - [[package]] name = "num-integer" version = "0.1.46" @@ -12027,16 +11817,6 @@ dependencies = [ "objc2-metal 0.2.2", ] -[[package]] -name = "objc2-core-location" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ca347214e24bc973fc025fd0d36ebb179ff30536ed1f80252706db19ee452009" -dependencies = [ - "objc2 0.6.3", - "objc2-foundation 0.3.2", -] - [[package]] name = "objc2-core-media" version = "0.3.2" @@ -12153,17 +11933,6 @@ dependencies = [ "objc2-foundation 0.3.2", ] -[[package]] -name = "objc2-open-directory" -version = "0.3.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bb82bed227edf5201dfedf072bba4015a33d3d4a98519837295a90f0a23f676d" -dependencies = [ - "objc2 0.6.3", - "objc2-core-foundation", - "objc2-foundation 0.3.2", -] - [[package]] name = "objc2-quartz-core" version = "0.2.2" @@ -12213,7 +11982,6 @@ dependencies = [ "bitflags 2.13.1", "block2 0.6.2", "objc2 0.6.3", - "objc2-core-location", "objc2-foundation 0.3.2", ] @@ -12266,7 +12034,7 @@ dependencies = [ "async-trait", "base64 0.22.1", "bytes 1.11.1", - "cargo_metadata 0.23.1", + "cargo_metadata", "cfg-if", "chrono", "either", @@ -12308,7 +12076,7 @@ dependencies = [ "schemars 1.0.4", "serde", "serde_json", - "settings", + "settings_content", ] [[package]] @@ -12472,6 +12240,7 @@ dependencies = [ "credentials_provider", "futures 0.3.34", "gpui", + "gpui_util", "http_client", "language_model", "log", @@ -12484,7 +12253,6 @@ dependencies = [ "sha2", "smol", "url", - "util", ] [[package]] @@ -12812,6 +12580,7 @@ dependencies = [ "pretty_assertions", "serde", "tempfile", + "tendril", ] [[package]] @@ -14119,7 +13888,6 @@ dependencies = [ "async-trait", "base64 0.22.1", "buffer_diff", - "circular-buffer", "client", "clock", "collections", @@ -14521,26 +14289,6 @@ dependencies = [ "cc", ] -[[package]] -name = "ptr_meta" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0738ccf7ea06b608c10564b31debd4f5bc5e197fc8bfe088f68ae5ce81e7a4f1" -dependencies = [ - "ptr_meta_derive", -] - -[[package]] -name = "ptr_meta_derive" -version = "0.1.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "16b845dbfca988fa33db069c0e230574d15a3088f147a87b64c7589eb662c9ac" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "pulldown-cmark" version = "0.10.3" @@ -14731,12 +14479,6 @@ version = "5.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "69cdb34c158ceb288df11e18b4bd39de994f6657d83847bdffdbd7f346754b0f" -[[package]] -name = "radium" -version = "0.7.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" - [[package]] name = "rand" version = "0.3.23" @@ -14851,16 +14593,6 @@ version = "0.10.1" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "63b8176103e19a2643978565ca18b50549f6101881c443590420e4dc998a3c69" -[[package]] -name = "rand_distr" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6a8615d50dcf34fa31f7ab52692afec947c4dd0ab803cc87cb3b0b4570ff7463" -dependencies = [ - "num-traits", - "rand 0.9.4", -] - [[package]] name = "rand_pcg" version = "0.3.1" @@ -15135,7 +14867,7 @@ version = "0.51.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0aff997fc7eecb671a947b0f73f5ce4bcb4ad3534fd5bff2dd752718a8107525" dependencies = [ - "ahash 0.8.12", + "ahash", "fluent-uri", "getrandom 0.3.4", "hashbrown 0.17.1", @@ -15232,7 +14964,7 @@ dependencies = [ "semver", "serde", "serde_json", - "settings", + "settings_content", "smol", "telemetry", "tempfile", @@ -15277,7 +15009,6 @@ dependencies = [ "anyhow", "askpass", "async-channel 2.5.0", - "cargo_toml", "clap", "client", "clock", @@ -15330,7 +15061,7 @@ dependencies = [ "theme", "theme_settings", "thiserror 2.0.17", - "toml 0.9.8", + "toml_edit 0.22.27", "unindent", "util", "uuid", @@ -15341,15 +15072,6 @@ dependencies = [ "zlog", ] -[[package]] -name = "rend" -version = "0.4.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "71fe3824f5629716b1589be05dacd749f6aa084c87e00e016714a8cdfccc997c" -dependencies = [ - "bytecheck", -] - [[package]] name = "renderdoc-sys" version = "1.1.0" @@ -15394,7 +15116,7 @@ dependencies = [ "serde", "serde_json", "settings", - "shlex 1.3.0", + "shlex 2.0.1", "smol", "task", "telemetry", @@ -15559,35 +15281,6 @@ dependencies = [ "windows-sys 0.52.0", ] -[[package]] -name = "rkyv" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9008cd6385b9e161d8229e1f6549dd23c3d022f132a2ea37ac3a10ac4935779b" -dependencies = [ - "bitvec", - "bytecheck", - "bytes 1.11.1", - "hashbrown 0.12.3", - "ptr_meta", - "rend", - "rkyv_derive", - "seahash", - "tinyvec", - "uuid", -] - -[[package]] -name = "rkyv_derive" -version = "0.7.45" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "503d1d27590a2b0a3a4ca4c94755aa2875657196ecbf401a42eff41d7de532c0" -dependencies = [ - "proc-macro2", - "quote", - "syn 1.0.109", -] - [[package]] name = "rle-decode-fast" version = "1.0.3" @@ -15624,8 +15317,6 @@ dependencies = [ "dasp_sample", "hound", "num-rational", - "rand 0.9.4", - "rand_distr", "rtrb", "symphonia", "thiserror 2.0.17", @@ -15638,6 +15329,7 @@ dependencies = [ "criterion", "ctor", "gpui", + "gpui_util", "heapless", "log", "rand 0.9.4", @@ -15698,6 +15390,7 @@ dependencies = [ "collections", "futures 0.3.34", "gpui", + "gpui_util", "parking_lot", "proto", "rand 0.9.4", @@ -15707,9 +15400,8 @@ dependencies = [ "sha2", "strum 0.28.0", "tracing", - "util", "zlog", - "zstd 0.11.2+zstd.1.5.2", + "zstd 0.13.3", ] [[package]] @@ -15817,13 +15509,8 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "35affe401787a9bd846712274d97654355d21b2a2c092a3139aabe31e9022282" dependencies = [ "arrayvec", - "borsh", - "bytes 1.11.1", "num-traits", - "rand 0.8.6", - "rkyv", "serde", - "serde_json", ] [[package]] @@ -16276,11 +15963,9 @@ version = "0.32.7" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8a5d1c518eaf5eda38e5773f902b26ab6d5e9e9e2bb2349ca6c64cf96f80448c" dependencies = [ - "bigdecimal", "chrono", "inherent", "ordered-float 4.6.0", - "rust_decimal", "serde_json", "time", "uuid", @@ -16292,9 +15977,7 @@ version = "0.7.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "b0019f47430f7995af63deda77e238c17323359af241233ec768aba1faea7608" dependencies = [ - "bigdecimal", "chrono", - "rust_decimal", "sea-query", "serde_json", "sqlx", @@ -16728,7 +16411,6 @@ dependencies = [ "tree-sitter", "tree-sitter-json", "unindent", - "util", ] [[package]] @@ -16736,7 +16418,6 @@ name = "settings_macros" version = "0.1.0" dependencies = [ "quote", - "settings", "syn 2.0.117", ] @@ -17321,10 +17002,10 @@ dependencies = [ "libsqlite3-sys", "log", "parking_lot", + "path", "pollster 0.4.0", "sqlformat", "thread_local", - "util", "uuid", ] @@ -17367,7 +17048,6 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "ee6798b1838b6a0f69c007c133b8df5866302197e404e8b6ee8ed3e3a5e68dc6" dependencies = [ "base64 0.22.1", - "bigdecimal", "bytes 1.11.1", "chrono", "crc", @@ -17385,7 +17065,6 @@ dependencies = [ "memchr", "once_cell", "percent-encoding", - "rust_decimal", "rustls", "serde", "serde_json", @@ -17447,7 +17126,6 @@ checksum = "aa003f0038df784eb8fecbbac13affe3da23b45194bd57dba231c8f48199c526" dependencies = [ "atoi", "base64 0.22.1", - "bigdecimal", "bitflags 2.13.1", "byteorder", "bytes 1.11.1", @@ -17472,7 +17150,6 @@ dependencies = [ "percent-encoding", "rand 0.8.6", "rsa", - "rust_decimal", "serde", "sha1", "sha2", @@ -17494,7 +17171,6 @@ checksum = "db58fcd5a53cf07c184b154801ff91347e4c30d17a3562a635ff028ad5deda46" dependencies = [ "atoi", "base64 0.22.1", - "bigdecimal", "bitflags 2.13.1", "byteorder", "chrono", @@ -17512,10 +17188,8 @@ dependencies = [ "log", "md-5", "memchr", - "num-bigint", "once_cell", "rand 0.8.6", - "rust_decimal", "serde", "serde_json", "sha2", @@ -18019,7 +17693,6 @@ dependencies = [ "ntapi", "objc2-core-foundation", "objc2-io-kit", - "objc2-open-directory", "windows 0.62.2", ] @@ -18168,12 +17841,6 @@ dependencies = [ "objc", ] -[[package]] -name = "tap" -version = "1.0.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" - [[package]] name = "target-lexicon" version = "0.13.5" @@ -18375,7 +18042,7 @@ dependencies = [ "serde_json", "settings", "shellexpand", - "shlex 1.3.0", + "shlex 2.0.1", "task", "terminal", "theme", @@ -18395,6 +18062,7 @@ dependencies = [ "collections", "ctor", "gpui", + "gpui_util", "log", "parking_lot", "postage", @@ -18740,7 +18408,7 @@ checksum = "b67dee974fe86fd92cc45b7a95fdd2f99a36a6d7b0d431a231178d3d670bbcc6" dependencies = [ "bytes 1.11.1", "libc", - "mio 1.2.0", + "mio", "parking_lot", "pin-project-lite", "signal-hook-registry", @@ -18826,18 +18494,6 @@ dependencies = [ "tungstenite 0.20.1", ] -[[package]] -name = "tokio-tungstenite" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c83b561d025642014097b66e6c1bb422783339e0909e4429cde4749d1990bc38" -dependencies = [ - "futures-util", - "log", - "tokio", - "tungstenite 0.21.0", -] - [[package]] name = "tokio-tungstenite" version = "0.28.0" @@ -19477,25 +19133,6 @@ dependencies = [ "utf-8", ] -[[package]] -name = "tungstenite" -version = "0.21.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ef1a641ea34f399a848dea702823bbecfb4c486f911735368f1f137cb8257e1" -dependencies = [ - "byteorder", - "bytes 1.11.1", - "data-encoding", - "http 1.3.1", - "httparse", - "log", - "rand 0.8.6", - "sha1", - "thiserror 1.0.69", - "url", - "utf-8", -] - [[package]] name = "tungstenite" version = "0.28.0" @@ -19567,7 +19204,6 @@ dependencies = [ "itertools 0.14.0", "log", "menu", - "num-format", "schemars 1.0.4", "serde", "settings", @@ -19837,7 +19473,7 @@ dependencies = [ "itertools 0.14.0", "libc", "log", - "mach2 0.5.0", + "mach2 0.6.0", "nix", "path", "percent-encoding", @@ -19848,10 +19484,9 @@ dependencies = [ "serde", "serde_json", "serde_json_lenient", - "shlex 1.3.0", + "shlex 2.0.1", "smol", "tempfile", - "tendril", "unicase", "url", "util_macros", @@ -20108,34 +19743,6 @@ dependencies = [ "try-lock", ] -[[package]] -name = "warp" -version = "0.3.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "4378d202ff965b011c64817db11d5829506d3404edeadb61f190d111da3f231c" -dependencies = [ - "bytes 1.11.1", - "futures-channel", - "futures-util", - "headers", - "http 0.2.12", - "hyper 0.14.32", - "log", - "mime", - "mime_guess", - "percent-encoding", - "pin-project", - "scoped-tls", - "serde", - "serde_json", - "serde_urlencoded", - "tokio", - "tokio-tungstenite 0.21.0", - "tokio-util", - "tower-service", - "tracing", -] - [[package]] name = "wasi" version = "0.11.1+wasi-snapshot-preview1" @@ -20688,7 +20295,6 @@ dependencies = [ "pori", "regex", "thiserror 2.0.17", - "walkdir", ] [[package]] @@ -22404,15 +22010,6 @@ version = "0.6.4" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "3ad82d2a33cdc9674dc7465672f271e096168fcdbe0f799d9e6db8c5892679dc" -[[package]] -name = "wyz" -version = "0.5.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" -dependencies = [ - "tap", -] - [[package]] name = "x11" version = "2.21.0" @@ -22462,6 +22059,7 @@ dependencies = [ "credentials_provider", "futures 0.3.34", "gpui", + "gpui_util", "http_client", "language_model", "log", @@ -22474,7 +22072,6 @@ dependencies = [ "sha2", "smol", "url", - "util", "x_ai", ] @@ -22575,7 +22172,7 @@ dependencies = [ "annotate-snippets", "anyhow", "backtrace", - "cargo_metadata 0.19.2", + "cargo_metadata", "cargo_toml", "clap", "compliance", @@ -23073,7 +22670,7 @@ name = "zed-xim" version = "0.4.0-zed" source = "git+https://github.com/zed-industries/xim-rs.git?rev=16f35a2c881b815a2b6cdfd6687988e84f8447d8#16f35a2c881b815a2b6cdfd6687988e84f8447d8" dependencies = [ - "ahash 0.8.12", + "ahash", "hashbrown 0.14.5", "log", "x11rb", diff --git a/Cargo.toml b/Cargo.toml index 2bf720afb27..6ce47ccbc0b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -304,7 +304,7 @@ buffer_diff = { path = "crates/buffer_diff" } call = { path = "crates/call" } call_hierarchy = { path = "crates/call_hierarchy" } channel = { path = "crates/channel" } -cli = { path = "crates/cli" } +cli = { path = "crates/cli", default-features = false } client = { path = "crates/client" } clock = { path = "crates/clock" } cloud_api_client = { path = "crates/cloud_api_client" } @@ -337,7 +337,7 @@ dev_container = { path = "crates/dev_container" } diagnostics = { path = "crates/diagnostics" } edit_prediction = { path = "crates/edit_prediction" } edit_prediction_context = { path = "crates/edit_prediction_context" } -edit_prediction_metrics = { path = "crates/edit_prediction_metrics" } +edit_prediction_metrics = { path = "crates/edit_prediction_metrics", features = ["tree-sitter"] } edit_prediction_types = { path = "crates/edit_prediction_types" } edit_prediction_ui = { path = "crates/edit_prediction_ui" } editor = { path = "crates/editor" } @@ -433,7 +433,7 @@ outline = { path = "crates/outline" } outline_panel = { path = "crates/outline_panel" } path = { path = "crates/path" } paths = { path = "crates/paths" } -perf = { path = "tooling/perf" } +perf = { path = "tooling/perf", default-features = false } picker = { path = "crates/picker" } picker_preview = { path = "crates/picker_preview" } platform_title_bar = { path = "crates/platform_title_bar" } @@ -452,7 +452,7 @@ remote_connection = { path = "crates/remote_connection" } remote_server = { path = "crates/remote_server" } repl = { path = "crates/repl" } reqwest_client = { path = "crates/reqwest_client" } -rodio = { git = "https://github.com/RustAudio/rodio", rev = "e50e726ddd0292f6ef9de0dda6b90af4ed1fb66a", default-features = false, features = ["wav", "playback", "wav_output", "recording", "dither"] } +rodio = { git = "https://github.com/RustAudio/rodio", rev = "e50e726ddd0292f6ef9de0dda6b90af4ed1fb66a", default-features = false, features = ["wav", "playback", "wav_output", "recording"] } rope = { path = "crates/rope" } rpc = { path = "crates/rpc" } sandbox = { path = "crates/sandbox" } @@ -505,6 +505,7 @@ watch = { path = "crates/watch" } web_search = { path = "crates/web_search" } web_search_providers = { path = "crates/web_search_providers" } which_key = { path = "crates/which_key" } +windows_resources = { path = "crates/windows_resources" } workspace = { path = "crates/workspace" } worktree = { path = "crates/worktree" } x_ai = { path = "crates/x_ai" } @@ -535,19 +536,17 @@ arc-swap = "1.9.0" ashpd = { version = "0.13", default-features = false, features = [ "async-io", "inhibit", - "notification", "open_uri", "file_chooser", - "settings", - "trash" + "settings" ] } -async-channel = "2.5.0" +async-channel = { version = "2.5", default-features = false } async-compat = "0.2.1" async-compression = { version = "0.4", features = ["bzip2", "gzip", "futures-io"] } async-dispatcher = "0.1" async-fs = "2.1" async-io = "2.6.0" -async-lock = "3.4.2" +async-lock = { version = "3.4", default-features = false } async-pipe = { git = "https://github.com/zed-industries/async-pipe-rs", rev = "82d00a04211cf4e1236029aa03e6b6ce2a74c553" } # `unstable` is required to compile async-tar's Windows symlink support. async-process = "2.5.0" @@ -571,6 +570,8 @@ aws-sdk-bedrockruntime = { version = "1.112.0", default-features = false, featur "behavior-version-latest", "rt-tokio", ] } +aws-sdk-kinesis = { version = "1.51", default-features = false } +aws-sdk-s3 = { version = "1.15", default-features = false } aws-sigv4 = { version = "1.4.0", features = ["http1"] } aws-smithy-runtime-api = { version = "1.9.2", features = ["http-1x", "client"] } aws-smithy-types = { version = "1.3.4", features = ["http-body-1-x"] } @@ -580,17 +581,17 @@ betlang = "0.1.1" bitflags = "2.6.0" block2 = "0.6" brush-parser = "0.3" +bytemuck = "1" bytes = "1.0" -cargo_metadata = "0.19" +cargo_metadata = "0.23" cargo_toml = "0.21" cbindgen = { version = "0.28.0", default-features = false } chardetng = "0.1" -chrono = { version = "0.4", features = ["serde"] } +chrono = { version = "0.4", default-features = false, features = ["std", "serde"] } ciborium = "0.2" -circular-buffer = "1.0" clap = { version = "4.4", features = ["derive", "wrap_help"] } -clap_complete = { version = "4.4" } -clap_complete_nushell = { version = "4.4" } +clap_complete = "4.4" +clap_complete_nushell = "4.4" cocoa = "=0.26.0" console = "0.16" console_error_panic_hook = "0.1.7" @@ -599,8 +600,10 @@ convert_case = "0.11.0" core-foundation = "0.10" core-foundation-sys = "0.8.6" core-graphics = "0.24" +core-services = "1" core-text = "21" -core-video = { version = "0.5.2", features = ["metal"] } +core-video = { version = "0.5", default-features = false, features = ["link"] } +coreaudio-rs = { version = "0.12", default-features = false } cpal = "0.17" crash-handler = "0.8" criterion = { version = "0.8.2", features = ["html_reports"] } @@ -609,22 +612,11 @@ crossbeam-queue = "0.3.12" ctor = "1.0.12" dap-types = { git = "https://github.com/zed-industries/dap-types", rev = "1b461b310481d01e02b2603c16d7144b926339f8" } dashmap = "6.0" -derive_more = { version = "2.1.1", features = [ - "add", - "add_assign", - "deref", - "deref_mut", - "display", - "from", - "from_str", - "mul", - "mul_assign", - "not", -] } +derive_more = { version = "2.1", features = ["deref", "deref_mut", "from_str"] } dialoguer = { version = "0.12", default-features = false } diffy = "0.4.2" dirs = "6.0" -dispatch2 = "0.3.1" +dispatch2 = { version = "0.3", default-features = false, features = ["std"] } documented = "0.10" dotenvy = "0.15.0" dunce = "1.0" @@ -635,7 +627,8 @@ env_logger = "0.11" etagere = "0.2" exec = "0.3.1" fancy-regex = "0.19" -flume = "0.12" +flume = { version = "0.12", default-features = false, features = ["async"] } +font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "94b0f28166665e8fd2f53ff6d268a14955c82269", package = "zed-font-kit", version = "0.14.1-zed", default-features = false } foreign-types = "0.5" fork = "0.4.0" futures = "0.3.34" @@ -647,7 +640,7 @@ handlebars = "4.3" hdrhistogram = { version = "7", default-features = false } heapless = "0.9.2" heck = "0.5" -heed = { version = "0.21.0", features = ["read-txn-no-tls"] } +heed = { version = "0.21", default-features = false, features = ["read-txn-no-tls", "serde-bincode", "serde-json"] } hex = "0.4.3" html5ever = "0.39" http = "1.1" @@ -675,14 +668,15 @@ image = { version = "0.25.1", default-features = false, features = [ "tiff", "webp", ] } -imara-diff = "0.2.0" +imara-diff = { version = "0.2", default-features = false } indexmap = { version = "2.7.0", features = ["serde"] } indoc = "2" inventory = "0.3.19" +is_executable = "1.0" itertools = "0.14.0" js-sys = "0.3" jsonschema = { version = "0.51", default-features = false } -jsonwebtoken = "10.0" +jsonwebtoken = { version = "10.0", default-features = false } jupyter-protocol = "1.4.0" jupyter-websocket-client = "1.1.0" libc = "0.2" @@ -690,11 +684,13 @@ libsqlite3-sys = { version = "0.30.1", features = ["bundled"] } libwebrtc = "0.3.26" linkify = "0.10.0" livekit = { version = "0.7.32", features = ["tokio", "rustls-tls-native-roots"] } -log = { version = "0.4.16", features = ["kv_unstable_serde", "serde"] } +log = { version = "0.4", default-features = false, features = ["std"] } lru = "0.16" lsp-types = { git = "https://github.com/zed-industries/lsp-types", rev = "f1783e63a7f4eb4397bf51d4148b4895a1f7ab16" } -mach2 = "0.5" +mach2 = "0.6" markup5ever_rcdom = "0.39" +mdbook = { version = "=0.4.40", default-features = false, features = ["search"] } +merman = { version = "=0.8.0-alpha.5", default-features = false } metal = "0.33" mime = "0.3.17" minidumper = "0.11" @@ -703,8 +699,7 @@ nanoid = "0.4" nbformat = "1.2.0" nix = "0.30" notify-rust = "4" -nucleo = "0.5" -num-format = "0.4.4" +nucleo = { package = "nucleo-matcher", version = "0.3" } objc = "0.2" objc2 = "0.6" objc2-app-kit = { version = "0.3.2", default-features = false, features = [ @@ -735,7 +730,6 @@ objc2-core-video = { version = "=0.3.2", default-features = false, features = [" objc2-foundation = { version = "=0.3.2", default-features = false, features = [ "NSArray", "NSAttributedString", - "NSBundle", "NSCoder", "NSData", "NSDate", @@ -743,7 +737,6 @@ objc2-foundation = { version = "=0.3.2", default-features = false, features = [ "NSEnumerator", "NSError", "NSGeometry", - "NSNotification", "NSNull", "NSObjCRuntime", "NSObject", @@ -753,7 +746,6 @@ objc2-foundation = { version = "=0.3.2", default-features = false, features = [ "NSSet", "NSString", "NSURL", - "NSUndoManager", "NSValue", "objc2-core-foundation", "std", @@ -768,7 +760,20 @@ objc2-screen-capture-kit = { version = "=0.3.2", default-features = false, featu "SCStream", "std" ] } -objc2-user-notifications = "0.3" +objc2-user-notifications = { version = "0.3", default-features = false, features = [ + "std", + "block2", + "UNNotification", + "UNNotificationAction", + "UNNotificationCategory", + "UNNotificationContent", + "UNNotificationRequest", + "UNNotificationResponse", + "UNNotificationTrigger", + "UNUserNotificationCenter", +] } +octocrab = { version = "0.49", default-features = false } +oo7 = { version = "0.6", default-features = false } open = "5.0.0" ordered-float = "5" palette = { version = "0.7.5", default-features = false, features = ["std"] } @@ -786,7 +791,8 @@ pet-poetry = { git = "https://github.com/zed-industries/python-environment-tools pet-reporter = { git = "https://github.com/zed-industries/python-environment-tools.git", rev = "5aad7164bfc2a58977b103c8ef8fdd7302ed2e9f" } pet-virtualenv = { git = "https://github.com/zed-industries/python-environment-tools.git", rev = "5aad7164bfc2a58977b103c8ef8fdd7302ed2e9f" } piper = "0.2" -postage = { version = "0.5", features = ["futures-traits"] } +plist = "1.3" +postage = { version = "0.5", default-features = false } pretty_assertions = { version = "1.3.0", features = ["unstable"] } proc-macro2 = "1.0.93" profiling = "1" @@ -795,23 +801,21 @@ pollster = "0.4.0" proptest = { git = "https://github.com/proptest-rs/proptest", rev = "3dca198a8fef1b32e3a66f1e1897c955b4dc5b5b", features = ["attr-macro"] } proptest-derive = "0.8.0" prost = "0.14" -prost-build = "0.14" +prost-build = { version = "0.14", default-features = false } prost-types = "0.14" protox = "0.9" proxyvars = "0.2" pulldown-cmark = { version = "0.13.0", default-features = false } quick-xml = "0.41" quote = "1.0.9" -rand = "0.9" +rand = { version = "0.9", default-features = false, features = ["std", "std_rng", "os_rng"] } raw-window-handle = "0.6" rayon = "1.8" -regex = "1.5" +regex = { version = "1.5", default-features = false, features = ["std", "perf"] } # WARNING: If you change this, you must also publish a new version of zed-reqwest to crates.io reqwest = { git = "https://github.com/zed-industries/reqwest.git", rev = "33bc764aa15ff7b200bf7c93bd96e24878d53e14", default-features = false, features = [ - "charset", "http2", "macos-system-configuration", - "multipart", "rustls-tls-native-roots", "socks", "stream", @@ -822,21 +826,22 @@ resvg = { version = "0.46.0", default-features = false, features = [ "memmap-fonts", "raster-images", ] } -rsa = "0.9.6" +rsa = { version = "0.9", default-features = false, features = ["std", "u64_digit"] } runtimelib = { version = "1.4.0", default-features = false, features = [ "async-dispatcher-runtime", "aws-lc-rs" ] } rust-embed = { version = "8.11", features = ["include-exclude", "compression"] } rustc-hash = "2.1.0" rustix = { version = "1.1", features = ["fs"] } -rustls = { version = "0.23.26" } +rustls = "0.23.26" rustls-platform-verifier = "0.7" # WARNING: If you change this, you must also publish a new version of zed-scap to crates.io scap = { git = "https://github.com/zed-industries/scap", rev = "4afea48c3b002197176fb19cd0f9b180dd36eaac", default-features = false, package = "zed-scap", version = "0.0.8-zed" } -schemars = { version = "1.0", features = ["indexmap2"] } +schemars = { version = "1.0", default-features = false, features = ["std", "indexmap2"] } +sea-orm = { version = "=1.1.10", default-features = false } seccompiler = "0.5" semver = { version = "1.0", features = ["serde"] } -serde = { version = "1.0.221", features = ["derive", "rc"] } +serde = { version = "1.0", features = ["rc"] } serde_json = { version = "1.0.144", features = ["preserve_order", "raw_value"] } serde_json_lenient = { version = "0.2", features = [ "preserve_order", @@ -844,25 +849,30 @@ serde_json_lenient = { version = "0.2", features = [ ] } serde_path_to_error = "0.1.17" serde_urlencoded = "0.7" -serde_yaml = "0.9.34" +serde_yaml = { package = "serde_yaml_ng", version = "0.10" } serde_yaml_ng = "0.10" sha2 = "0.10" shellexpand = "3.1" -shlex = "1.3.0" -simplelog = "0.12.2" +shlex = "2.0" +similar = "2.7" +simplelog = { version = "0.12", default-features = false } slotmap = "1.0.6" smallvec = { version = "1.6", features = ["union", "const_new"] } +spin = { version = "0.10", default-features = false, features = ["mutex", "spin_mutex", "lock_api"] } smol = "2.0" sqlformat = "0.2" +sqlx = { version = "0.8", default-features = false } stacksafe = "1.0" streaming-iterator = "0.1" strsim = "0.11" strum = { version = "0.28", features = ["derive"] } swash = "0.2.6" -syn = { version = "2.0.101", features = ["full", "extra-traits", "visit-mut"] } +syn = { version = "2.0", default-features = false, features = ["proc-macro"] } sys-locale = "0.3.1" -sysinfo = "0.39" +sysinfo = { version = "0.39", default-features = false, features = ["system"] } +taffy = { version = "=0.13.0", default-features = false } tempfile = "3.20.0" +tendril = "0.5" thiserror = "2.0.12" time = { version = "0.3", features = [ "macros", @@ -873,17 +883,14 @@ time = { version = "0.3", features = [ "local-offset", ] } tiny_http = "0.12" -tokio = { version = "1" } +tokio = "1" tokio-rustls = { version = "0.26", default-features = false } -toml = "0.9" -toml_edit = { version = "0.22", default-features = false, features = [ - "display", - "parse", - "serde", -] } +toml = { version = "0.9", default-features = false, features = ["std", "serde", "parse"] } +toml_edit = { version = "0.22", default-features = false, features = ["parse"] } tower-http = "0.4.4" tree-sitter = { git = "https://github.com/tree-sitter/tree-sitter", rev = "43623ec9bf0eaaf7113285c46e8a09018f181b18" } tracing = "0.1.40" +tracing-subscriber = "0.3" tree-sitter-bash = "0.25.1" tree-sitter-c = "0.24.1" tree-sitter-cpp = { git = "https://github.com/tree-sitter/tree-sitter-cpp", rev = "5cb9b693cfd7bfacab1d9ff4acac1a4150700609" } @@ -917,10 +924,13 @@ unindent = "0.2.0" url = "2.2" urlencoding = "2.1.2" usvg = { version = "0.46.0", default-features = false } -uuid = { version = "1.1.2", features = ["v4", "v5", "v7", "serde"] } +uuid = { version = "1.1", features = ["serde"] } vte = { version = "0.15.0", features = ["ansi"] } walkdir = "2.5" wasm-encoder = "0.254" +# Forked because upstream is unmaintained and its worker bootstrap still calls +# the wasm-bindgen init function with the positional arguments deprecated in 0.2.93. +wasm_thread = { git = "https://github.com/zed-industries/wasm_thread", rev = "0cf96c7708dfb97ccf3da50347e25edcf75d6937", version = "0.3", features = ["es_modules"] } wasmparser = "0.254" wasmtime = { version = "48", default-features = false, features = [ "anyhow", @@ -935,80 +945,39 @@ wasmtime = { version = "48", default-features = false, features = [ wasm-bindgen = "0.2.120" wasm-bindgen-futures = "0.4" wasmtime-wasi = { version = "48", default-features = false, features = ["p2"] } -wax = "0.7" +wax = { version = "0.7", default-features = false } +web-sys = "0.3" web-time = "1.1.0" webpki-roots = "1.0.8" webrtc-sys = "0.3.23" -wgpu = "29.0.4" +wgpu = { version = "29.0", default-features = false } which = "8" windows-core = "0.62" windows-registry = "0.6.0" -yaml-rust2 = "0.8" -yawc = "0.4.2" +xkbcommon = { version = "0.8", default-features = false } +yaml-rust2 = { version = "0.8", default-features = false } +yawc = { version = "0.4", default-features = false } zeroize = "1.8" -zstd = "0.11" +zstd = { version = "0.13", default-features = false, features = ["legacy", "arrays"] } [workspace.dependencies.windows] version = "0.62" features = [ - "Data_Xml_Dom", - "Foundation_Numerics", - "Globalization_DateTimeFormatting", - "Storage_Search", - "Storage_Streams", - "System_Threading", - "UI_Notifications", - "UI_ViewManagement", - "Wdk_System_SystemServices", "Win32_Foundation", - "Win32_Globalization", - "Win32_Graphics_Direct3D", - "Win32_Graphics_Direct3D11", - "Win32_Graphics_Direct3D_Fxc", - "Win32_Graphics_DirectComposition", - "Win32_Graphics_DirectWrite", - "Win32_Graphics_DirectManipulation", - "Win32_Graphics_Dwm", - "Win32_Graphics_Dxgi", - "Win32_Graphics_Dxgi_Common", "Win32_Graphics_Gdi", - "Win32_Graphics_Imaging", - "Win32_Graphics_Hlsl", - "Win32_Networking_WinSock", "Win32_Security", - "Win32_Security_Credentials", - "Win32_Security_Cryptography", "Win32_Storage_FileSystem", - "Win32_Storage_Packaging_Appx", "Win32_System_Com", "Win32_System_Com_StructuredStorage", - "Win32_System_Console", - "Win32_System_Diagnostics_Debug", - "Win32_System_DataExchange", "Win32_System_IO", - "Win32_System_JobObjects", "Win32_System_LibraryLoader", - "Win32_System_Memory", "Win32_System_Ole", - "Win32_System_Performance", - "Win32_System_Pipes", - "Win32_System_Power", - "Win32_System_RestartManager", - "Win32_System_SystemInformation", - "Win32_System_SystemServices", "Win32_System_Threading", "Win32_System_Variant", - "Win32_System_WinRT", - "Win32_UI_Controls", - "Win32_UI_HiDpi", - "Win32_UI_Input_Ime", - "Win32_UI_Input_KeyboardAndMouse", - "Win32_UI_Input_Pointer", "Win32_UI_Shell", "Win32_UI_Shell_Common", "Win32_UI_Shell_PropertiesSystem", "Win32_UI_WindowsAndMessaging", - "Win32_Media", ] [patch.crates-io] diff --git a/crates/agent/Cargo.toml b/crates/agent/Cargo.toml index 5c7c8de3463..f38c308851f 100644 --- a/crates/agent/Cargo.toml +++ b/crates/agent/Cargo.toml @@ -47,7 +47,6 @@ indoc.workspace = true itertools.workspace = true language.workspace = true language_model.workspace = true -language_models.workspace = true log.workspace = true parking_lot.workspace = true paths.workspace = true @@ -103,6 +102,7 @@ gpui = { workspace = true, "features" = ["test-support"] } gpui_tokio.workspace = true language = { workspace = true, "features" = ["test-support"] } language_model = { workspace = true, "features" = ["test-support"] } +language_models.workspace = true lsp = { workspace = true, "features" = ["test-support"] } pretty_assertions.workspace = true project = { workspace = true, "features" = ["test-support"] } @@ -113,7 +113,7 @@ settings = { workspace = true, "features" = ["test-support"] } theme = { workspace = true, "features" = ["test-support"] } theme_settings.workspace = true -unindent = { workspace = true } +unindent.workspace = true zlog.workspace = true diff --git a/crates/agent_servers/Cargo.toml b/crates/agent_servers/Cargo.toml index 9ce7a7e5702..cc850c2a56f 100644 --- a/crates/agent_servers/Cargo.toml +++ b/crates/agent_servers/Cargo.toml @@ -14,6 +14,8 @@ test-support = [ "client/test-support", "dep:gpui_tokio", "reqwest_client/test-support", + "dep:indoc", + "dep:tempfile", ] e2e = [] @@ -40,9 +42,8 @@ futures.workspace = true gpui.workspace = true feature_flags.workspace = true gpui_tokio = { workspace = true, optional = true } -google_ai.workspace = true http_client.workspace = true -indoc.workspace = true +indoc = { workspace = true, optional = true } language_model.workspace = true log.workspace = true project.workspace = true @@ -53,7 +54,7 @@ serde.workspace = true serde_json.workspace = true settings.workspace = true task.workspace = true -tempfile.workspace = true +tempfile = { workspace = true, optional = true } thiserror.workspace = true ui.workspace = true terminal.workspace = true @@ -74,3 +75,4 @@ gpui_tokio.workspace = true project = { workspace = true, features = ["test-support"] } reqwest_client = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } +tempfile.workspace = true diff --git a/crates/agent_servers/src/custom.rs b/crates/agent_servers/src/custom.rs index e3c6c6b73ed..45b8df58358 100644 --- a/crates/agent_servers/src/custom.rs +++ b/crates/agent_servers/src/custom.rs @@ -6,7 +6,7 @@ use anyhow::{Context as _, Result}; use collections::HashSet; use fs::Fs; use gpui::{App, AppContext as _, Entity, Task}; -use language_model::{ApiKey, EnvVar}; +use language_model::{ApiKey, EnvVar, GOOGLE_AI_API_URL}; use project::{ Project, agent_server_store::{AgentId, AllAgentServersSettings}, @@ -292,7 +292,7 @@ fn api_key_for_gemini_cli(cx: &mut App) -> Task> { return Task::ready(Ok(key)); } let credentials_provider = zed_credentials_provider::global(cx); - let api_url = google_ai::API_URL.to_string(); + let api_url = GOOGLE_AI_API_URL.to_string(); cx.spawn(async move |cx| { Ok( ApiKey::load_from_system_keychain(&api_url, credentials_provider.as_ref(), cx) diff --git a/crates/anthropic/Cargo.toml b/crates/anthropic/Cargo.toml index ca41a0ececf..9aee7ad2d3e 100644 --- a/crates/anthropic/Cargo.toml +++ b/crates/anthropic/Cargo.toml @@ -18,7 +18,7 @@ doctest = false [dependencies] anyhow.workspace = true -chrono.workspace = true +chrono = { workspace = true, default-features = true } collections.workspace = true futures.workspace = true http_client.workspace = true diff --git a/crates/askpass/Cargo.toml b/crates/askpass/Cargo.toml index 4792fdbea71..659fd01b7a8 100644 --- a/crates/askpass/Cargo.toml +++ b/crates/askpass/Cargo.toml @@ -27,7 +27,7 @@ zeroize.workspace = true which.workspace = true [target.'cfg(target_os = "windows")'.dependencies] -windows.workspace = true +windows = { workspace = true, features = ["Win32_Security_Cryptography"] } [dev-dependencies] gpui = { workspace = true, features = ["test-support"] } diff --git a/crates/auto_update_helper/Cargo.toml b/crates/auto_update_helper/Cargo.toml index 81c31a63c36..289779752e6 100644 --- a/crates/auto_update_helper/Cargo.toml +++ b/crates/auto_update_helper/Cargo.toml @@ -13,20 +13,18 @@ name = "auto_update_helper" path = "src/auto_update_helper.rs" doctest = false -[dependencies] +[target.'cfg(target_os = "windows")'.dependencies] anyhow.workspace = true log.workspace = true simplelog.workspace = true - -[target.'cfg(target_os = "windows")'.dependencies] scopeguard = "1.2" -windows.workspace = true +windows = { workspace = true, features = ["Win32_System_RestartManager", "Win32_UI_Controls"] } [target.'cfg(target_os = "windows")'.dev-dependencies] tempfile.workspace = true -[build-dependencies] -windows_resources = { path = "../windows_resources" } +[target.'cfg(target_os = "windows")'.build-dependencies] +windows_resources.workspace = true [package.metadata.docs.rs] targets = ["x86_64-pc-windows-msvc"] diff --git a/crates/auto_update_helper/build.rs b/crates/auto_update_helper/build.rs index b91bbcb4bf5..a93da9eaee6 100644 --- a/crates/auto_update_helper/build.rs +++ b/crates/auto_update_helper/build.rs @@ -1,4 +1,6 @@ fn main() { + #[cfg(not(target_os = "windows"))] + println!("cargo:rerun-if-changed=build.rs"); #[cfg(target_os = "windows")] { println!("cargo:rerun-if-env-changed=RELEASE_CHANNEL"); diff --git a/crates/bedrock/Cargo.toml b/crates/bedrock/Cargo.toml index e9def2d251c..c6a3e200932 100644 --- a/crates/bedrock/Cargo.toml +++ b/crates/bedrock/Cargo.toml @@ -18,11 +18,11 @@ schemars = ["dep:schemars"] [dependencies] anyhow.workspace = true -aws-sdk-bedrockruntime = { workspace = true, features = ["behavior-version-latest"] } -aws-smithy-types = {workspace = true} +aws-sdk-bedrockruntime.workspace = true +aws-smithy-types.workspace = true futures.workspace = true http_client.workspace = true -schemars = { workspace = true, optional = true } +schemars = { workspace = true, features = ["derive"], optional = true } serde.workspace = true serde_json.workspace = true strum.workspace = true diff --git a/crates/bench_metrics/Cargo.toml b/crates/bench_metrics/Cargo.toml index 8715ba0da5a..51af2709060 100644 --- a/crates/bench_metrics/Cargo.toml +++ b/crates/bench_metrics/Cargo.toml @@ -18,6 +18,8 @@ test-support = [] [dependencies] anyhow.workspace = true criterion.workspace = true + +[target.'cfg(unix)'.dependencies] libc.workspace = true [target.'cfg(target_os = "linux")'.dependencies] diff --git a/crates/breadcrumbs/Cargo.toml b/crates/breadcrumbs/Cargo.toml index 766e82c9adb..bd9fcc400a0 100644 --- a/crates/breadcrumbs/Cargo.toml +++ b/crates/breadcrumbs/Cargo.toml @@ -17,7 +17,3 @@ test = false gpui.workspace = true ui.workspace = true workspace.workspace = true - -[dev-dependencies] -gpui = { workspace = true, features = ["test-support"] } -workspace = { workspace = true, features = ["test-support"] } diff --git a/crates/buffer_diff/Cargo.toml b/crates/buffer_diff/Cargo.toml index 53997f7a686..c66cbd85afa 100644 --- a/crates/buffer_diff/Cargo.toml +++ b/crates/buffer_diff/Cargo.toml @@ -13,7 +13,7 @@ path = "src/buffer_diff.rs" doctest = false [features] -test-support = ["settings"] +test-support = ["settings", "dep:pretty_assertions"] [dependencies] clock.workspace = true @@ -21,7 +21,7 @@ imara-diff.workspace = true gpui.workspace = true language.workspace = true log.workspace = true -pretty_assertions.workspace = true +pretty_assertions = { workspace = true, optional = true } rope.workspace = true settings = { workspace = true, optional = true } sum_tree.workspace = true @@ -33,6 +33,7 @@ ztracing.workspace = true [dev-dependencies] ctor.workspace = true gpui = { workspace = true, features = ["test-support"] } +pretty_assertions.workspace = true rand.workspace = true settings.workspace = true diff --git a/crates/cli/Cargo.toml b/crates/cli/Cargo.toml index b1743fa98bd..01b66a5113a 100644 --- a/crates/cli/Cargo.toml +++ b/crates/cli/Cargo.toml @@ -15,45 +15,68 @@ doctest = false [[bin]] name = "cli" path = "src/main.rs" +required-features = ["cli"] [features] -no-bundled-uninstall = [] -default = [] +no-bundled-uninstall = ["cli"] +default = ["cli"] +cli = [ + "dep:askpass", + "dep:clap", + "dep:clap_complete", + "dep:clap_complete_nushell", + "dep:console", + "dep:core-foundation", + "dep:core-services", + "dep:dialoguer", + "dep:exec", + "dep:fork", + "dep:parking_lot", + "dep:paths", + "dep:plist", + "dep:rayon", + "dep:release_channel", + "dep:tempfile", + "dep:util", + "dep:walkdir", + "dep:windows", + "dep:windows_resources", +] [dependencies] anyhow.workspace = true -askpass.workspace = true -clap.workspace = true -clap_complete.workspace = true -clap_complete_nushell.workspace = true +askpass = { workspace = true, optional = true } +clap = { workspace = true, optional = true } +clap_complete = { workspace = true, optional = true } +clap_complete_nushell = { workspace = true, optional = true } collections.workspace = true -console.workspace = true -dialoguer.workspace = true +console = { workspace = true, optional = true } +dialoguer = { workspace = true, optional = true } ipc-channel = "0.19" -parking_lot.workspace = true -paths.workspace = true -release_channel.workspace = true -serde.workspace = true -util.workspace = true -tempfile.workspace = true -rayon.workspace = true -walkdir = "2.5" +parking_lot = { workspace = true, optional = true } +paths = { workspace = true, optional = true } +release_channel = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"] } +util = { workspace = true, optional = true } +tempfile = { workspace = true, optional = true } +rayon = { workspace = true, optional = true } +walkdir = { workspace = true, optional = true } [dev-dependencies] serde_json.workspace = true util = { workspace = true, features = ["test-support"] } [target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] -exec.workspace = true -fork.workspace = true +exec = { workspace = true, optional = true } +fork = { workspace = true, optional = true } [target.'cfg(target_os = "macos")'.dependencies] -core-foundation.workspace = true -core-services = "1" -plist = "1.3" +core-foundation = { workspace = true, optional = true } +core-services = { workspace = true, optional = true } +plist = { workspace = true, optional = true } [target.'cfg(target_os = "windows")'.dependencies] -windows.workspace = true +windows = { workspace = true, optional = true } -[build-dependencies] -windows_resources = { path = "../windows_resources" } +[target.'cfg(target_os = "windows")'.build-dependencies] +windows_resources = { workspace = true, optional = true } diff --git a/crates/cli/build.rs b/crates/cli/build.rs index 8bda0576a07..45c444d4973 100644 --- a/crates/cli/build.rs +++ b/crates/cli/build.rs @@ -27,7 +27,7 @@ fn main() { println!("cargo:rustc-env=ZED_BUILD_ID={build_identifier}"); } - #[cfg(windows)] + #[cfg(all(windows, feature = "cli"))] { println!("cargo:rerun-if-env-changed=RELEASE_CHANNEL"); println!("cargo:rerun-if-env-changed=GITHUB_RUN_NUMBER"); diff --git a/crates/client/Cargo.toml b/crates/client/Cargo.toml index 3ae702edbe4..efef46818fa 100644 --- a/crates/client/Cargo.toml +++ b/crates/client/Cargo.toml @@ -19,7 +19,7 @@ test-support = ["clock/test-support", "collections/test-support", "gpui/test-sup anyhow.workspace = true async-channel.workspace = true async-tungstenite = { workspace = true, features = ["tokio", "tokio-rustls-manual-roots"] } -chrono = { workspace = true, features = ["serde"] } +chrono.workspace = true clock.workspace = true cloud_api_client.workspace = true cloud_api_types.workspace = true @@ -73,7 +73,7 @@ util = { workspace = true, features = ["test-support"] } [target.'cfg(target_os = "windows")'.dependencies] semver.workspace = true -windows.workspace = true +windows = { workspace = true, features = ["Wdk_System_SystemServices", "Win32_System_SystemInformation"] } [target.'cfg(target_os = "macos")'.dependencies] objc2-foundation.workspace = true diff --git a/crates/clock/Cargo.toml b/crates/clock/Cargo.toml index 486cf0ba8be..68456939cb0 100644 --- a/crates/clock/Cargo.toml +++ b/crates/clock/Cargo.toml @@ -17,5 +17,5 @@ test-support = ["dep:parking_lot"] [dependencies] parking_lot = { workspace = true, optional = true } -serde.workspace = true +serde = { workspace = true, features = ["derive"] } smallvec.workspace = true diff --git a/crates/cloud_api_client/Cargo.toml b/crates/cloud_api_client/Cargo.toml index 5c3fa97615e..da4d7cc9ac0 100644 --- a/crates/cloud_api_client/Cargo.toml +++ b/crates/cloud_api_client/Cargo.toml @@ -15,7 +15,6 @@ doctest = false [dependencies] anyhow.workspace = true cloud_api_types.workspace = true -futures-lite.workspace = true futures.workspace = true gpui.workspace = true http_client.workspace = true @@ -26,13 +25,13 @@ thiserror.workspace = true yawc.workspace = true [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies] -# Workspace inheritance would re-enable defaults, including blocking synchronization. -async-lock = { version = "3.4.2", default-features = false } - -[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies] async-lock.workspace = true +[target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies] +async-lock = { workspace = true, features = ["std"] } + [target.'cfg(not(target_family = "wasm"))'.dependencies] +futures-lite.workspace = true gpui_tokio.workspace = true http_client_tls.workspace = true tokio-rustls.workspace = true diff --git a/crates/cloud_llm_client/Cargo.toml b/crates/cloud_llm_client/Cargo.toml index 4a7a4a705fe..a5cf24d0abd 100644 --- a/crates/cloud_llm_client/Cargo.toml +++ b/crates/cloud_llm_client/Cargo.toml @@ -18,10 +18,10 @@ doctest = false [dependencies] anyhow.workspace = true -serde = { workspace = true, features = ["derive", "rc"] } +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true -strum = { workspace = true, features = ["derive"] } -uuid = { workspace = true, features = ["serde"] } +strum.workspace = true +uuid.workspace = true zeta_prompt = { workspace = true, optional = true } diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml index 2f4c6b76b0f..21f6228e798 100644 --- a/crates/collab/Cargo.toml +++ b/crates/collab/Cargo.toml @@ -30,9 +30,9 @@ path = "tests/integration/collab_tests.rs" anyhow.workspace = true async-trait.workspace = true async-tungstenite = { workspace = true, features = ["tokio", "tokio-rustls-manual-roots" ] } -aws-config = { version = "1.1.5" } -aws-sdk-kinesis = { version = "1.51.0", default-features = false, features = ["default-https-client", "rt-tokio"] } -aws-sdk-s3 = { version = "1.15.0", default-features = false, features = ["sigv4a", "http-1x", "default-https-client", "rt-tokio"] } +aws-config = "1.1.5" +aws-sdk-kinesis = { workspace = true, features = ["default-https-client", "rt-tokio"] } +aws-sdk-s3 = { workspace = true, features = ["sigv4a", "http-1x", "default-https-client", "rt-tokio"] } axum = { version = "0.6", features = ["json", "headers", "ws"] } chrono.workspace = true clock.workspace = true @@ -52,13 +52,13 @@ prost.workspace = true reqwest = { version = "0.11", features = ["json"] } rpc.workspace = true # sea-orm and sea-orm-macros versions must match exactly. -sea-orm = { version = "=1.1.10", features = ["sqlx-postgres", "postgres-array", "runtime-tokio-rustls", "with-uuid"] } +sea-orm = { workspace = true, features = ["sqlx-postgres", "runtime-tokio-rustls", "with-uuid", "macros", "with-json", "with-chrono", "with-time"] } sea-orm-macros = "=1.1.10" semver.workspace = true serde.workspace = true serde_json.workspace = true sha2.workspace = true -sqlx = { version = "0.8", features = ["runtime-tokio-rustls", "postgres", "json", "time", "uuid", "any"] } +sqlx = { workspace = true, features = ["any", "migrate"] } strum.workspace = true telemetry_events.workspace = true text.workspace = true @@ -68,7 +68,7 @@ toml.workspace = true tower = "0.4" tower-http = { workspace = true, features = ["trace"] } tracing.workspace = true -tracing-subscriber = { version = "0.3.18", features = ["env-filter", "json", "registry", "tracing-log"] } # workaround for https://github.com/tokio-rs/tracing/issues/2927 +tracing-subscriber = { workspace = true, features = ["env-filter", "json"] } # workaround for https://github.com/tokio-rs/tracing/issues/2927 util.workspace = true uuid.workspace = true @@ -118,11 +118,11 @@ release_channel.workspace = true remote = { workspace = true, features = ["test-support"] } remote_server.workspace = true rpc = { workspace = true, features = ["test-support"] } -sea-orm = { version = "=1.1.10", features = ["sqlx-sqlite"] } +sea-orm.workspace = true serde_json.workspace = true session = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } -sqlx = { version = "0.8", features = ["sqlite"] } +sqlx.workspace = true task.workspace = true theme.workspace = true theme_settings = { workspace = true, features = ["test-support"] } diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml index a3535d56b0f..f50a5deb0f5 100644 --- a/crates/collab_ui/Cargo.toml +++ b/crates/collab_ui/Cargo.toml @@ -59,19 +59,3 @@ ui.workspace = true util.workspace = true workspace.workspace = true zed_actions.workspace = true - -[dev-dependencies] -call = { workspace = true, features = ["test-support"] } -client = { workspace = true, features = ["test-support"] } -collections = { workspace = true, features = ["test-support"] } -editor = { workspace = true, features = ["test-support"] } -gpui = { workspace = true, features = ["test-support"] } -notifications = { workspace = true, features = ["test-support"] } - -project = { workspace = true, features = ["test-support"] } -rpc = { workspace = true, features = ["test-support"] } -settings = { workspace = true, features = ["test-support"] } - -util = { workspace = true, features = ["test-support"] } - -workspace = { workspace = true, features = ["test-support"] } diff --git a/crates/crashes/Cargo.toml b/crates/crashes/Cargo.toml index 7d873b0f7f0..04018bf82d2 100644 --- a/crates/crashes/Cargo.toml +++ b/crates/crashes/Cargo.toml @@ -6,7 +6,6 @@ edition.workspace = true license = "GPL-3.0-or-later" [dependencies] -async-process.workspace = true crash-handler.workspace = true log.workspace = true minidumper.workspace = true @@ -16,6 +15,9 @@ serde_json.workspace = true system_specs.workspace = true zstd.workspace = true +[target.'cfg(not(target_os = "windows"))'.dependencies] +async-process.workspace = true + [target.'cfg(target_os = "linux")'.dependencies] libc.workspace = true diff --git a/crates/db/Cargo.toml b/crates/db/Cargo.toml index 36e914715bb..4c76b8f7af3 100644 --- a/crates/db/Cargo.toml +++ b/crates/db/Cargo.toml @@ -26,7 +26,7 @@ release_channel.workspace = true sqlez.workspace = true sqlez_macros.workspace = true util.workspace = true -uuid.workspace = true +uuid = { workspace = true, features = ["v5", "v7"] } zed_env_vars.workspace = true [dev-dependencies] diff --git a/crates/debugger_ui/Cargo.toml b/crates/debugger_ui/Cargo.toml index d84295ba555..c8fd8e6a8d0 100644 --- a/crates/debugger_ui/Cargo.toml +++ b/crates/debugger_ui/Cargo.toml @@ -23,13 +23,14 @@ test-support = [ "util/test-support", "workspace/test-support", "unindent", + "dep:command_palette_hooks", ] [dependencies] anyhow.workspace = true bitflags.workspace = true collections.workspace = true -command_palette_hooks.workspace = true +command_palette_hooks = { workspace = true, optional = true } dap.workspace = true dap_adapters = { workspace = true, optional = true } db.workspace = true @@ -51,7 +52,6 @@ parking_lot.workspace = true parse_int.workspace = true paths.workspace = true picker.workspace = true -pretty_assertions.workspace = true project.workspace = true rpc.workspace = true schemars.workspace = true @@ -75,12 +75,14 @@ workspace.workspace = true zed_actions.workspace = true [dev-dependencies] +command_palette_hooks.workspace = true dap = { workspace = true, features = ["test-support"] } dap_adapters = { workspace = true, features = ["test-support"] } debugger_tools = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] } +pretty_assertions.workspace = true project = { workspace = true, features = ["test-support"] } tree-sitter-go.workspace = true unindent.workspace = true diff --git a/crates/deepseek/Cargo.toml b/crates/deepseek/Cargo.toml index 451f9752e4c..aec5087d3fc 100644 --- a/crates/deepseek/Cargo.toml +++ b/crates/deepseek/Cargo.toml @@ -21,6 +21,6 @@ schemars = ["dep:schemars"] anyhow.workspace = true futures.workspace = true http_client.workspace = true -schemars = { workspace = true, optional = true } +schemars = { workspace = true, features = ["derive"], optional = true } serde.workspace = true serde_json.workspace = true diff --git a/crates/docs_preprocessor/Cargo.toml b/crates/docs_preprocessor/Cargo.toml index a422d2811db..cb57c7b97ea 100644 --- a/crates/docs_preprocessor/Cargo.toml +++ b/crates/docs_preprocessor/Cargo.toml @@ -11,7 +11,7 @@ collections.workspace = true jsonschema.workspace = true # We are specifically pinning this version of mdbook, as later versions introduce issues with double-nested subdirectories. # Ask @maxdeviant about this before bumping. -mdbook = "= 0.4.40" +mdbook.workspace = true regex.workspace = true schemars.workspace = true serde.workspace = true diff --git a/crates/edit_prediction/Cargo.toml b/crates/edit_prediction/Cargo.toml index e86e3f5a480..681e195821c 100644 --- a/crates/edit_prediction/Cargo.toml +++ b/crates/edit_prediction/Cargo.toml @@ -32,7 +32,7 @@ credentials_provider.workspace = true db.workspace = true edit_prediction_types.workspace = true edit_prediction_context.workspace = true -edit_prediction_metrics = { workspace = true, features = ["tree-sitter"] } +edit_prediction_metrics.workspace = true feature_flags.workspace = true fs.workspace = true futures.workspace = true @@ -48,7 +48,6 @@ menu.workspace = true ollama.workspace = true open_ai.workspace = true postage.workspace = true -pretty_assertions.workspace = true project.workspace = true pulldown-cmark.workspace = true rand.workspace = true @@ -63,7 +62,7 @@ telemetry.workspace = true telemetry_events.workspace = true text.workspace = true thiserror.workspace = true -toml.workspace = true +toml = { workspace = true, features = ["display"] } ui.workspace = true util.workspace = true uuid.workspace = true @@ -88,6 +87,7 @@ language = { workspace = true, features = ["test-support"] } language_model = { workspace = true, features = ["test-support"] } lsp.workspace = true parking_lot.workspace = true +pretty_assertions.workspace = true project = { workspace = true, features = ["test-support"] } settings = { workspace = true, features = ["test-support"] } workspace = { workspace = true, features = ["test-support"] } diff --git a/crates/edit_prediction_cli/Cargo.toml b/crates/edit_prediction_cli/Cargo.toml index 6283a276b54..f01e87ac0eb 100644 --- a/crates/edit_prediction_cli/Cargo.toml +++ b/crates/edit_prediction_cli/Cargo.toml @@ -62,12 +62,12 @@ util.workspace = true watch.workspace = true edit_prediction = { workspace = true, features = ["cli-support"] } edit_prediction_context.workspace = true -edit_prediction_metrics = { workspace = true, features = ["tree-sitter"] } +edit_prediction_metrics.workspace = true telemetry_events.workspace = true wasmtime.workspace = true zeta_prompt.workspace = true rand.workspace = true -similar = "2.7.0" +similar.workspace = true flate2 = "1.1.8" toml.workspace = true gaoya = "0.2.0" diff --git a/crates/edit_prediction_cli/build.rs b/crates/edit_prediction_cli/build.rs index 9ab40da0fb0..19dc4de3b2d 100644 --- a/crates/edit_prediction_cli/build.rs +++ b/crates/edit_prediction_cli/build.rs @@ -1,4 +1,5 @@ fn main() { + println!("cargo:rerun-if-changed=../zed/Cargo.toml"); let cargo_toml = std::fs::read_to_string("../zed/Cargo.toml").expect("Failed to read crates/zed/Cargo.toml"); let version = cargo_toml diff --git a/crates/edit_prediction_metrics/Cargo.toml b/crates/edit_prediction_metrics/Cargo.toml index 5c31f9bd175..860226e7c71 100644 --- a/crates/edit_prediction_metrics/Cargo.toml +++ b/crates/edit_prediction_metrics/Cargo.toml @@ -19,7 +19,7 @@ tree-sitter = ["dep:tree-sitter"] imara-diff.workspace = true serde.workspace = true serde_json = "1.0" -similar = "2.7.0" +similar.workspace = true tree-sitter = { workspace = true, optional = true } zeta_prompt.workspace = true diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml index 49624f8ad48..dfd41b97d45 100644 --- a/crates/editor/Cargo.toml +++ b/crates/editor/Cargo.toml @@ -28,12 +28,15 @@ test-support = [ "tree-sitter-html", "proptest", "unindent", + "dep:pretty_assertions", + "dep:assets", + "dep:indoc", ] [dependencies] aho-corasick.workspace = true anyhow.workspace = true -assets.workspace = true +assets = { workspace = true, optional = true } base64.workspace = true breadcrumbs.workspace = true client.workspace = true @@ -52,7 +55,7 @@ fuzzy.workspace = true fs.workspace = true git.workspace = true gpui.workspace = true -indoc.workspace = true +indoc = { workspace = true, optional = true } edit_prediction_types.workspace = true itertools.workspace = true language.workspace = true @@ -65,7 +68,7 @@ menu.workspace = true multi_buffer.workspace = true ordered-float.workspace = true parking_lot.workspace = true -pretty_assertions.workspace = true +pretty_assertions = { workspace = true, optional = true } project.workspace = true proptest = { workspace = true, optional = true } proptest-derive = { workspace = true, optional = true } @@ -103,16 +106,18 @@ uuid.workspace = true vim_mode_setting.workspace = true workspace.workspace = true zed_actions.workspace = true -zlog.workspace = true [dev-dependencies] +assets.workspace = true ctor.workspace = true gpui = { workspace = true, features = ["test-support"] } +indoc.workspace = true language = { workspace = true, features = ["test-support"] } languages = {workspace = true, features = ["test-support"] } lsp = { workspace = true, features = ["test-support"] } markdown = { workspace = true, features = ["test-support"] } multi_buffer = { workspace = true, features = ["test-support"] } +pretty_assertions.workspace = true project = { workspace = true, features = ["test-support"] } proptest.workspace = true proptest-derive.workspace = true diff --git a/crates/etw_tracing/Cargo.toml b/crates/etw_tracing/Cargo.toml index fc67fddf778..ac14eb923fa 100644 --- a/crates/etw_tracing/Cargo.toml +++ b/crates/etw_tracing/Cargo.toml @@ -10,7 +10,7 @@ path = "etw_tracing.rs" test = false doctest = false -[dependencies] +[target.'cfg(target_os = "windows")'.dependencies] anyhow.workspace = true gpui.workspace = true net.workspace = true @@ -19,7 +19,6 @@ serde_json.workspace = true util.workspace = true workspace.workspace = true -[target.'cfg(target_os = "windows")'.dependencies] wprcontrol = { git = "https://github.com/zed-industries/wprcontrol", rev = "cd811f7" } windows-core = "0.61" windows = { version = "0.61", features = [ diff --git a/crates/explorer_command_injector/Cargo.toml b/crates/explorer_command_injector/Cargo.toml index f5aefe2b611..27710cff877 100644 --- a/crates/explorer_command_injector/Cargo.toml +++ b/crates/explorer_command_injector/Cargo.toml @@ -21,6 +21,6 @@ preview = [] nightly = [] [target.'cfg(target_os = "windows")'.dependencies] -windows.workspace = true +windows = { workspace = true, features = ["Win32_Globalization", "Win32_System_SystemServices"] } windows-core.workspace = true windows-registry.workspace = true diff --git a/crates/extension_api/build.rs b/crates/extension_api/build.rs index bd9149578a3..fa298bb2830 100644 --- a/crates/extension_api/build.rs +++ b/crates/extension_api/build.rs @@ -1,4 +1,5 @@ fn main() { + println!("cargo:rerun-if-changed=build.rs"); let version = std::env::var("CARGO_PKG_VERSION").unwrap(); let out_dir = std::env::var("OUT_DIR").unwrap(); diff --git a/crates/extension_cli/Cargo.toml b/crates/extension_cli/Cargo.toml index 3a41e8b802f..a9ca21d9e4f 100644 --- a/crates/extension_cli/Cargo.toml +++ b/crates/extension_cli/Cargo.toml @@ -14,7 +14,7 @@ path = "src/main.rs" [dependencies] anyhow.workspace = true -clap = { workspace = true, features = ["derive"] } +clap.workspace = true cloud_api_types.workspace = true env_logger.workspace = true extension.workspace = true @@ -32,7 +32,7 @@ snippet_provider.workspace = true task.workspace = true theme_settings.workspace = true thiserror.workspace = true -tokio = { workspace = true, features = ["full"] } -toml.workspace = true +tokio = { workspace = true, features = ["fs", "macros", "parking_lot", "process", "sync", "time"] } +toml = { workspace = true, features = ["display"] } tree-sitter = { workspace = true, features = ["wasm"] } wasmtime.workspace = true diff --git a/crates/extension_host/Cargo.toml b/crates/extension_host/Cargo.toml index b5a94c0c48a..d4209c0f98c 100644 --- a/crates/extension_host/Cargo.toml +++ b/crates/extension_host/Cargo.toml @@ -47,7 +47,7 @@ settings.workspace = true task.workspace = true telemetry.workspace = true tempfile.workspace = true -toml.workspace = true +toml = { workspace = true, features = ["display"] } tracing.workspace = true url.workspace = true util.workspace = true diff --git a/crates/extensions_ui/Cargo.toml b/crates/extensions_ui/Cargo.toml index c85bb5fb9e9..6370012c7d9 100644 --- a/crates/extensions_ui/Cargo.toml +++ b/crates/extensions_ui/Cargo.toml @@ -30,7 +30,6 @@ gpui.workspace = true language.workspace = true log.workspace = true markdown.workspace = true -num-format.workspace = true picker.workspace = true project.workspace = true release_channel.workspace = true diff --git a/crates/extensions_ui/src/components/extension_card.rs b/crates/extensions_ui/src/components/extension_card.rs index 5a117b742af..9adcaf0532f 100644 --- a/crates/extensions_ui/src/components/extension_card.rs +++ b/crates/extensions_ui/src/components/extension_card.rs @@ -4,9 +4,8 @@ use cloud_api_types::{ExtensionApiManifest, ExtensionMetadata, ExtensionProvides use extension::{ExtensionManifest, SchemaVersion}; use extension_host::{ExtensionOperation, ExtensionStatus, ExtensionStore}; use gpui::{Anchor, ElementId, Entity, Point, SharedString, prelude::*}; -use num_format::{Locale, ToFormattedString}; use release_channel::ReleaseChannel; -use ui::{Chip, ContextMenu, PopoverMenu, Tooltip, prelude::*}; +use ui::{Chip, ContextMenu, PopoverMenu, Tooltip, prelude::*, utils::format_number_with_commas}; type ContextMenuBuilder = Box< dyn Fn(Arc, SharedString, &mut Window, &mut App) -> Option> + 'static, @@ -683,7 +682,7 @@ impl RenderOnce for ExtensionCard { .children(download_count.map(|download_count| { Label::new(format!( "Downloads: {}", - download_count.to_formatted_string(&Locale::en) + format_number_with_commas(u128::from(download_count)) )) .size(LabelSize::Small) })), diff --git a/crates/feature_flags_macros/Cargo.toml b/crates/feature_flags_macros/Cargo.toml index aebfa5f7c13..997a22ac240 100644 --- a/crates/feature_flags_macros/Cargo.toml +++ b/crates/feature_flags_macros/Cargo.toml @@ -16,4 +16,4 @@ workspace = true [dependencies] proc-macro2.workspace = true quote.workspace = true -syn.workspace = true +syn = { workspace = true, features = ["derive", "parsing", "printing"] } diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.toml index 502c4601d76..f8539e791b6 100644 --- a/crates/fs/Cargo.toml +++ b/crates/fs/Cargo.toml @@ -43,7 +43,6 @@ tempfile.workspace = true text.workspace = true util.workspace = true path.workspace = true -is_executable = "1.0.5" notify = "9.0.0-rc.4" trash = { git = "https://github.com/zed-industries/trash-rs", rev = "41c6c800d884a89351f3b8856d12894cccee261d" } @@ -51,6 +50,7 @@ trash = { git = "https://github.com/zed-industries/trash-rs", rev = "41c6c800d88 rustix.workspace = true [target.'cfg(target_os = "windows")'.dependencies] +is_executable.workspace = true windows.workspace = true dunce.workspace = true async-std.workspace = true diff --git a/crates/fuzzy_nucleo/Cargo.toml b/crates/fuzzy_nucleo/Cargo.toml index 4ca74860b46..425b7816f91 100644 --- a/crates/fuzzy_nucleo/Cargo.toml +++ b/crates/fuzzy_nucleo/Cargo.toml @@ -15,10 +15,14 @@ doctest = false [dependencies] fuzzy.workspace = true nucleo.workspace = true +parking_lot = { workspace = true, features = ["arc_lock", "send_guard"] } gpui.workspace = true gpui_util.workspace = true path.workspace = true +[package.metadata.cargo-shear] +ignored = ["parking_lot"] + [dev-dependencies] criterion.workspace = true gpui = { workspace = true, features = ["test-support"] } diff --git a/crates/google_ai/src/google_ai.rs b/crates/google_ai/src/google_ai.rs index 8c762e84a7a..a1be7e05299 100644 --- a/crates/google_ai/src/google_ai.rs +++ b/crates/google_ai/src/google_ai.rs @@ -6,15 +6,13 @@ use http_client::{ AsyncBody, CustomHeaders, HttpClient, Method, Request as HttpRequest, RequestBuilderExt, StatusCode, http::HeaderMap, }; -pub use language_model_core::ModelMode as GoogleModelMode; +pub use language_model_core::{GOOGLE_AI_API_URL as API_URL, ModelMode as GoogleModelMode}; use language_model_core::{ GOOGLE_PROVIDER_NAME, LanguageModelCompletionError, ProviderErrorCategory, }; use serde::{Deserialize, Deserializer, Serialize, Serializer}; pub mod completion; -pub const API_URL: &str = "https://generativelanguage.googleapis.com"; - pub async fn stream_generate_content( client: &dyn HttpClient, api_url: &str, diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml index 1957084c876..e760cdd2c0c 100644 --- a/crates/gpui/Cargo.toml +++ b/crates/gpui/Cargo.toml @@ -24,6 +24,9 @@ test-support = [ "wayland", "x11", "proptest", + "dep:futures-concurrency", + "dep:postage", + "dep:web-time", ] bench-support = ["profiler", "dep:criterion", "dep:bench_metrics"] # Preserve the published feature name while consumers migrate to `bench-support`. @@ -32,12 +35,15 @@ inspector = ["gpui_macros/inspector"] # Tracks every entity handle so tests can assert nothing leaked. Also enabled # by setting `GPUI_LEAK_DETECTION` when building; see `build.rs`. leak-detection = [] +font-kit = [] wayland = [] x11 = [ "scap?/x11", ] screen-capture = [ "scap", + "dep:objc2-core-foundation", + "dep:objc2-core-video", ] windows-manifest = ["dep:embed-resource"] profiler = ["dep:hdrhistogram"] @@ -57,10 +63,10 @@ collections.workspace = true bench_metrics = { workspace = true, optional = true } criterion = { workspace = true, optional = true } ctor.workspace = true -derive_more.workspace = true +derive_more = { workspace = true, features = ["add", "add_assign", "mul", "mul_assign", "not"] } etagere.workspace = true futures.workspace = true -futures-concurrency.workspace = true +futures-concurrency = { workspace = true, optional = true } gpui_macros.workspace = true gpui_shared_string.workspace = true http_client.workspace = true @@ -71,48 +77,56 @@ log.workspace = true num_cpus = "1.13" parking = "2.0.0" parking_lot.workspace = true -postage.workspace = true +postage = { workspace = true, features = ["blocking"], optional = true } proptest = { workspace = true, optional = true } -chrono.workspace = true +chrono = { workspace = true, default-features = true } profiling.workspace = true -rand.workspace = true +rand = { workspace = true, features = ["small_rng", "thread_rng"] } raw-window-handle.workspace = true -regex.workspace = true +regex = { workspace = true, default-features = true } refineable.workspace = true scheduler.workspace = true resvg.workspace = true usvg.workspace = true ttf-parser = "0.25" -util_macros.workspace = true -schemars.workspace = true +schemars = { workspace = true, features = ["derive"] } seahash = "4.1" -serde.workspace = true +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true slotmap.workspace = true smallvec.workspace = true stacksafe = { workspace = true, optional = true } strum.workspace = true sum_tree.workspace = true -taffy = "=0.13.0" +taffy = { workspace = true, features = [ + "std", + "taffy_tree", + "flexbox", + "grid", + "block_layout", + "float_layout", + "content_size", +] } thiserror.workspace = true gpui_util.workspace = true hdrhistogram = { workspace = true, optional = true } waker-fn = "1.2.0" lyon = "1.0" pin-project = "1.1.10" -spin = "0.10.0" -pollster.workspace = true +spin.workspace = true url.workspace = true -uuid.workspace = true -web-time.workspace = true +uuid = { workspace = true, features = ["v4"] } +web-time = { workspace = true, optional = true } heapless.workspace = true [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies] -# Workspace inheritance would re-enable defaults, including blocking channel synchronization. -async-channel = { version = "2.5.0", default-features = false } +async-channel.workspace = true [target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies] -async-channel.workspace = true +async-channel = { workspace = true, features = ["std"] } + +[target.'cfg(not(target_family = "wasm"))'.dependencies] +pollster.workspace = true [target.'cfg(target_family = "wasm")'.dependencies] getrandom = { version = "0.3.4", features = ["wasm_js"] } @@ -123,10 +137,8 @@ uuid = { workspace = true, features = ["js"] } core-video.workspace = true [target.'cfg(target_os = "macos")'.dependencies] -objc2-core-foundation.workspace = true -objc2-core-video.workspace = true -# WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io -font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "94b0f28166665e8fd2f53ff6d268a14955c82269", package = "zed-font-kit", version = "0.14.1-zed", optional = true } +objc2-core-foundation = { workspace = true, optional = true } +objc2-core-video = { workspace = true, optional = true } log.workspace = true objc2 = { workspace = true, optional = true } objc2-metal = { version = "0.3", optional = true } @@ -140,10 +152,8 @@ libc.workspace = true [target.'cfg(target_os = "windows")'.dependencies] windows = { workspace = true, features = [ - "Win32_Foundation", "Win32_System_Power", "Win32_System_RemoteDesktop", - "Win32_System_Threading", "Win32_System_WindowsProgramming", ] } @@ -153,32 +163,31 @@ backtrace.workspace = true bench_metrics = { workspace = true, features = ["test-support"] } collections = { workspace = true, features = ["test-support"] } env_logger.workspace = true +futures-concurrency.workspace = true +postage = { workspace = true, features = ["blocking"] } +web-time.workspace = true gpui_platform = { workspace = true, features = ["font-kit", "wayland", "x11"] } -gpui_util = { workspace = true } +gpui_util.workspace = true lyon = { version = "1.0", features = ["extra"] } -rand.workspace = true +rand = { workspace = true, default-features = true } scheduler = { workspace = true, features = ["test-support"] } -unicode-segmentation = { workspace = true } +unicode-segmentation.workspace = true +util_macros.workspace = true [target.'cfg(not(target_family = "wasm"))'.dev-dependencies] http_client = { workspace = true, features = ["test-support"] } -proptest = { workspace = true } +proptest.workspace = true reqwest_client = { workspace = true, features = ["test-support"] } [target.'cfg(target_family = "wasm")'.dev-dependencies] -wasm-bindgen = { workspace = true } -web-sys = { version = "0.3", features = ["console"] } +wasm-bindgen.workspace = true +web-sys.workspace = true [build-dependencies] embed-resource = { version = "3.0", optional = true } -[target.'cfg(target_os = "macos")'.build-dependencies] -bindgen = "0.72" - [package.metadata.cargo-shear] ignored = [ - "bindgen", - "font-kit", "getrandom", "objc2", "objc2-metal", diff --git a/crates/gpui/build.rs b/crates/gpui/build.rs index 504a0152eb7..a55b3b1cb32 100644 --- a/crates/gpui/build.rs +++ b/crates/gpui/build.rs @@ -1,6 +1,7 @@ #![allow(clippy::disallowed_methods, reason = "build scripts are exempt")] fn main() { + println!("cargo:rerun-if-changed=build.rs"); println!("cargo::rustc-check-cfg=cfg(gles)"); // Leak detection does bookkeeping on every entity handle, so `test-support` diff --git a/crates/gpui_apple/Cargo.toml b/crates/gpui_apple/Cargo.toml index 9e2a11438b0..6b53075181b 100644 --- a/crates/gpui_apple/Cargo.toml +++ b/crates/gpui_apple/Cargo.toml @@ -27,7 +27,7 @@ async-task.workspace = true block2.workspace = true core-foundation.workspace = true core-graphics.workspace = true -core-video.workspace = true +core-video = { workspace = true, features = ["metal"] } derive_more.workspace = true dispatch2.workspace = true etagere.workspace = true diff --git a/crates/gpui_linux/Cargo.toml b/crates/gpui_linux/Cargo.toml index 47ab8389e4d..a91818acd0e 100644 --- a/crates/gpui_linux/Cargo.toml +++ b/crates/gpui_linux/Cargo.toml @@ -16,6 +16,7 @@ doctest = false default = ["wayland", "x11"] test-support = ["gpui/test-support"] wayland = [ + "dep:accesskit_unix", "gpui_wgpu", "ashpd/wayland", @@ -30,8 +31,10 @@ wayland = [ "xkbcommon/wayland", "open", "gpui/wayland", + "uuid/v5", ] x11 = [ + "dep:accesskit_unix", "gpui_wgpu", "ashpd", @@ -51,9 +54,9 @@ screen-capture = [ [target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] accesskit.workspace = true -accesskit_unix.workspace = true +accesskit_unix = { workspace = true, optional = true } anyhow.workspace = true -bytemuck = "1" +bytemuck.workspace = true collections.workspace = true futures.workspace = true gpui.workspace = true @@ -70,7 +73,7 @@ url.workspace = true uuid.workspace = true # Always used -oo7 = { version = "0.6", default-features = false, features = [ +oo7 = { workspace = true, features = [ "async-std", "native_crypto", ] } @@ -82,7 +85,7 @@ raw-window-handle.workspace = true ashpd = { workspace = true, optional = true } filedescriptor = { version = "0.8.2", optional = true } open = { version = "5.2.0", optional = true } -xkbcommon = { version = "0.8.0", default-features = false, optional = true } +xkbcommon = { workspace = true, optional = true } # Screen capture scap = { workspace = true, optional = true } diff --git a/crates/gpui_macos/Cargo.toml b/crates/gpui_macos/Cargo.toml index e3cb453515c..563f1432072 100644 --- a/crates/gpui_macos/Cargo.toml +++ b/crates/gpui_macos/Cargo.toml @@ -17,8 +17,8 @@ default = ["gpui/default"] bench-support = ["gpui/bench-support", "gpui_apple/bench-support"] test-support = ["gpui/test-support", "gpui_apple/test-support"] runtime_shaders = ["gpui_apple/runtime_shaders"] -font-kit = ["dep:font-kit"] -screen-capture = ["gpui/screen-capture"] +font-kit = ["dep:font-kit", "dep:core-text", "dep:pathfinder_geometry"] +screen-capture = ["gpui/screen-capture", "dep:objc2-core-graphics", "dep:objc2-core-media", "dep:objc2-screen-capture-kit"] [dependencies] gpui.workspace = true @@ -33,12 +33,12 @@ collections.workspace = true core-foundation.workspace = true core-foundation-sys.workspace = true core-graphics.workspace = true -core-text.workspace = true +core-text = { workspace = true, optional = true } core-video.workspace = true ctor.workspace = true -dispatch2.workspace = true +dispatch2 = { workspace = true, features = ["block2", "objc2"] } # WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io -font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "94b0f28166665e8fd2f53ff6d268a14955c82269", package = "zed-font-kit", version = "0.14.1-zed", optional = true } +font-kit = { workspace = true, optional = true, features = ["source"] } foreign-types.workspace = true futures.workspace = true gpui_apple.workspace = true @@ -49,13 +49,13 @@ log.workspace = true objc.workspace = true objc2.workspace = true objc2-app-kit.workspace = true -objc2-core-graphics.workspace = true -objc2-core-media.workspace = true +objc2-core-graphics = { workspace = true, optional = true } +objc2-core-media = { workspace = true, optional = true } objc2-foundation.workspace = true -objc2-screen-capture-kit.workspace = true +objc2-screen-capture-kit = { workspace = true, optional = true } objc2-user-notifications.workspace = true parking_lot.workspace = true -pathfinder_geometry.workspace = true +pathfinder_geometry = { workspace = true, optional = true } raw-window-handle.workspace = true scheduler.workspace = true semver.workspace = true diff --git a/crates/gpui_macros/Cargo.toml b/crates/gpui_macros/Cargo.toml index 7e705a17b8f..aae1830289d 100644 --- a/crates/gpui_macros/Cargo.toml +++ b/crates/gpui_macros/Cargo.toml @@ -22,7 +22,7 @@ test = false heck.workspace = true proc-macro2.workspace = true quote.workspace = true -syn.workspace = true +syn = { workspace = true, default-features = true, features = ["full", "extra-traits", "visit-mut"] } [dev-dependencies] gpui = { workspace = true, features = ["inspector"] } diff --git a/crates/gpui_tokio/Cargo.toml b/crates/gpui_tokio/Cargo.toml index 3ad3cd249ae..7b2d180ecd5 100644 --- a/crates/gpui_tokio/Cargo.toml +++ b/crates/gpui_tokio/Cargo.toml @@ -17,4 +17,4 @@ test = false anyhow.workspace = true gpui.workspace = true gpui_util.workspace = true -tokio = { workspace = true, features = ["rt", "rt-multi-thread"] } +tokio = { workspace = true, features = ["rt-multi-thread"] } diff --git a/crates/gpui_util/Cargo.toml b/crates/gpui_util/Cargo.toml index 86843d64c08..5586f369208 100644 --- a/crates/gpui_util/Cargo.toml +++ b/crates/gpui_util/Cargo.toml @@ -9,7 +9,7 @@ license = "Apache-2.0" doctest = false [dependencies] -log.workspace = true +log = { workspace = true, features = ["serde"] } anyhow.workspace = true [target.'cfg(target_os = "windows")'.dependencies] diff --git a/crates/gpui_util/src/lib.rs b/crates/gpui_util/src/lib.rs index 37279de56e9..9e25f5319dc 100644 --- a/crates/gpui_util/src/lib.rs +++ b/crates/gpui_util/src/lib.rs @@ -154,6 +154,12 @@ pub fn get_windows_system_shell() -> String { get_powershell().unwrap_or_else(|| (*CMD).clone()) } +#[inline] +pub const fn is_utf8_char_boundary(u8: u8) -> bool { + // This is bit magic equivalent to: b < 128 || b >= 192 + (u8 as i8) >= -0x40 +} + pub fn post_inc + AddAssign + Copy>(value: &mut T) -> T { let prev = *value; *value += T::from(1); diff --git a/crates/gpui_web/Cargo.toml b/crates/gpui_web/Cargo.toml index 80c4ca0decf..af712b00b05 100644 --- a/crates/gpui_web/Cargo.toml +++ b/crates/gpui_web/Cargo.toml @@ -19,8 +19,8 @@ doctest = false [dependencies] unicode-properties = "=0.1.3" -unicode-script = "0.5.7" -unicode-segmentation = "1.10" +unicode-script.workspace = true +unicode-segmentation.workspace = true [target.'cfg(target_family = "wasm")'.dependencies] gpui.workspace = true @@ -39,12 +39,8 @@ console_error_panic_hook.workspace = true js-sys.workspace = true raw-window-handle.workspace = true smallvec.workspace = true -# Forked because upstream is unmaintained and its worker bootstrap still calls -# the wasm-bindgen init function with the positional arguments deprecated in 0.2.93. -wasm_thread = { git = "https://github.com/zed-industries/wasm_thread", rev = "0cf96c7708dfb97ccf3da50347e25edcf75d6937", version = "0.3", features = [ - "es_modules", -], optional = true } -web-sys = { version = "0.3", features = [ +wasm_thread = { workspace = true, optional = true } +web-sys = { workspace = true, features = [ "console", "Blob", "Clipboard", @@ -72,7 +68,6 @@ web-sys = { version = "0.3", features = [ "KeyboardEvent", "Location", "MediaQueryList", - "MediaQueryListEvent", "MouseEvent", "Navigator", "OffscreenCanvas", diff --git a/crates/gpui_wgpu/Cargo.toml b/crates/gpui_wgpu/Cargo.toml index a49cf7f3ae1..179b134e5ca 100644 --- a/crates/gpui_wgpu/Cargo.toml +++ b/crates/gpui_wgpu/Cargo.toml @@ -21,7 +21,7 @@ test-support = ["gpui/test-support", "dep:image"] [dependencies] gpui.workspace = true anyhow.workspace = true -bytemuck = "1" +bytemuck.workspace = true collections.workspace = true cosmic-text = "0.19.0" etagere.workspace = true @@ -36,14 +36,19 @@ swash.workspace = true unicode-bidi.workspace = true unicode-segmentation.workspace = true gpui_util.workspace = true -wgpu.workspace = true # Optional: only needed on platforms with multiple font sources (e.g. Linux) # WARNING: If you change this, you must also publish a new version of zed-font-kit to crates.io -font-kit = { git = "https://github.com/zed-industries/font-kit", rev = "94b0f28166665e8fd2f53ff6d268a14955c82269", package = "zed-font-kit", version = "0.14.1-zed", optional = true } +font-kit = { workspace = true, optional = true } + +[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] +wgpu = { workspace = true, features = ["std", "parking_lot", "metal", "gles", "vulkan", "wgsl", "webgpu"] } + +[target.'cfg(not(any(target_os = "linux", target_os = "freebsd")))'.dependencies] +wgpu = { workspace = true, default-features = true } [target.'cfg(target_family = "wasm")'.dependencies] -web-sys = { version = "0.3", features = ["HtmlCanvasElement"] } +web-sys = { workspace = true, features = ["HtmlCanvasElement"] } wgpu = { workspace = true, features = ["webgl"] } [dev-dependencies] diff --git a/crates/gpui_windows/Cargo.toml b/crates/gpui_windows/Cargo.toml index a0aaa5dde31..37e4a2f7f22 100644 --- a/crates/gpui_windows/Cargo.toml +++ b/crates/gpui_windows/Cargo.toml @@ -37,8 +37,35 @@ rand.workspace = true raw-window-handle.workspace = true scheduler.workspace = true smallvec.workspace = true -uuid.workspace = true -windows = { workspace = true, features = ["Win32_System_StationsAndDesktops"] } +uuid = { workspace = true, features = ["v5"] } +windows = { workspace = true, features = [ + "Data_Xml_Dom", + "UI_Notifications", + "UI_ViewManagement", + "Wdk_System_SystemServices", + "Win32_Graphics_Direct3D11", + "Win32_Graphics_Direct3D_Fxc", + "Win32_Graphics_DirectComposition", + "Win32_Graphics_DirectManipulation", + "Win32_Graphics_DirectWrite", + "Win32_Graphics_Dwm", + "Win32_Graphics_Dxgi_Common", + "Win32_Graphics_Hlsl", + "Win32_Media", + "Win32_Security_Credentials", + "Win32_Storage_Packaging_Appx", + "Win32_System_DataExchange", + "Win32_System_Diagnostics_Debug", + "Win32_System_Memory", + "Win32_System_Performance", + "Win32_System_StationsAndDesktops", + "Win32_System_SystemInformation", + "Win32_System_SystemServices", + "Win32_UI_Controls", + "Win32_UI_HiDpi", + "Win32_UI_Input_Ime", + "Win32_UI_Input_Pointer", +] } windows-core.workspace = true windows-numerics = "0.3" windows-registry.workspace = true diff --git a/crates/gpui_windows/build.rs b/crates/gpui_windows/build.rs index 1db95715e26..46d5567ee3a 100644 --- a/crates/gpui_windows/build.rs +++ b/crates/gpui_windows/build.rs @@ -1,6 +1,8 @@ #![allow(clippy::disallowed_methods, reason = "build scripts are exempt")] fn main() { + #[cfg(not(all(target_os = "windows", not(debug_assertions))))] + println!("cargo:rerun-if-changed=build.rs"); #[cfg(target_os = "windows")] { // Compile HLSL shaders diff --git a/crates/html_to_markdown/Cargo.toml b/crates/html_to_markdown/Cargo.toml index 8dc631f324b..daf62390cbb 100644 --- a/crates/html_to_markdown/Cargo.toml +++ b/crates/html_to_markdown/Cargo.toml @@ -20,7 +20,7 @@ doctest = false anyhow.workspace = true html5ever.workspace = true markup5ever_rcdom.workspace = true -regex.workspace = true +regex = { workspace = true, features = ["unicode-perl"] } [dev-dependencies] indoc.workspace = true diff --git a/crates/http_client/Cargo.toml b/crates/http_client/Cargo.toml index ba2282a0ca3..6c1a58aba6c 100644 --- a/crates/http_client/Cargo.toml +++ b/crates/http_client/Cargo.toml @@ -10,8 +10,9 @@ description = "A HTTP client library for Zed and GPUI" workspace = true [features] -test-support = [] +test-support = ["dep:log"] github-download = [ + "dep:async-compression", "dep:async-fs", "dep:async-tar", "dep:sha2", @@ -25,13 +26,11 @@ doctest = false [dependencies] anyhow.workspace = true -async-compression.workspace = true bytes.workspace = true -derive_more.workspace = true futures.workspace = true http-body.workspace = true http.workspace = true -log.workspace = true +log = { workspace = true, optional = true } parking_lot.workspace = true serde.workspace = true serde_json.workspace = true @@ -39,6 +38,8 @@ serde_urlencoded.workspace = true url.workspace = true [target.'cfg(not(target_family = "wasm"))'.dependencies] +log.workspace = true +async-compression = { workspace = true, optional = true } util = { workspace = true, optional = true } async-fs = { workspace = true, optional = true } async-tar = { workspace = true, optional = true } diff --git a/crates/http_client/src/http_client.rs b/crates/http_client/src/http_client.rs index fe2a3d0069d..380ff535d97 100644 --- a/crates/http_client/src/http_client.rs +++ b/crates/http_client/src/http_client.rs @@ -6,7 +6,6 @@ pub mod github_download; pub use anyhow::{Result, anyhow}; pub use async_body::{AsyncBody, Inner, Json}; -use derive_more::Deref; pub use http::{self, Method, Request, Response, StatusCode, Uri, request::Builder}; use http::{HeaderName, HeaderValue}; @@ -15,7 +14,7 @@ use parking_lot::Mutex; use serde::Serialize; #[cfg(feature = "test-support")] use std::{any::type_name, fmt}; -use std::{sync::Arc, time::Duration}; +use std::{ops::Deref, sync::Arc, time::Duration}; pub use url::{Host, Url}; #[derive(Default, Debug, Clone, PartialEq, Eq, Hash)] @@ -175,9 +174,7 @@ pub trait HttpClient: 'static + Send + Sync { } /// An [`HttpClient`] that may have a proxy. -#[derive(Deref)] pub struct HttpClientWithProxy { - #[deref] client: Arc, proxy: Option, } @@ -199,6 +196,15 @@ impl HttpClientWithProxy { } } +impl Deref for HttpClientWithProxy { + type Target = Arc; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.client + } +} + impl HttpClient for HttpClientWithProxy { fn send( &self, @@ -222,10 +228,8 @@ impl HttpClient for HttpClientWithProxy { } /// An [`HttpClient`] that has a base URL. -#[derive(Deref)] pub struct HttpClientWithUrl { base_url: Mutex, - #[deref] client: HttpClientWithProxy, } @@ -332,6 +336,15 @@ impl HttpClientWithUrl { } } +impl Deref for HttpClientWithUrl { + type Target = HttpClientWithProxy; + + #[inline] + fn deref(&self) -> &Self::Target { + &self.client + } +} + impl HttpClient for HttpClientWithUrl { fn send( &self, diff --git a/crates/http_client_tls/Cargo.toml b/crates/http_client_tls/Cargo.toml index 3b2f456b3b7..6e9790286f2 100644 --- a/crates/http_client_tls/Cargo.toml +++ b/crates/http_client_tls/Cargo.toml @@ -17,7 +17,7 @@ doctest = false test = false [dependencies] -log.workspace = true +log = { workspace = true, features = ["serde"] } rustls.workspace = true rustls-platform-verifier.workspace = true webpki-roots.workspace = true diff --git a/crates/http_proxy/Cargo.toml b/crates/http_proxy/Cargo.toml index 1b4faecf7d4..2ea11624d9a 100644 --- a/crates/http_proxy/Cargo.toml +++ b/crates/http_proxy/Cargo.toml @@ -27,7 +27,7 @@ base64.workspace = true futures.workspace = true httparse.workspace = true idna.workspace = true -log.workspace = true +log = { workspace = true, features = ["serde"] } percent-encoding.workspace = true proxyvars.workspace = true thiserror.workspace = true diff --git a/crates/icons/Cargo.toml b/crates/icons/Cargo.toml index 7eac6af6d18..a54c418e54e 100644 --- a/crates/icons/Cargo.toml +++ b/crates/icons/Cargo.toml @@ -13,5 +13,5 @@ path = "src/icons.rs" doctest = false [dependencies] -serde.workspace = true +serde = { workspace = true, features = ["derive"] } strum.workspace = true diff --git a/crates/inspector_ui/Cargo.toml b/crates/inspector_ui/Cargo.toml index 908479bb1f3..919b7f58712 100644 --- a/crates/inspector_ui/Cargo.toml +++ b/crates/inspector_ui/Cargo.toml @@ -25,7 +25,6 @@ serde_json_lenient.workspace = true theme_settings.workspace = true ui.workspace = true util.workspace = true -util_macros.workspace = true workspace.workspace = true zed_actions.workspace = true diff --git a/crates/inspector_ui/src/div_inspector.rs b/crates/inspector_ui/src/div_inspector.rs index 803386224c6..79cdfc878dd 100644 --- a/crates/inspector_ui/src/div_inspector.rs +++ b/crates/inspector_ui/src/div_inspector.rs @@ -29,7 +29,11 @@ use util::split_str_with_ranges; /// Path used for unsaved buffer that contains style json. To support the json language server, this /// matches the name used in the generated schemas. -const ZED_INSPECTOR_STYLE_JSON: &str = util_macros::path!("/zed-inspector-style.json"); +const ZED_INSPECTOR_STYLE_JSON: &str = if cfg!(target_os = "windows") { + r"C:\zed-inspector-style.json" +} else { + "/zed-inspector-style.json" +}; pub(crate) struct DivInspector { state: State, diff --git a/crates/install_cli/Cargo.toml b/crates/install_cli/Cargo.toml index 0083c6aa5c5..aa31950d4a8 100644 --- a/crates/install_cli/Cargo.toml +++ b/crates/install_cli/Cargo.toml @@ -24,4 +24,6 @@ log.workspace = true release_channel.workspace = true smol.workspace = true util.workspace = true + +[target.'cfg(not(target_os = "windows"))'.dependencies] workspace.workspace = true diff --git a/crates/language/Cargo.toml b/crates/language/Cargo.toml index 1e4772ff64c..55565fbae3b 100644 --- a/crates/language/Cargo.toml +++ b/crates/language/Cargo.toml @@ -50,7 +50,7 @@ itertools.workspace = true log.workspace = true lsp.workspace = true parking_lot.workspace = true -postage.workspace = true +postage = { workspace = true, features = ["futures-traits", "logging", "blocking"] } rand = { workspace = true, optional = true } regex.workspace = true rpc.workspace = true @@ -66,7 +66,6 @@ sum_tree.workspace = true task.workspace = true text.workspace = true theme.workspace = true -toml.workspace = true tracing.workspace = true grammars = { workspace = true, optional = true } tree-sitter-json = { workspace = true, optional = true } @@ -75,7 +74,7 @@ tree-sitter-python = { workspace = true, optional = true } tree-sitter-rust = { workspace = true, optional = true } tree-sitter-typescript = { workspace = true, optional = true } tree-sitter = { workspace = true, features = ["wasm"] } -unicase = "2.6" +unicase.workspace = true util.workspace = true watch.workspace = true zlog.workspace = true diff --git a/crates/language/build.rs b/crates/language/build.rs deleted file mode 100644 index 90d5a4cb2d7..00000000000 --- a/crates/language/build.rs +++ /dev/null @@ -1,5 +0,0 @@ -fn main() { - if let Ok(bundled) = std::env::var("ZED_BUNDLE") { - println!("cargo:rustc-env=ZED_BUNDLE={}", bundled); - } -} diff --git a/crates/language_core/Cargo.toml b/crates/language_core/Cargo.toml index 5281c3e1b34..5b5dada8afd 100644 --- a/crates/language_core/Cargo.toml +++ b/crates/language_core/Cargo.toml @@ -18,9 +18,9 @@ log.workspace = true lru.workspace = true parking_lot.workspace = true path.workspace = true -regex.workspace = true -schemars.workspace = true -serde.workspace = true +regex = { workspace = true, default-features = true } +schemars = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true smallvec.workspace = true strum.workspace = true diff --git a/crates/language_model_core/Cargo.toml b/crates/language_model_core/Cargo.toml index 4ee946ad2fe..029d90e8875 100644 --- a/crates/language_model_core/Cargo.toml +++ b/crates/language_model_core/Cargo.toml @@ -17,21 +17,20 @@ cloud_llm_client.workspace = true collections.workspace = true futures.workspace = true gpui_shared_string.workspace = true -http_client.workspace = true +http.workspace = true log.workspace = true partial-json-fixer.workspace = true -schemars.workspace = true +schemars = { workspace = true, features = ["derive"] } serde.workspace = true serde_json.workspace = true strum.workspace = true thiserror.workspace = true [target.'cfg(all(target_arch = "wasm32", target_os = "unknown"))'.dependencies] -# Workspace inheritance would re-enable defaults, including blocking synchronization. -async-lock = { version = "3.4.2", default-features = false } +async-lock.workspace = true [target.'cfg(not(all(target_arch = "wasm32", target_os = "unknown")))'.dependencies] -async-lock.workspace = true +async-lock = { workspace = true, features = ["std"] } [dev-dependencies] pretty_assertions.workspace = true diff --git a/crates/language_model_core/src/language_model_core.rs b/crates/language_model_core/src/language_model_core.rs index 25f911d4ced..244a5e6e8e0 100644 --- a/crates/language_model_core/src/language_model_core.rs +++ b/crates/language_model_core/src/language_model_core.rs @@ -8,7 +8,7 @@ pub mod util; use anyhow::{Context as _, Result, anyhow}; use cloud_llm_client::CompletionRequestStatus; -use http_client::{StatusCode, http}; +use http::StatusCode; use schemars::JsonSchema; use serde::{Deserialize, Serialize}; use std::ops::{Add, Sub}; diff --git a/crates/language_model_core/src/provider.rs b/crates/language_model_core/src/provider.rs index 317a0ab2800..04cfa3ac6a5 100644 --- a/crates/language_model_core/src/provider.rs +++ b/crates/language_model_core/src/provider.rs @@ -9,6 +9,7 @@ pub const OPEN_AI_PROVIDER_ID: LanguageModelProviderId = LanguageModelProviderId pub const OPEN_AI_PROVIDER_NAME: LanguageModelProviderName = LanguageModelProviderName::new("OpenAI"); +pub const GOOGLE_AI_API_URL: &str = "https://generativelanguage.googleapis.com"; pub const GOOGLE_PROVIDER_ID: LanguageModelProviderId = LanguageModelProviderId::new("google"); pub const GOOGLE_PROVIDER_NAME: LanguageModelProviderName = LanguageModelProviderName::new("Google AI"); diff --git a/crates/language_models/Cargo.toml b/crates/language_models/Cargo.toml index de0d53de4b3..7a152e43f73 100644 --- a/crates/language_models/Cargo.toml +++ b/crates/language_models/Cargo.toml @@ -19,8 +19,8 @@ test-support = [] ai_onboarding.workspace = true anthropic = { workspace = true, features = ["schemars"] } anyhow.workspace = true -aws-config = { workspace = true, features = ["behavior-version-latest"] } -aws-credential-types = { workspace = true, features = ["hardcoded-credentials"] } +aws-config.workspace = true +aws-credential-types.workspace = true aws-sigv4.workspace = true aws_http_client.workspace = true base64.workspace = true @@ -54,7 +54,7 @@ ollama = { workspace = true, features = ["schemars"] } open_ai = { workspace = true, features = ["schemars"] } openai_subscribed.workspace = true opencode = { workspace = true, features = ["schemars"] } -open_router = { workspace = true, features = ["schemars"] } +open_router.workspace = true paths.workspace = true rand.workspace = true release_channel.workspace = true diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml index a21f473ffae..5e0d8003eab 100644 --- a/crates/languages/Cargo.toml +++ b/crates/languages/Cargo.toml @@ -71,7 +71,7 @@ util.workspace = true fs = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] } pretty_assertions.workspace = true -tempfile = { workspace = true} +tempfile.workspace = true settings = { workspace = true, features = ["test-support"] } theme = { workspace = true, features = ["test-support"] } tree-sitter-bash.workspace = true diff --git a/crates/livekit_api/Cargo.toml b/crates/livekit_api/Cargo.toml index be6995479a7..580c7bce364 100644 --- a/crates/livekit_api/Cargo.toml +++ b/crates/livekit_api/Cargo.toml @@ -20,10 +20,10 @@ test-support = [] anyhow.workspace = true async-trait.workspace = true jsonwebtoken = { workspace = true, features = ["aws_lc_rs"] } -log.workspace = true +log = { workspace = true, features = ["serde"] } prost.workspace = true prost-types.workspace = true -reqwest.workspace = true +reqwest = { workspace = true, features = ["charset"] } serde.workspace = true [build-dependencies] diff --git a/crates/livekit_client/Cargo.toml b/crates/livekit_client/Cargo.toml index 34feb6f9356..5d3a86b8cbf 100644 --- a/crates/livekit_client/Cargo.toml +++ b/crates/livekit_client/Cargo.toml @@ -17,7 +17,7 @@ doctest = false name = "test_app" [features] -test-support = ["collections/test-support", "gpui/test-support", "livekit_api/test-support"] +test-support = ["collections/test-support", "gpui/test-support", "livekit_api/test-support", "dep:nanoid", "dep:postage"] [dependencies] anyhow.workspace = true @@ -32,9 +32,9 @@ http_client_tls.workspace = true image.workspace = true livekit_api = { workspace = true, optional = true } log.workspace = true -nanoid.workspace = true +nanoid = { workspace = true, optional = true } parking_lot.workspace = true -postage.workspace = true +postage = { workspace = true, optional = true, features = ["futures-traits", "logging", "blocking"] } rodio.workspace = true serde.workspace = true serde_urlencoded.workspace = true @@ -45,6 +45,8 @@ util.workspace = true [target.'cfg(any(all(target_os = "windows", target_env = "gnu"), target_os = "freebsd"))'.dependencies] livekit_api.workspace = true +nanoid.workspace = true +postage = { workspace = true, features = ["futures-traits", "logging", "blocking"] } [target.'cfg(not(any(all(target_os = "windows", target_env = "gnu"), target_os = "freebsd")))'.dependencies] libwebrtc.workspace = true @@ -61,17 +63,19 @@ scap.workspace = true core-foundation.workspace = true core-video.workspace = true objc2-core-foundation.workspace = true -coreaudio-rs = "0.12.1" +coreaudio-rs = { workspace = true, features = ["core_audio"] } [dev-dependencies] collections = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } gpui_platform.workspace = true livekit_api = { workspace = true, features = ["test-support"] } +nanoid.workspace = true +postage = { workspace = true, features = ["futures-traits", "logging"] } simplelog.workspace = true [build-dependencies] -serde.workspace = true +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true [package.metadata.cargo-shear] diff --git a/crates/lsp/Cargo.toml b/crates/lsp/Cargo.toml index 7bffc73f2f4..0a1d58c2fbf 100644 --- a/crates/lsp/Cargo.toml +++ b/crates/lsp/Cargo.toml @@ -17,7 +17,7 @@ test-support = ["async-pipe"] [dependencies] anyhow.workspace = true -async-channel.workspace = true +async-channel = { workspace = true, features = ["std"] } async-pipe = { workspace = true, optional = true } collections.workspace = true futures-lite.workspace = true diff --git a/crates/markdown/Cargo.toml b/crates/markdown/Cargo.toml index ebc64a2b44c..e6f258c5019 100644 --- a/crates/markdown/Cargo.toml +++ b/crates/markdown/Cargo.toml @@ -28,7 +28,7 @@ language.workspace = true linkify.workspace = true log.workspace = true markup5ever_rcdom.workspace = true -mermaid_render = { path = "../mermaid_render" } +mermaid_render.workspace = true pulldown-cmark.workspace = true settings.workspace = true smallvec.workspace = true diff --git a/crates/mermaid_render/Cargo.toml b/crates/mermaid_render/Cargo.toml index 3db9744478d..e0f79eee254 100644 --- a/crates/mermaid_render/Cargo.toml +++ b/crates/mermaid_render/Cargo.toml @@ -18,7 +18,7 @@ test-support = [] [dependencies] anyhow.workspace = true gpui.workspace = true -merman = { version = "=0.8.0-alpha.5", default-features = false, features = [ +merman = { workspace = true, features = [ "layout-cytoscape", "svg", ] } @@ -29,7 +29,7 @@ ztracing.workspace = true [dev-dependencies] gpui = { workspace = true, features = ["test-support"] } -mermaid_render = { path = ".", features = ["test-support"] } +mermaid_render = { workspace = true, features = ["test-support"] } usvg.workspace = true [package.metadata.cargo-shear] diff --git a/crates/miniprofiler_ui/Cargo.toml b/crates/miniprofiler_ui/Cargo.toml index 5c60b582d54..2291d2a9cf9 100644 --- a/crates/miniprofiler_ui/Cargo.toml +++ b/crates/miniprofiler_ui/Cargo.toml @@ -24,6 +24,3 @@ workspace.workspace = true util.workspace = true serde_json.workspace = true smol.workspace = true - -[dev-dependencies] -gpui = { workspace = true, features = ["test-support"] } diff --git a/crates/mistral/Cargo.toml b/crates/mistral/Cargo.toml index d76b533f7c3..314d750a4f8 100644 --- a/crates/mistral/Cargo.toml +++ b/crates/mistral/Cargo.toml @@ -21,7 +21,7 @@ schemars = ["dep:schemars"] anyhow.workspace = true futures.workspace = true http_client.workspace = true -schemars = { workspace = true, optional = true } +schemars = { workspace = true, features = ["derive"], optional = true } serde.workspace = true serde_json.workspace = true strum.workspace = true diff --git a/crates/net/Cargo.toml b/crates/net/Cargo.toml index 2321b451d5a..88900483c5d 100644 --- a/crates/net/Cargo.toml +++ b/crates/net/Cargo.toml @@ -16,8 +16,8 @@ doctest = false smol.workspace = true [target.'cfg(target_os = "windows")'.dependencies] -async-io = "2.4" -windows.workspace = true +async-io.workspace = true +windows = { workspace = true, features = ["Win32_Networking_WinSock"] } [dev-dependencies] tempfile.workspace = true diff --git a/crates/node_runtime/Cargo.toml b/crates/node_runtime/Cargo.toml index 494084b9cd6..2f7b29ae291 100644 --- a/crates/node_runtime/Cargo.toml +++ b/crates/node_runtime/Cargo.toml @@ -20,7 +20,7 @@ anyhow.workspace = true async-compression.workspace = true async-tar.workspace = true async-trait.workspace = true -chrono.workspace = true +chrono = { workspace = true, default-features = true } futures.workspace = true http_client.workspace = true log.workspace = true diff --git a/crates/notifications/Cargo.toml b/crates/notifications/Cargo.toml index 11f27dcb32f..4ebef126017 100644 --- a/crates/notifications/Cargo.toml +++ b/crates/notifications/Cargo.toml @@ -36,11 +36,5 @@ util.workspace = true workspace.workspace = true zed_actions.workspace = true -[dev-dependencies] -client = { workspace = true, features = ["test-support"] } -gpui = { workspace = true, features = ["test-support"] } -rpc = { workspace = true, features = ["test-support"] } -util = { workspace = true, features = ["test-support"] } - [package.metadata.cargo-shear] ignored = ["component"] diff --git a/crates/oauth_callback_server/Cargo.toml b/crates/oauth_callback_server/Cargo.toml index 5baf4606130..8ce0e432ac4 100644 --- a/crates/oauth_callback_server/Cargo.toml +++ b/crates/oauth_callback_server/Cargo.toml @@ -19,6 +19,6 @@ anyhow.workspace = true [target.'cfg(not(target_family = "wasm"))'.dependencies] futures.workspace = true -log.workspace = true +log = { workspace = true, features = ["serde"] } tiny_http.workspace = true url.workspace = true diff --git a/crates/ollama/Cargo.toml b/crates/ollama/Cargo.toml index 01ef988526c..f70245caeac 100644 --- a/crates/ollama/Cargo.toml +++ b/crates/ollama/Cargo.toml @@ -23,4 +23,4 @@ http_client.workspace = true schemars = { workspace = true, optional = true } serde.workspace = true serde_json.workspace = true -settings.workspace = true +settings_content.workspace = true diff --git a/crates/ollama/src/ollama.rs b/crates/ollama/src/ollama.rs index 046a71286f2..196160e6676 100644 --- a/crates/ollama/src/ollama.rs +++ b/crates/ollama/src/ollama.rs @@ -7,7 +7,7 @@ use http_client::{ }; use serde::{Deserialize, Serialize}; use serde_json::Value; -pub use settings::KeepAlive; +pub use settings_content::KeepAlive; pub const OLLAMA_API_URL: &str = "http://localhost:11434"; diff --git a/crates/open_ai/Cargo.toml b/crates/open_ai/Cargo.toml index f07e3bbfaa9..8d603835890 100644 --- a/crates/open_ai/Cargo.toml +++ b/crates/open_ai/Cargo.toml @@ -22,7 +22,7 @@ collections.workspace = true futures.workspace = true http_client.workspace = true language_model_core.workspace = true -rand.workspace = true +rand = { workspace = true, features = ["small_rng", "thread_rng"] } schemars = { workspace = true, optional = true } log.workspace = true serde.workspace = true diff --git a/crates/openai_subscribed/Cargo.toml b/crates/openai_subscribed/Cargo.toml index 0eca2c0f452..c06b473e96d 100644 --- a/crates/openai_subscribed/Cargo.toml +++ b/crates/openai_subscribed/Cargo.toml @@ -18,6 +18,7 @@ base64.workspace = true credentials_provider.workspace = true futures.workspace = true gpui.workspace = true +gpui_util.workspace = true http_client.workspace = true language_model.workspace = true log.workspace = true @@ -29,7 +30,6 @@ serde_json.workspace = true sha2.workspace = true smol.workspace = true url.workspace = true -util.workspace = true [dev-dependencies] gpui = { workspace = true, features = ["test-support"] } diff --git a/crates/openai_subscribed/src/openai_subscribed.rs b/crates/openai_subscribed/src/openai_subscribed.rs index 58629a6382e..ad737a93e0d 100644 --- a/crates/openai_subscribed/src/openai_subscribed.rs +++ b/crates/openai_subscribed/src/openai_subscribed.rs @@ -4,6 +4,7 @@ use base64::engine::general_purpose::URL_SAFE_NO_PAD; use credentials_provider::CredentialsProvider; use futures::{FutureExt, StreamExt, future::BoxFuture, future::Shared}; use gpui::{AsyncApp, Context, Entity, SharedString, Task, WeakEntity}; +use gpui_util::ResultExt as _; use http_client::{ AsyncBody, CustomHeaders, HttpClient, Method, Request as HttpRequest, RequestBuilderExt as _, http::{HeaderName, HeaderValue}, @@ -24,7 +25,6 @@ use sha2::{Digest, Sha256}; use std::sync::Arc; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use url::form_urlencoded; -use util::ResultExt as _; use open_ai::completion::{OpenAiResponseEventMapper, into_open_ai_response}; diff --git a/crates/path/Cargo.toml b/crates/path/Cargo.toml index f1668b78ced..086d9d2159e 100644 --- a/crates/path/Cargo.toml +++ b/crates/path/Cargo.toml @@ -15,7 +15,10 @@ test-support = [] [dependencies] anyhow.workspace = true dunce.workspace = true -serde = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"], optional = true } + +[target.'cfg(windows)'.dependencies] +tendril.workspace = true [dev-dependencies] tempfile.workspace = true diff --git a/crates/path/src/path.rs b/crates/path/src/path.rs index baa1b3bd3dd..d425b54fabb 100644 --- a/crates/path/src/path.rs +++ b/crates/path/src/path.rs @@ -6,11 +6,17 @@ //! //! Adapted from Zed's `util::rel_path` module. +#[cfg(windows)] +use anyhow::Context; +#[cfg(all(unix, not(target_family = "wasm")))] +use std::os::unix::prelude::OsStrExt; use std::{ borrow::Cow, ffi::OsStr, path::{Path, PathBuf}, }; +#[cfg(windows)] +use tendril::fmt::{Format, WTF8}; use crate::path_component::{Component, Components, Prefix, PrefixExt, iter_after}; use crate::rel_path::RelPath; @@ -20,6 +26,34 @@ mod path_component; pub mod rel_path; mod windows_prefix; +pub fn try_from_bytes<'a, T>(bytes: &'a [u8]) -> anyhow::Result +where + T: From<&'a Path>, +{ + #[cfg(target_family = "wasm")] + { + std::str::from_utf8(bytes) + .map(Path::new) + .map(Into::into) + .map_err(Into::into) + } + #[cfg(all(unix, not(target_family = "wasm")))] + { + Ok(T::from(Path::new(OsStr::from_bytes(bytes)))) + } + #[cfg(windows)] + { + WTF8::validate(bytes) + .then(|| { + // Safety: bytes are valid WTF-8 sequence. + T::from(Path::new(unsafe { + OsStr::from_encoded_bytes_unchecked(bytes) + })) + }) + .with_context(|| format!("Invalid WTF-8 sequence: {bytes:?}")) + } +} + pub trait PathExt { fn to_rel_path_buf(&self) -> anyhow::Result; } diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml index 45626f1b33f..de0762bb8e2 100644 --- a/crates/project/Cargo.toml +++ b/crates/project/Cargo.toml @@ -41,7 +41,6 @@ async-lock.workspace = true async-trait.workspace = true base64.workspace = true buffer_diff.workspace = true -circular-buffer.workspace = true client.workspace = true clock.workspace = true collections.workspace = true diff --git a/crates/project/src/debugger/session.rs b/crates/project/src/debugger/session.rs index 90b3c610467..6e972ca4cf0 100644 --- a/crates/project/src/debugger/session.rs +++ b/crates/project/src/debugger/session.rs @@ -700,7 +700,7 @@ pub struct Session { child_session_ids: HashSet, parent_session: Option>, output_token: OutputToken, - output: Box>, + output: VecDeque, watchers: HashMap, is_session_terminated: bool, requests: TypeIdHashMap>>>>, @@ -874,7 +874,7 @@ impl Session { capabilities: Capabilities::default(), watchers: HashMap::default(), output_token: OutputToken(0), - output: circular_buffer::CircularBuffer::boxed(), + output: VecDeque::with_capacity(MAX_TRACKED_OUTPUT_EVENTS), requests: Default::default(), background_tasks: Vec::default(), restart_task: None, @@ -1786,6 +1786,9 @@ impl Session { } fn push_output(&mut self, event: OutputEvent) { + if self.output.len() == MAX_TRACKED_OUTPUT_EVENTS { + self.output.pop_front(); + } self.output.push_back(event); self.output_token.0 += 1; } diff --git a/crates/project_panel/Cargo.toml b/crates/project_panel/Cargo.toml index bf729392a40..c0429da57b3 100644 --- a/crates/project_panel/Cargo.toml +++ b/crates/project_panel/Cargo.toml @@ -27,7 +27,6 @@ git.workspace = true gpui.workspace = true itertools.workspace = true menu.workspace = true -pretty_assertions.workspace = true project.workspace = true schemars.workspace = true serde.workspace = true @@ -58,6 +57,7 @@ editor = { workspace = true, features = ["test-support"] } git_ui = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } language = { workspace = true, features = ["test-support"] } +pretty_assertions.workspace = true serde_json.workspace = true tempfile.workspace = true workspace = { workspace = true, features = ["test-support"] } diff --git a/crates/proto/Cargo.toml b/crates/proto/Cargo.toml index 68ad460a0b2..6304d031c04 100644 --- a/crates/proto/Cargo.toml +++ b/crates/proto/Cargo.toml @@ -19,7 +19,7 @@ doctest = false [dependencies] anyhow.workspace = true prost.workspace = true -serde.workspace = true +serde = { workspace = true, features = ["derive"] } [build-dependencies] prost-build.workspace = true diff --git a/crates/refineable/derive_refineable/Cargo.toml b/crates/refineable/derive_refineable/Cargo.toml index 8c3f7c1dfb0..2efd0a690b3 100644 --- a/crates/refineable/derive_refineable/Cargo.toml +++ b/crates/refineable/derive_refineable/Cargo.toml @@ -19,4 +19,4 @@ test = false [dependencies] proc-macro2.workspace = true quote.workspace = true -syn.workspace = true +syn = { workspace = true, default-features = true } diff --git a/crates/remote/Cargo.toml b/crates/remote/Cargo.toml index 2c2442ea0be..3f78b802041 100644 --- a/crates/remote/Cargo.toml +++ b/crates/remote/Cargo.toml @@ -24,10 +24,10 @@ askpass.workspace = true async-trait.workspace = true base64.workspace = true collections.workspace = true -fs.workspace = true +fs = { workspace = true, optional = true } futures.workspace = true gpui.workspace = true -log.workspace = true +log = { workspace = true, features = ["kv_unstable_std"] } parking_lot.workspace = true paths.workspace = true release_channel.workspace = true @@ -36,7 +36,7 @@ schemars.workspace = true semver.workspace = true serde.workspace = true serde_json.workspace = true -settings.workspace = true +settings_content.workspace = true smol.workspace = true telemetry.workspace = true tempfile.workspace = true @@ -47,5 +47,3 @@ which.workspace = true [dev-dependencies] gpui = { workspace = true, features = ["test-support"] } -fs = { workspace = true, features = ["test-support"] } -util = { workspace = true, features = ["test-support"] } diff --git a/crates/remote/src/transport/ssh.rs b/crates/remote/src/transport/ssh.rs index 5c9ab757162..86ad4c41afb 100644 --- a/crates/remote/src/transport/ssh.rs +++ b/crates/remote/src/transport/ssh.rs @@ -17,7 +17,7 @@ use paths::remote_server_dir_relative; use release_channel::{AppVersion, ReleaseChannel}; use rpc::proto::Envelope; use semver::Version; -pub use settings::SshPortForwardOption; +pub use settings_content::SshPortForwardOption; use smol::fs; use std::{ net::IpAddr, @@ -147,8 +147,8 @@ pub struct SshConnectionOptions { pub upload_binary_over_ssh: bool, } -impl From for SshConnectionOptions { - fn from(val: settings::SshConnection) -> Self { +impl From for SshConnectionOptions { + fn from(val: settings_content::SshConnection) -> Self { SshConnectionOptions { host: val.host.to_string().into(), username: val.username, diff --git a/crates/remote/src/transport/wsl.rs b/crates/remote/src/transport/wsl.rs index 8f53d37526c..c5010767449 100644 --- a/crates/remote/src/transport/wsl.rs +++ b/crates/remote/src/transport/wsl.rs @@ -39,8 +39,8 @@ pub struct WslConnectionOptions { pub user: Option, } -impl From for WslConnectionOptions { - fn from(val: settings::WslConnection) -> Self { +impl From for WslConnectionOptions { + fn from(val: settings_content::WslConnection) -> Self { WslConnectionOptions { distro_name: val.distro_name, user: val.user, diff --git a/crates/remote_server/Cargo.toml b/crates/remote_server/Cargo.toml index 6e36f605753..ee62cc76187 100644 --- a/crates/remote_server/Cargo.toml +++ b/crates/remote_server/Cargo.toml @@ -22,7 +22,6 @@ debug-embed = ["dep:rust-embed", "util/debug-embed"] test-support = ["fs/test-support"] [dependencies] -acp_thread.workspace = true anyhow.workspace = true async-channel.workspace = true askpass.workspace = true @@ -81,6 +80,7 @@ windows.workspace = true gpui = { workspace = true, features = ["windows-manifest"] } [dev-dependencies] +acp_thread.workspace = true action_log.workspace = true agent = { workspace = true, features = ["test-support"] } agent-client-protocol.workspace = true @@ -106,8 +106,7 @@ workspace = { workspace = true, features = ["test-support"] } zlog.workspace = true [build-dependencies] -cargo_toml.workspace = true -toml.workspace = true +toml_edit.workspace = true [package.metadata.cargo-shear] ignored = ["rust-embed"] diff --git a/crates/remote_server/build.rs b/crates/remote_server/build.rs index 3ad13d3d6e5..98f5bf10528 100644 --- a/crates/remote_server/build.rs +++ b/crates/remote_server/build.rs @@ -4,12 +4,14 @@ use std::process::Command; const ZED_MANIFEST: &str = include_str!("../zed/Cargo.toml"); fn main() { - let zed_cargo_toml: cargo_toml::Manifest = - toml::from_str(ZED_MANIFEST).expect("failed to parse zed Cargo.toml"); - println!( - "cargo:rustc-env=ZED_PKG_VERSION={}", - zed_cargo_toml.package.unwrap().version.unwrap() - ); + let zed_cargo_toml = + toml_edit::ImDocument::parse(ZED_MANIFEST).expect("failed to parse zed Cargo.toml"); + let version = zed_cargo_toml + .get("package") + .and_then(|package| package.get("version")) + .and_then(toml_edit::Item::as_str) + .expect("zed Cargo.toml must declare a package version string"); + println!("cargo:rustc-env=ZED_PKG_VERSION={version}"); println!( "cargo:rustc-env=TARGET={}", std::env::var("TARGET").unwrap() diff --git a/crates/reqwest_client/Cargo.toml b/crates/reqwest_client/Cargo.toml index 066c1b0ef57..4dfdb33384d 100644 --- a/crates/reqwest_client/Cargo.toml +++ b/crates/reqwest_client/Cargo.toml @@ -21,7 +21,7 @@ bytes.workspace = true futures.workspace = true http_client.workspace = true log.workspace = true -tokio = { workspace = true, features = ["rt", "rt-multi-thread"] } +tokio = { workspace = true, features = ["rt-multi-thread"] } regex.workspace = true reqwest.workspace = true gpui_util.workspace = true diff --git a/crates/rope/Cargo.toml b/crates/rope/Cargo.toml index 41fb3b87fd5..abdd6515205 100644 --- a/crates/rope/Cargo.toml +++ b/crates/rope/Cargo.toml @@ -13,12 +13,12 @@ path = "src/rope.rs" doctest = false [dependencies] +gpui_util.workspace = true heapless.workspace = true log.workspace = true rayon.workspace = true sum_tree.workspace = true unicode-segmentation.workspace = true -util.workspace = true ztracing.workspace = true tracing.workspace = true diff --git a/crates/rope/src/chunk.rs b/crates/rope/src/chunk.rs index 96fc743a331..961bfbe4c87 100644 --- a/crates/rope/src/chunk.rs +++ b/crates/rope/src/chunk.rs @@ -1,9 +1,9 @@ use crate::{OffsetUtf16, Point, PointUtf16, TextSummary, Unclipped}; +use gpui_util::{debug_panic, is_utf8_char_boundary}; use heapless::String as ArrayString; use std::{cmp, ops::Range}; use sum_tree::Bias; use unicode_segmentation::GraphemeCursor; -use util::debug_panic; #[cfg(not(all(test, not(rust_analyzer))))] pub(crate) type Bitmap = u128; @@ -73,7 +73,7 @@ impl Chunk { let mut chars_utf16 = 0; for (ix, &b) in chunk.iter().enumerate() { - chars |= (util::is_utf8_char_boundary(b) as u8) << ix; + chars |= (is_utf8_char_boundary(b) as u8) << ix; newlines |= ((b == b'\n') as u8) << ix; tabs |= ((b == b'\t') as u8) << ix; // b >= 240 when we are at the first byte of the 4 byte encoded @@ -189,7 +189,7 @@ impl Chunk { } else { let mut i = index; while i > 0 { - if util::is_utf8_char_boundary(self.text.as_bytes()[i]) { + if is_utf8_char_boundary(self.text.as_bytes()[i]) { break; } i -= 1; diff --git a/crates/rpc/Cargo.toml b/crates/rpc/Cargo.toml index dcf890e9c91..ff83d61d7f5 100644 --- a/crates/rpc/Cargo.toml +++ b/crates/rpc/Cargo.toml @@ -24,6 +24,7 @@ base64.workspace = true collections.workspace = true futures.workspace = true gpui = { workspace = true, optional = true } +gpui_util.workspace = true parking_lot.workspace = true proto.workspace = true rand.workspace = true @@ -32,8 +33,7 @@ serde.workspace = true serde_json.workspace = true sha2.workspace = true strum.workspace = true -tracing = { version = "0.1.34", features = ["log"] } -util.workspace = true +tracing = { version = "0.1", default-features = false, features = ["std", "log"] } zstd.workspace = true [dev-dependencies] diff --git a/crates/rpc/src/peer.rs b/crates/rpc/src/peer.rs index 2ab50ae0e36..9a61a527ce2 100644 --- a/crates/rpc/src/peer.rs +++ b/crates/rpc/src/peer.rs @@ -153,7 +153,7 @@ impl Peer { let handle_io = async move { tracing::trace!(%connection_id, "handle io future: start"); - let _end_connection = util::defer(|| { + let _end_connection = gpui_util::defer(|| { response_channels.lock().take(); if let Some(channels) = stream_response_channels.lock().take() { for channel in channels.values() { @@ -422,7 +422,7 @@ impl Peer { async move { let (message_id, stream_response_channels) = send?; let stream_response_channels = Arc::downgrade(&stream_response_channels); - let cleanup_stream_response_channel = util::defer({ + let cleanup_stream_response_channel = gpui_util::defer({ let stream_response_channels = stream_response_channels.clone(); move || { if let Some(channels) = stream_response_channels.upgrade() @@ -606,7 +606,7 @@ impl Peer { async move { let message_id = incoming.id; tracing::trace!(?incoming, "incoming message future: start"); - let _end = util::defer(move || { + let _end = gpui_util::defer(move || { tracing::trace!(%connection_id, message_id, "incoming message future: end"); }); diff --git a/crates/sandbox/Cargo.toml b/crates/sandbox/Cargo.toml index 672d0bfb0bc..fe9ca8e8f3c 100644 --- a/crates/sandbox/Cargo.toml +++ b/crates/sandbox/Cargo.toml @@ -51,7 +51,7 @@ http_proxy.workspace = true log.workspace = true # Used only by the `nixos-test` helper binary to parse its check list; gated # behind the `nixos-test` feature so normal builds don't pull it in. -serde = { workspace = true, optional = true } +serde = { workspace = true, features = ["derive"], optional = true } serde_json = { workspace = true, optional = true } [target.'cfg(target_os = "linux")'.dependencies] @@ -74,7 +74,7 @@ gpui = { workspace = true, features = ["test-support"] } tempfile.workspace = true [target.'cfg(target_os = "windows")'.dependencies] -smol.workspace = true # Structural WSL-installed check (registered distros under HKCU\...\Lxss) # without spawning `wsl.exe`. +smol.workspace = true windows-registry.workspace = true diff --git a/crates/scheduler/Cargo.toml b/crates/scheduler/Cargo.toml index bec534c98cf..714bcc9d6b1 100644 --- a/crates/scheduler/Cargo.toml +++ b/crates/scheduler/Cargo.toml @@ -28,7 +28,7 @@ wasm-threads = ["dep:wasm_thread", "flume/spin"] [dependencies] async-task.workspace = true backtrace.workspace = true -chrono.workspace = true +chrono = { workspace = true, features = ["now", "wasmbind"] } flume.workspace = true futures.workspace = true parking_lot.workspace = true @@ -36,8 +36,4 @@ rand.workspace = true web-time.workspace = true [target.'cfg(target_family = "wasm")'.dependencies] -# Forked because upstream is unmaintained and its worker bootstrap still calls -# the wasm-bindgen init function with the positional arguments deprecated in 0.2.93. -wasm_thread = { git = "https://github.com/zed-industries/wasm_thread", rev = "0cf96c7708dfb97ccf3da50347e25edcf75d6937", version = "0.3", features = [ - "es_modules", -], optional = true } +wasm_thread = { workspace = true, optional = true } diff --git a/crates/schema_generator/Cargo.toml b/crates/schema_generator/Cargo.toml index de9c0232d52..bd37b95668b 100644 --- a/crates/schema_generator/Cargo.toml +++ b/crates/schema_generator/Cargo.toml @@ -10,9 +10,9 @@ workspace = true [dependencies] anyhow.workspace = true -clap = { workspace = true, features = ["derive"] } +clap.workspace = true env_logger.workspace = true -schemars = { workspace = true, features = ["indexmap2"] } +schemars.workspace = true serde_json.workspace = true settings.workspace = true theme.workspace = true diff --git a/crates/search/Cargo.toml b/crates/search/Cargo.toml index 4f3628a63ea..f5bc5cef31b 100644 --- a/crates/search/Cargo.toml +++ b/crates/search/Cargo.toml @@ -47,7 +47,6 @@ theme.workspace = true theme_settings.workspace = true ui.workspace = true util.workspace = true -util_macros.workspace = true workspace.workspace = true zed_actions.workspace = true itertools.workspace = true @@ -62,4 +61,5 @@ lsp.workspace = true pretty_assertions.workspace = true proto.workspace = true unindent.workspace = true +util_macros.workspace = true workspace = { workspace = true, features = ["test-support"] } diff --git a/crates/settings/Cargo.toml b/crates/settings/Cargo.toml index 0cebdf801c0..193a09e4817 100644 --- a/crates/settings/Cargo.toml +++ b/crates/settings/Cargo.toml @@ -23,7 +23,7 @@ fs.workspace = true futures.workspace = true gpui.workspace = true inventory.workspace = true -log.workspace = true +log = { workspace = true, features = ["kv_unstable_std"] } migrator.workspace = true paths.workspace = true release_channel.workspace = true @@ -36,11 +36,11 @@ settings_json = { workspace = true, features = ["editing"] } settings_macros.workspace = true smallvec.workspace = true util.workspace = true -zlog.workspace = true [dev-dependencies] fs = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } +zlog.workspace = true indoc.workspace = true pretty_assertions.workspace = true diff --git a/crates/settings_content/Cargo.toml b/crates/settings_content/Cargo.toml index 621f18edf0d..bada652d9fb 100644 --- a/crates/settings_content/Cargo.toml +++ b/crates/settings_content/Cargo.toml @@ -17,7 +17,7 @@ default = [] [dependencies] anyhow.workspace = true collections.workspace = true -derive_more.workspace = true +derive_more = { workspace = true, features = ["from"] } gpui.workspace = true language_model_core.workspace = true log.workspace = true diff --git a/crates/settings_json/Cargo.toml b/crates/settings_json/Cargo.toml index d84d9bb9cd3..b687210e93d 100644 --- a/crates/settings_json/Cargo.toml +++ b/crates/settings_json/Cargo.toml @@ -14,18 +14,18 @@ doctest = false [features] default = ["editing"] -editing = ["dep:tree-sitter", "dep:tree-sitter-json"] +editing = ["dep:tree-sitter", "dep:tree-sitter-json", "dep:serde_json"] [dependencies] anyhow.workspace = true -tree-sitter = { workspace = true, features = ["wasm"], optional = true } +tree-sitter = { workspace = true, optional = true } tree-sitter-json = { workspace = true, optional = true } -util.workspace = true serde.workspace = true -serde_json.workspace = true +serde_json = { workspace = true, optional = true } serde_json_lenient.workspace = true serde_path_to_error.workspace = true [dev-dependencies] +serde_json.workspace = true unindent.workspace = true pretty_assertions.workspace = true diff --git a/crates/settings_json/src/settings_json.rs b/crates/settings_json/src/settings_json.rs index 483cfd1f6b5..a30dc11349f 100644 --- a/crates/settings_json/src/settings_json.rs +++ b/crates/settings_json/src/settings_json.rs @@ -8,8 +8,6 @@ use serde_json::Value; use std::{ops::Range, sync::LazyLock}; #[cfg(feature = "editing")] use tree_sitter::{Query, StreamingIterator as _}; -#[cfg(feature = "editing")] -use util::RangeExt; #[cfg(feature = "editing")] pub fn update_value_in_json_text<'a>( @@ -144,7 +142,7 @@ pub fn replace_value_in_json_text>( // Don't enter sub objects until we find an exact // match for the current keypath - if last_value_range.contains_inclusive(&value_range) { + if last_value_range.start <= value_range.start && value_range.end <= last_value_range.end { continue; } diff --git a/crates/settings_macros/Cargo.toml b/crates/settings_macros/Cargo.toml index ecb60970c72..a49477ab488 100644 --- a/crates/settings_macros/Cargo.toml +++ b/crates/settings_macros/Cargo.toml @@ -19,7 +19,4 @@ default = [] [dependencies] quote.workspace = true -syn.workspace = true - -[dev-dependencies] -settings.workspace = true +syn = { workspace = true, features = ["derive", "full", "parsing", "printing"] } diff --git a/crates/sqlez/Cargo.toml b/crates/sqlez/Cargo.toml index f3b666911e9..bb708e30722 100644 --- a/crates/sqlez/Cargo.toml +++ b/crates/sqlez/Cargo.toml @@ -19,8 +19,10 @@ indoc.workspace = true libsqlite3-sys.workspace = true log.workspace = true parking_lot.workspace = true -pollster.workspace = true +path.workspace = true sqlformat.workspace = true thread_local = "1.1.4" -util.workspace = true uuid.workspace = true + +[dev-dependencies] +pollster.workspace = true diff --git a/crates/sqlez/src/bindable.rs b/crates/sqlez/src/bindable.rs index 9370389ff49..8b8d0feae3c 100644 --- a/crates/sqlez/src/bindable.rs +++ b/crates/sqlez/src/bindable.rs @@ -4,7 +4,6 @@ use std::{ }; use anyhow::{Context as _, Result}; -use util::paths::PathExt; use crate::statement::{SqlType, Statement}; @@ -332,7 +331,8 @@ impl Column for Arc { fn column(statement: &mut Statement, start_index: i32) -> Result<(Self, i32)> { let blob = statement.column_blob(start_index)?; - PathBuf::try_from_bytes(blob).map(|path| (Arc::from(path.as_path()), start_index + 1)) + path::try_from_bytes::(blob) + .map(|path| (Arc::from(path.as_path()), start_index + 1)) } } @@ -347,7 +347,7 @@ impl Column for PathBuf { fn column(statement: &mut Statement, start_index: i32) -> Result<(Self, i32)> { let blob = statement.column_blob(start_index)?; - PathBuf::try_from_bytes(blob).map(|path| (path, start_index + 1)) + path::try_from_bytes::(blob).map(|path| (path, start_index + 1)) } } diff --git a/crates/sqlez_macros/Cargo.toml b/crates/sqlez_macros/Cargo.toml index 0c9beac3904..135e90726a6 100644 --- a/crates/sqlez_macros/Cargo.toml +++ b/crates/sqlez_macros/Cargo.toml @@ -15,6 +15,8 @@ doctest = false test = false [dependencies] -sqlez.workspace = true sqlformat.workspace = true syn.workspace = true + +[target.'cfg(not(any(target_os = "linux", target_os = "freebsd")))'.dependencies] +sqlez.workspace = true diff --git a/crates/sum_tree/Cargo.toml b/crates/sum_tree/Cargo.toml index 2872378caba..fc94adc371b 100644 --- a/crates/sum_tree/Cargo.toml +++ b/crates/sum_tree/Cargo.toml @@ -16,12 +16,12 @@ doctest = false [dependencies] heapless.workspace = true rayon.workspace = true -log.workspace = true ztracing.workspace = true tracing.workspace = true proptest = { workspace = true, optional = true } [dev-dependencies] +log.workspace = true ctor.workspace = true rand.workspace = true proptest.workspace = true diff --git a/crates/telemetry_events/Cargo.toml b/crates/telemetry_events/Cargo.toml index 1094f138962..9f002e1b303 100644 --- a/crates/telemetry_events/Cargo.toml +++ b/crates/telemetry_events/Cargo.toml @@ -15,5 +15,5 @@ doctest = false [dependencies] semver.workspace = true -serde.workspace = true +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true diff --git a/crates/terminal_view/Cargo.toml b/crates/terminal_view/Cargo.toml index 53ac2eb8fd2..de0b777ee30 100644 --- a/crates/terminal_view/Cargo.toml +++ b/crates/terminal_view/Cargo.toml @@ -29,7 +29,6 @@ itertools.workspace = true language.workspace = true log.workspace = true menu.workspace = true -pretty_assertions.workspace = true project.workspace = true regex.workspace = true schemars.workspace = true @@ -51,6 +50,7 @@ zed_actions.workspace = true [dev-dependencies] editor = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } +pretty_assertions.workspace = true project = { workspace = true, features = ["test-support"] } remote = { workspace = true, features = ["test-support"] } release_channel.workspace = true diff --git a/crates/text/Cargo.toml b/crates/text/Cargo.toml index 4dc186b3747..de64476d431 100644 --- a/crates/text/Cargo.toml +++ b/crates/text/Cargo.toml @@ -13,12 +13,13 @@ path = "src/text.rs" doctest = false [features] -test-support = ["rand", "util/test-support"] +test-support = ["rand", "dep:util", "util/test-support"] [dependencies] anyhow.workspace = true clock.workspace = true collections.workspace = true +gpui_util.workspace = true log.workspace = true parking_lot.workspace = true postage.workspace = true @@ -27,7 +28,7 @@ regex.workspace = true rope.workspace = true smallvec.workspace = true sum_tree.workspace = true -util.workspace = true +util = { workspace = true, optional = true } [dev-dependencies] collections = { workspace = true, features = ["test-support"] } diff --git a/crates/text/src/text.rs b/crates/text/src/text.rs index b66e1fab76f..67a596ec591 100644 --- a/crates/text/src/text.rs +++ b/crates/text/src/text.rs @@ -15,6 +15,7 @@ use anyhow::{Context as _, Result}; use clock::Lamport; pub use clock::ReplicaId; use collections::{HashMap, HashSet}; +use gpui_util::debug_panic; use locator::Locator; use operation_queue::OperationQueue; pub use patch::Patch; @@ -40,7 +41,6 @@ pub use subscription::*; pub use sum_tree::Bias; use sum_tree::{Dimensions, FilterCursor, SumTree, Summary, TreeMap, TreeSet}; use undo_map::UndoMap; -use util::debug_panic; #[cfg(any(test, feature = "test-support"))] use util::RandomCharIter; diff --git a/crates/theme/Cargo.toml b/crates/theme/Cargo.toml index 77570b2ae4a..fa4f13943a8 100644 --- a/crates/theme/Cargo.toml +++ b/crates/theme/Cargo.toml @@ -21,10 +21,10 @@ anyhow.workspace = true collections.workspace = true gpui.workspace = true syntax_theme.workspace = true -palette = { workspace = true, default-features = false, features = ["std"] } +palette.workspace = true parking_lot.workspace = true refineable.workspace = true -schemars = { workspace = true, features = ["indexmap2"] } +schemars.workspace = true serde.workspace = true serde_json.workspace = true serde_json_lenient.workspace = true diff --git a/crates/theme_importer/Cargo.toml b/crates/theme_importer/Cargo.toml index a0b86a286de..43eee05951b 100644 --- a/crates/theme_importer/Cargo.toml +++ b/crates/theme_importer/Cargo.toml @@ -10,7 +10,7 @@ workspace = true [dependencies] anyhow.workspace = true -clap = { workspace = true, features = ["derive"] } +clap.workspace = true collections.workspace = true gpui.workspace = true indexmap.workspace = true @@ -19,8 +19,8 @@ palette.workspace = true serde.workspace = true serde_json.workspace = true serde_json_lenient.workspace = true -simplelog.workspace= true -strum = { workspace = true, features = ["derive"] } +simplelog = { workspace = true, features = ["termcolor"] } +strum.workspace = true theme.workspace = true theme_settings.workspace = true vscode_theme = "0.2.0" diff --git a/crates/theme_settings/Cargo.toml b/crates/theme_settings/Cargo.toml index dfe4fa0f79f..40c534f5fb5 100644 --- a/crates/theme_settings/Cargo.toml +++ b/crates/theme_settings/Cargo.toml @@ -22,7 +22,7 @@ collections.workspace = true gpui.workspace = true gpui_util.workspace = true log.workspace = true -palette = { workspace = true, default-features = false, features = ["std"] } +palette.workspace = true refineable.workspace = true schemars.workspace = true serde.workspace = true diff --git a/crates/time_format/Cargo.toml b/crates/time_format/Cargo.toml index 7f5f2d9f1b5..8f028b94710 100644 --- a/crates/time_format/Cargo.toml +++ b/crates/time_format/Cargo.toml @@ -13,12 +13,14 @@ path = "src/time_format.rs" doctest = false [dependencies] -sys-locale.workspace = true time.workspace = true +[target.'cfg(not(any(target_os = "macos", target_os = "windows")))'.dependencies] +sys-locale.workspace = true + [target.'cfg(target_os = "macos")'.dependencies] core-foundation.workspace = true core-foundation-sys.workspace = true [target.'cfg(target_os = "windows")'.dependencies] -windows.workspace = true +windows = { workspace = true, features = ["Globalization_DateTimeFormatting"] } diff --git a/crates/ui/Cargo.toml b/crates/ui/Cargo.toml index 7ff2cfa3712..e1a9812cec8 100644 --- a/crates/ui/Cargo.toml +++ b/crates/ui/Cargo.toml @@ -22,7 +22,6 @@ icons.workspace = true itertools.workspace = true log.workspace = true menu.workspace = true -num-format.workspace = true schemars.workspace = true serde.workspace = true smallvec.workspace = true diff --git a/crates/ui/src/components/diff_stat.rs b/crates/ui/src/components/diff_stat.rs index bacadaa0789..20a0b38aa5c 100644 --- a/crates/ui/src/components/diff_stat.rs +++ b/crates/ui/src/components/diff_stat.rs @@ -1,6 +1,6 @@ use crate::Tooltip; use crate::prelude::*; -use num_format::{Locale, ToFormattedString}; +use crate::utils::format_number_with_commas; #[derive(IntoElement, RegisterComponent)] pub struct DiffStat { @@ -36,8 +36,8 @@ impl DiffStat { impl RenderOnce for DiffStat { fn render(self, _: &mut Window, _cx: &mut App) -> impl IntoElement { let tooltip = self.tooltip; - let added = self.added.to_formatted_string(&Locale::en); - let removed = self.removed.to_formatted_string(&Locale::en); + let added = format_number_with_commas(self.added as u128); + let removed = format_number_with_commas(self.removed as u128); h_flex() .id(self.id) diff --git a/crates/ui/src/utils.rs b/crates/ui/src/utils.rs index 2138ec00c23..c63a7cd27c5 100644 --- a/crates/ui/src/utils.rs +++ b/crates/ui/src/utils.rs @@ -73,3 +73,15 @@ pub fn capitalize(str: &str) -> String { Some(first_char) => first_char.to_uppercase().collect::() + chars.as_str(), } } + +pub fn format_number_with_commas(value: u128) -> String { + let digits = value.to_string(); + let mut formatted = String::with_capacity(digits.len() + (digits.len() - 1) / 3); + for (index, digit) in digits.chars().enumerate() { + if index > 0 && (digits.len() - index).is_multiple_of(3) { + formatted.push(','); + } + formatted.push(digit); + } + formatted +} diff --git a/crates/ui_macros/Cargo.toml b/crates/ui_macros/Cargo.toml index e2e3f96697e..514d778b27b 100644 --- a/crates/ui_macros/Cargo.toml +++ b/crates/ui_macros/Cargo.toml @@ -15,7 +15,7 @@ test = false [dependencies] quote.workspace = true -syn.workspace = true +syn = { workspace = true, features = ["derive", "parsing", "printing"] } [dev-dependencies] component.workspace = true diff --git a/crates/util/Cargo.toml b/crates/util/Cargo.toml index 8af679dc964..1db0915340f 100644 --- a/crates/util/Cargo.toml +++ b/crates/util/Cargo.toml @@ -15,29 +15,24 @@ path = "src/util.rs" doctest = true [features] -test-support = ["rand", "util_macros", "path/test-support"] +test-support = ["rand", "util_macros", "path/test-support", "dep:tempfile"] # Embed `fs_embed!` assets at compile time even in debug builds. debug-embed = ["rust-embed/debug-embed"] [dependencies] anyhow.workspace = true -async_zip.workspace = true collections.workspace = true dunce.workspace = true -futures-lite.workspace = true -futures.workspace = true globset.workspace = true itertools.workspace = true -log.workspace = true rand = { workspace = true, optional = true } -regex.workspace = true +regex = { workspace = true, features = ["unicode-bool", "unicode-gencat"] } rust-embed.workspace = true -schemars.workspace = true -serde.workspace = true +schemars = { workspace = true, features = ["derive"] } +serde = { workspace = true, features = ["derive"] } serde_json.workspace = true serde_json_lenient.workspace = true -shlex.workspace = true -tempfile.workspace = true +tempfile = { workspace = true, optional = true } unicase.workspace = true url.workspace = true percent-encoding.workspace = true @@ -46,25 +41,34 @@ gpui_util.workspace = true path = { workspace = true, features = ["serde"] } [target.'cfg(not(target_family = "wasm"))'.dependencies] +async_zip.workspace = true +futures-lite.workspace = true +futures.workspace = true +shlex.workspace = true smol.workspace = true -which.workspace = true async-fs.workspace = true walkdir.workspace = true dirs.workspace = true +[target.'cfg(any(unix, not(target_family = "wasm")))'.dependencies] +log.workspace = true + [target.'cfg(unix)'.dependencies] command-fds = "0.3.1" libc.workspace = true nix = { workspace = true, features = ["resource", "user"] } +tempfile.workspace = true [target.'cfg(target_os = "macos")'.dependencies] mach2.workspace = true +which.workspace = true [target.'cfg(windows)'.dependencies] -tendril = "0.5" -windows.workspace = true +which.workspace = true +windows = { workspace = true, features = ["Win32_System_JobObjects"] } [dev-dependencies] rand.workspace = true +tempfile.workspace = true util_macros.workspace = true path = { workspace = true, features = ["test-support"] } diff --git a/crates/util/src/paths.rs b/crates/util/src/paths.rs index 90ce3f86150..4e78888e33b 100644 --- a/crates/util/src/paths.rs +++ b/crates/util/src/paths.rs @@ -59,31 +59,7 @@ pub trait PathExt { where Self: From<&'a Path>, { - #[cfg(target_family = "wasm")] - { - std::str::from_utf8(bytes) - .map(Path::new) - .map(Into::into) - .map_err(Into::into) - } - #[cfg(unix)] - { - use std::os::unix::prelude::OsStrExt; - Ok(Self::from(Path::new(OsStr::from_bytes(bytes)))) - } - #[cfg(windows)] - { - use anyhow::Context; - use tendril::fmt::{Format, WTF8}; - WTF8::validate(bytes) - .then(|| { - // Safety: bytes are valid WTF-8 sequence. - Self::from(Path::new(unsafe { - OsStr::from_encoded_bytes_unchecked(bytes) - })) - }) - .with_context(|| format!("Invalid WTF-8 sequence: {bytes:?}")) - } + path::try_from_bytes::(bytes) } /// Converts a local path to one that can be used inside of WSL. diff --git a/crates/util/src/util.rs b/crates/util/src/util.rs index a3b6d7a8085..f0d61b35ad5 100644 --- a/crates/util/src/util.rs +++ b/crates/util/src/util.rs @@ -53,12 +53,6 @@ pub use self::shell::{ get_default_system_shell, get_default_system_shell_preferring_bash, get_system_shell, }; -#[inline] -pub const fn is_utf8_char_boundary(u8: u8) -> bool { - // This is bit magic equivalent to: b < 128 || b >= 192 - (u8 as i8) >= -0x40 -} - pub fn truncate(s: &str, max_chars: usize) -> &str { match s.char_indices().nth(max_chars) { None => s, diff --git a/crates/util_macros/Cargo.toml b/crates/util_macros/Cargo.toml index 5eb4173eb7e..cf90bfa64ec 100644 --- a/crates/util_macros/Cargo.toml +++ b/crates/util_macros/Cargo.toml @@ -16,7 +16,7 @@ test = false [dependencies] quote.workspace = true -syn.workspace = true +syn = { workspace = true, features = ["full", "extra-traits", "clone-impls", "parsing", "printing"] } perf.workspace = true [features] diff --git a/crates/vim/Cargo.toml b/crates/vim/Cargo.toml index 64282953a33..601c7c5149e 100644 --- a/crates/vim/Cargo.toml +++ b/crates/vim/Cargo.toml @@ -24,7 +24,6 @@ command_palette.workspace = true command_palette_hooks.workspace = true db.workspace = true editor.workspace = true -env_logger.workspace = true futures.workspace = true fuzzy.workspace = true gpui.workspace = true @@ -49,7 +48,6 @@ menu.workspace = true tokio = { version = "1.15", features = ["full"], optional = true } ui.workspace = true util.workspace = true -util_macros.workspace = true vim_mode_setting.workspace = true workspace.workspace = true zed_actions.workspace = true @@ -57,6 +55,7 @@ zed_actions.workspace = true [dev-dependencies] command_palette = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] } +env_logger.workspace = true git_ui = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["test-support"] } indoc.workspace = true @@ -71,7 +70,8 @@ release_channel.workspace = true semver.workspace = true settings_ui.workspace = true settings.workspace = true -perf.workspace = true +perf = { workspace = true, features = ["cli"] } util = { workspace = true, features = ["test-support"] } +util_macros.workspace = true workspace = { workspace = true, features = ["test-support"] } search = { workspace = true, features = ["test-support"] } diff --git a/crates/x_ai/Cargo.toml b/crates/x_ai/Cargo.toml index bf6a4631499..79c47b89011 100644 --- a/crates/x_ai/Cargo.toml +++ b/crates/x_ai/Cargo.toml @@ -19,6 +19,6 @@ schemars = ["dep:schemars"] [dependencies] anyhow.workspace = true -schemars = { workspace = true, optional = true } -serde.workspace = true +schemars = { workspace = true, features = ["derive"], optional = true } +serde = { workspace = true, features = ["derive"] } strum.workspace = true diff --git a/crates/x_ai_subscribed/Cargo.toml b/crates/x_ai_subscribed/Cargo.toml index e1d1420952d..4bce58fa9f7 100644 --- a/crates/x_ai_subscribed/Cargo.toml +++ b/crates/x_ai_subscribed/Cargo.toml @@ -18,6 +18,7 @@ base64.workspace = true credentials_provider.workspace = true futures.workspace = true gpui.workspace = true +gpui_util.workspace = true http_client.workspace = true language_model.workspace = true log.workspace = true @@ -29,7 +30,6 @@ serde_json.workspace = true sha2.workspace = true smol.workspace = true url.workspace = true -util.workspace = true x_ai.workspace = true [dev-dependencies] diff --git a/crates/x_ai_subscribed/src/x_ai_subscribed.rs b/crates/x_ai_subscribed/src/x_ai_subscribed.rs index 09a3d267f6c..d7628f18a4a 100644 --- a/crates/x_ai_subscribed/src/x_ai_subscribed.rs +++ b/crates/x_ai_subscribed/src/x_ai_subscribed.rs @@ -4,6 +4,7 @@ use base64::engine::general_purpose::URL_SAFE_NO_PAD; use credentials_provider::CredentialsProvider; use futures::{FutureExt, StreamExt, future::BoxFuture, future::Shared}; use gpui::{AsyncApp, Context, Entity, SharedString, Task, WeakEntity}; +use gpui_util::ResultExt as _; use http_client::{AsyncBody, CustomHeaders, HttpClient, Method, Request as HttpRequest}; use language_model::chat_completion::ChatCompletionEventMapper; use language_model::{ @@ -19,7 +20,6 @@ use sha2::{Digest, Sha256}; use std::sync::Arc; use std::time::{Duration, SystemTime, UNIX_EPOCH}; use url::form_urlencoded; -use util::ResultExt as _; pub const PROVIDER_ID: LanguageModelProviderId = LanguageModelProviderId::new("x_ai_subscribed"); pub const PROVIDER_NAME: LanguageModelProviderName = LanguageModelProviderName::new("SuperGrok"); diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index 7df152a4b18..6ed5c37e49b 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -36,6 +36,7 @@ visual-tests = [ "dep:tempfile", "dep:action_log", "dep:agent_servers", + "dep:env_logger", "workspace/test-support", "project/test-support", "editor/test-support", @@ -106,7 +107,7 @@ dev_container.workspace = true diagnostics.workspace = true editor.workspace = true encoding_selector.workspace = true -env_logger.workspace = true +env_logger = { workspace = true, optional = true } extension.workspace = true extension_host.workspace = true extensions_ui.workspace = true @@ -183,7 +184,7 @@ recent_projects.workspace = true release_channel.workspace = true remote.workspace = true repl.workspace = true -reqwest.workspace = true +reqwest = { workspace = true, features = ["multipart"] } reqwest_client.workspace = true rope.workspace = true sandbox.workspace = true @@ -237,15 +238,15 @@ ztracing.workspace = true [target.'cfg(target_os = "windows")'.dependencies] etw_tracing.workspace = true -windows.workspace = true +windows = { workspace = true, features = ["Win32_System_Console", "Win32_System_Pipes"] } gpui = { workspace = true, features = ["profiler", "windows-manifest"] } -[build-dependencies] -windows_resources = { path = "../windows_resources" } +[target.'cfg(target_os = "windows")'.build-dependencies] +windows_resources.workspace = true [target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies] gpui = { workspace = true, features = ["profiler", "wayland", "x11"] } -ashpd.workspace = true +ashpd = { workspace = true, features = ["notification"] } image.workspace = true [target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.build-dependencies] @@ -259,6 +260,7 @@ pkg-config = "0.3.22" activity_indicator = { workspace = true, features = ["test-support"] } call = { workspace = true, features = ["test-support"] } editor = { workspace = true, features = ["test-support"] } +env_logger.workspace = true fs = { workspace = true, features = ["test-support"] } gpui = { workspace = true, features = ["profiler", "test-support"] } image_viewer = { workspace = true, features = ["test-support"] } diff --git a/crates/zeta_prompt/Cargo.toml b/crates/zeta_prompt/Cargo.toml index e4601383f98..1d0c77ec9e9 100644 --- a/crates/zeta_prompt/Cargo.toml +++ b/crates/zeta_prompt/Cargo.toml @@ -15,7 +15,7 @@ doctest = false [dependencies] anyhow.workspace = true imara-diff.workspace = true -serde.workspace = true +serde = { workspace = true, features = ["derive"] } strum.workspace = true [dev-dependencies] diff --git a/crates/zlog/Cargo.toml b/crates/zlog/Cargo.toml index b1a8ce3a435..1469f45ba27 100644 --- a/crates/zlog/Cargo.toml +++ b/crates/zlog/Cargo.toml @@ -17,8 +17,8 @@ default = [] [dependencies] collections.workspace = true -chrono.workspace = true -log.workspace = true +chrono = { workspace = true, default-features = true } +log = { workspace = true, features = ["kv_unstable_std"] } anyhow.workspace = true [dev-dependencies] diff --git a/crates/ztracing/Cargo.toml b/crates/ztracing/Cargo.toml index c08ca435cbc..55c8bd41535 100644 --- a/crates/ztracing/Cargo.toml +++ b/crates/ztracing/Cargo.toml @@ -12,23 +12,31 @@ workspace = true doctest = false [features] +tracing-tracy = ["dep:tracing-tracy", "dep:tracing-subscriber", "dep:zlog"] tracy = ["tracing-tracy", "tracy-client"] -web = ["dep:async-channel", "dep:js-sys", "dep:wasm-bindgen", "dep:web-sys"] +web = [ + "dep:async-channel", + "dep:js-sys", + "dep:tracing-subscriber", + "dep:wasm-bindgen", + "dep:web-sys", + "dep:zlog", +] [dependencies] -zlog.workspace = true +zlog = { workspace = true, optional = true } tracing.workspace = true -tracing-subscriber = "0.3.22" +tracing-subscriber = { workspace = true, optional = true } ztracing_macro.workspace = true [target.'cfg(not(target_family = "wasm"))'.dependencies] -tracing-tracy = { version = "0.11.4", optional = true, features = ["enable", "ondemand"] } -tracy-client = { version = "0.18.2", optional = true, features = ["enable", "ondemand"] } +tracing-tracy = { version = "0.11", optional = true, features = ["ondemand"] } +tracy-client = { version = "0.18", optional = true, features = ["ondemand"] } [target.'cfg(target_family = "wasm")'.dependencies] -async-channel = { workspace = true, optional = true } +async-channel = { workspace = true, features = ["std"], optional = true } js-sys = { workspace = true, optional = true } wasm-bindgen = { workspace = true, optional = true } -web-sys = { version = "0.3", features = ["console", "Performance"], optional = true } +web-sys = { workspace = true, features = ["console", "Performance"], optional = true } diff --git a/tooling/compliance/Cargo.toml b/tooling/compliance/Cargo.toml index 8a781b3a680..c220483a6ee 100644 --- a/tooling/compliance/Cargo.toml +++ b/tooling/compliance/Cargo.toml @@ -12,16 +12,16 @@ workspace = true doctest = false [features] -octo-client = ["dep:octocrab", "dep:jsonwebtoken", "dep:tokio"] +octo-client = ["dep:octocrab", "dep:jsonwebtoken", "dep:serde_json", "dep:tokio"] [dependencies] anyhow.workspace = true async-trait.workspace = true -derive_more.workspace = true +derive_more = { workspace = true, features = ["display"] } futures.workspace = true itertools.workspace = true jsonwebtoken = { version = "10.2", features = ["use_pem"], optional = true } -octocrab = { version = "0.49", default-features = false, features = [ +octocrab = { workspace = true, features = [ "default-client", "jwt-aws-lc-rs", "retry", @@ -32,10 +32,11 @@ octocrab = { version = "0.49", default-features = false, features = [ ], optional = true } regex.workspace = true semver.workspace = true -serde.workspace = true -serde_json.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true, optional = true } tokio = { workspace = true, optional = true } [dev-dependencies] indoc.workspace = true +serde_json.workspace = true tokio = { workspace = true, features = ["rt", "macros"] } diff --git a/tooling/perf/Cargo.toml b/tooling/perf/Cargo.toml index 1dc07d89b39..c7a7c7faa5f 100644 --- a/tooling/perf/Cargo.toml +++ b/tooling/perf/Cargo.toml @@ -24,11 +24,20 @@ undocumented_unsafe_blocks = "forbid" missing_safety_doc = "forbid" disallowed_methods = { level = "allow", priority = 1} +[features] +default = ["cli"] +cli = ["dep:serde_json"] + [dependencies] collections.workspace = true -serde.workspace = true -serde_json.workspace = true +serde = { workspace = true, features = ["derive"] } +serde_json = { workspace = true, optional = true } [lib] test = false doctest = false + +[[bin]] +name = "perf" +path = "src/main.rs" +required-features = ["cli"] diff --git a/tooling/xtask/Cargo.toml b/tooling/xtask/Cargo.toml index 591ef5c0abe..310aa3a84fc 100644 --- a/tooling/xtask/Cargo.toml +++ b/tooling/xtask/Cargo.toml @@ -14,20 +14,20 @@ anyhow.workspace = true backtrace.workspace = true cargo_metadata.workspace = true cargo_toml.workspace = true -clap = { workspace = true, features = ["derive"] } +clap.workspace = true compliance = { workspace = true, features = ["octo-client"] } gh-workflow.workspace = true guppy = "0.18" indoc.workspace = true indexmap.workspace = true itertools.workspace = true -regex.workspace = true +regex = { workspace = true, features = ["unicode-perl"] } serde.workspace = true serde_json.workspace = true serde_yaml = "0.9.34" strum.workspace = true thiserror.workspace = true -tokio = { workspace = true, features = ["rt", "rt-multi-thread"] } +tokio = { workspace = true, features = ["rt-multi-thread"] } toml.workspace = true toml_edit.workspace = true url.workspace = true diff --git a/tooling/xtask/src/tasks/package_conformity.rs b/tooling/xtask/src/tasks/package_conformity.rs index e1fd15112fd..b842ffa96b9 100644 --- a/tooling/xtask/src/tasks/package_conformity.rs +++ b/tooling/xtask/src/tasks/package_conformity.rs @@ -29,7 +29,7 @@ pub fn run_package_conformity(_args: PackageConformityArgs) -> Result<()> { if !is_using_workspace_lints { eprintln!( "{package:?} is not using workspace lints", - package = package.name + package = package.name.as_str() ); }