Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

Switch from `cargo-machete` to `cargo-shear` (#62643)

Neel282f47a544b7
diff --git a/.github/workflows/autofix_pr.yml b/.github/workflows/autofix_pr.yml
index d75449c9add..7524b2a4894 100644
--- a/.github/workflows/autofix_pr.yml
+++ b/.github/workflows/autofix_pr.yml
@@ -51,17 +51,17 @@ jobs:
uses: pnpm/action-setup@fc06bc1257f339d1d5d8b3a19a8cae5388b55320
with:
version: '9'
- - name: autofix_pr::run_autofix::install_cargo_machete
+ - name: autofix_pr::run_autofix::install_cargo_shear
if: inputs.run_clippy == true || inputs.run_clippy == 'true'
uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9
with:
- name: autofix_pr::run_autofix::run_cargo_fix
if: inputs.run_clippy == true || inputs.run_clippy == 'true'
run: cargo fix --workspace --allow-dirty --allow-staged
- - name: autofix_pr::run_autofix::run_cargo_machete_fix
+ - name: autofix_pr::run_autofix::run_cargo_shear_fix
if: inputs.run_clippy == true || inputs.run_clippy == 'true'
- run: cargo machete --fix
+ run: cargo shear --fix
- name: autofix_pr::run_autofix::run_clippy_fix
if: inputs.run_clippy == true || inputs.run_clippy == 'true'
run: cargo clippy --workspace --fix --allow-dirty --allow-staged
diff --git a/.github/workflows/run_tests.yml b/.github/workflows/run_tests.yml
index 8e160197431..d5b96c76158 100644
--- a/.github/workflows/run_tests.yml
+++ b/.github/workflows/run_tests.yml
@@ -698,12 +698,12 @@ jobs:
with:
cache: rust
path: ~/.rustup
- - name: run_tests::check_dependencies::install_cargo_machete
+ - name: run_tests::check_dependencies::install_cargo_shear
uses: taiki-e/install-action@a6b2e2dcd845ddd7f509ce4f3ed3d922b80cc5d9
with:
- - name: run_tests::check_dependencies::run_cargo_machete
- run: cargo machete
+ - name: run_tests::check_dependencies::run_cargo_shear
+ run: cargo shear --locked --deny-warnings
- name: run_tests::check_dependencies::check_cargo_lock
run: cargo update --locked --workspace
- name: run_tests::check_dependencies::check_crate_graph
diff --git a/Cargo.lock b/Cargo.lock
index b2bdf0675f0..b1d770142e5 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -152,7 +152,6 @@ dependencies = [
"language",
"markdown",
"project",
- "serde",
"serde_json",
"settings",
"theme_settings",
@@ -247,7 +246,6 @@ dependencies = [
"agent_settings",
"agent_skills",
"anyhow",
- "assets",
"async-channel 2.5.0",
"async-io",
"chrono",
@@ -393,9 +391,7 @@ dependencies = [
"http_client",
"indoc",
"language_model",
- "libc",
"log",
- "nix 0.29.0",
"project",
"release_channel",
"remote",
@@ -474,7 +470,6 @@ dependencies = [
"buffer_diff",
"chrono",
"client",
- "clock",
"cloud_api_types",
"collections",
"command_palette_hooks",
@@ -512,7 +507,6 @@ dependencies = [
"markdown",
"menu",
"multi_buffer",
- "node_runtime",
"notifications",
"ordered-float 2.10.1",
"parking_lot",
@@ -528,7 +522,6 @@ dependencies = [
"release_channel",
"remote",
"remote_connection",
- "remote_server",
"reqwest_client",
"rope",
"sandbox",
@@ -549,12 +542,9 @@ dependencies = [
"text",
"theme",
"theme_settings",
- "time",
- "tree-sitter-md",
"ui",
"unicode-script",
"unicode-segmentation",
- "unindent",
"url",
"util",
"uuid",
@@ -608,7 +598,6 @@ dependencies = [
"component",
"gpui",
"language_model",
- "serde",
"smallvec",
"telemetry",
"ui",
@@ -1381,7 +1370,6 @@ dependencies = [
"log",
"parking_lot",
"rodio",
- "serde",
"settings",
"thiserror 2.0.17",
"util",
@@ -1453,7 +1441,6 @@ dependencies = [
"editor",
"gpui",
"markdown_preview",
- "notifications",
"prompt_store",
"release_channel",
"semver",
@@ -3000,7 +2987,6 @@ dependencies = [
"semver",
"settings",
"text",
- "time",
"util",
]
@@ -3405,7 +3391,6 @@ dependencies = [
name = "collab"
version = "0.44.0"
dependencies = [
- "agent",
"anyhow",
"async-channel 2.5.0",
"async-trait",
@@ -3459,7 +3444,6 @@ dependencies = [
"pretty_assertions",
"project",
"prometheus",
- "prompt_store",
"prost 0.9.0",
"rand 0.9.4",
"recent_projects",
@@ -3476,7 +3460,6 @@ dependencies = [
"session",
"settings",
"sha2",
- "smol",
"sqlx",
"strum 0.27.2",
"task",
@@ -3530,7 +3513,6 @@ dependencies = [
"telemetry",
"theme",
"theme_settings",
- "time",
"title_bar",
"ui",
"util",
@@ -3585,7 +3567,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"client",
- "collections",
"command_palette_hooks",
"db",
"editor",
@@ -3803,7 +3784,6 @@ dependencies = [
"net",
"oauth_callback_server",
"parking_lot",
- "pollster 0.4.0",
"postage",
"rand 0.9.4",
"schemars 1.0.4",
@@ -3849,7 +3829,6 @@ name = "copilot"
version = "0.1.0"
dependencies = [
"anyhow",
- "async-std",
"collections",
"command_palette_hooks",
"copilot_chat",
@@ -4403,7 +4382,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"gpui",
- "serde",
]
[[package]]
@@ -4678,7 +4656,6 @@ dependencies = [
"gpui",
"http_client",
"language",
- "libc",
"log",
"node_runtime",
"parking_lot",
@@ -4724,7 +4701,6 @@ dependencies = [
"log",
"node_runtime",
"paths",
- "serde",
"serde_json",
"settings",
"smol",
@@ -4971,7 +4947,6 @@ version = "0.1.0"
dependencies = [
"anyhow",
"bitflags 2.13.1",
- "client",
"collections",
"command_palette_hooks",
"dap",
@@ -5170,7 +5145,6 @@ dependencies = [
"indoc",
"log",
"menu",
- "paths",
"picker",
"project",
"regex",
@@ -5195,7 +5169,6 @@ dependencies = [
"agent_settings",
"anyhow",
"collections",
- "component",
"ctor",
"editor",
"futures-lite 1.13.0",
@@ -5209,7 +5182,6 @@ dependencies = [
"pretty_assertions",
"project",
"rand 0.9.4",
- "serde",
"serde_json",
"settings",
"text",
@@ -5550,7 +5522,6 @@ dependencies = [
"telemetry_events",
"text",
"thiserror 2.0.17",
- "time",
"toml 0.8.23",
"ui",
"util",
@@ -5645,7 +5616,6 @@ dependencies = [
"parking_lot",
"pretty_assertions",
"project",
- "serde",
"serde_json",
"settings",
"smallvec",
@@ -5662,7 +5632,6 @@ version = "0.1.0"
dependencies = [
"imara-diff",
"indoc",
- "pretty_assertions",
"serde",
"serde_json",
"similar",
@@ -5690,7 +5659,6 @@ dependencies = [
"client",
"cloud_llm_client",
"codestral",
- "collections",
"command_palette_hooks",
"copilot",
"copilot_chat",
@@ -5713,9 +5681,7 @@ dependencies = [
"settings",
"telemetry",
"text",
- "theme",
"theme_settings",
- "time",
"ui",
"util",
"workspace",
@@ -5784,8 +5750,6 @@ dependencies = [
"text",
"theme",
"theme_settings",
- "time",
- "tracing",
"tree-sitter-bash",
"tree-sitter-c",
"tree-sitter-go",
@@ -6218,7 +6182,6 @@ name = "eval_utils"
version = "0.1.0"
dependencies = [
"gpui_platform",
- "serde",
"smol",
]
@@ -6341,7 +6304,6 @@ dependencies = [
"language",
"log",
"reqwest_client",
- "serde",
"serde_json",
"serde_json_lenient",
"settings_content",
@@ -6613,8 +6575,6 @@ dependencies = [
"picker_preview",
"pretty_assertions",
"project",
- "remote_connection",
- "serde",
"serde_json",
"settings",
"theme",
@@ -6631,7 +6591,6 @@ name = "file_icons"
version = "0.1.0"
dependencies = [
"gpui",
- "serde",
"theme",
"util",
]
@@ -6882,7 +6841,6 @@ name = "fs"
version = "0.1.0"
dependencies = [
"anyhow",
- "ashpd",
"async-channel 2.5.0",
"async-std",
"async-tar",
@@ -6912,7 +6870,6 @@ dependencies = [
"tempfile",
"text",
"thiserror 2.0.17",
- "time",
"trash",
"unicode-normalization",
"util",
@@ -7446,7 +7403,6 @@ dependencies = [
"unindent",
"util",
"watch",
- "windows 0.61.3",
"workspace",
"zed_actions",
"zlog",
@@ -7723,7 +7679,6 @@ dependencies = [
"multi_buffer",
"project",
"rope",
- "serde",
"serde_json",
"settings",
"text",
@@ -7815,16 +7770,8 @@ dependencies = [
"backtrace",
"bindgen 0.71.1",
"bitflags 2.13.1",
- "block",
- "cbindgen",
"chrono",
- "cocoa 0.26.0",
- "cocoa-foundation 0.2.0",
"collections",
- "core-foundation 0.10.0",
- "core-foundation-sys",
- "core-graphics 0.24.0",
- "core-text",
"core-video",
"criterion",
"ctor",
@@ -7832,7 +7779,6 @@ dependencies = [
"embed-resource",
"env_logger 0.11.8",
"etagere",
- "foreign-types 0.5.0",
"futures 0.3.32",
"futures-concurrency",
"getrandom 0.3.4",
@@ -7840,7 +7786,6 @@ dependencies = [
"gpui_platform",
"gpui_shared_string",
"gpui_util",
- "gpui_web",
"hdrhistogram",
"heapless",
"http_client",
@@ -7849,16 +7794,11 @@ dependencies = [
"itertools 0.14.0",
"log",
"lyon",
- "mach2 0.5.0",
- "media",
- "metal",
"num_cpus",
- "objc",
"objc2 0.6.3",
"objc2-metal 0.3.2",
"parking",
"parking_lot",
- "pathfinder_geometry",
"pin-project",
"pollster 0.4.0",
"postage",
@@ -7941,22 +7881,16 @@ dependencies = [
"gpui_util",
"gpui_wgpu",
"http_client",
- "image",
- "itertools 0.14.0",
"libc",
"log",
"notify-rust",
"oo7",
"open",
"parking_lot",
- "pathfinder_geometry",
- "pollster 0.4.0",
- "profiling",
"raw-window-handle",
"smallvec",
"smol",
"strum 0.27.2",
- "swash",
"url",
"uuid",
"wayland-backend",
@@ -8104,19 +8038,15 @@ dependencies = [
"gpui",
"gpui_util",
"itertools 0.14.0",
- "js-sys",
"log",
"naga",
"parking_lot",
- "pollster 0.4.0",
"profiling",
"raw-window-handle",
"smallvec",
"swash",
"unicode-bidi",
"unicode-segmentation",
- "wasm-bindgen",
- "wasm-bindgen-futures",
"web-sys",
"wgpu",
"zed-font-kit",
@@ -9048,7 +8978,6 @@ dependencies = [
"log",
"menu",
"project",
- "serde",
"settings",
"theme",
"theme_settings",
@@ -9456,7 +9385,6 @@ dependencies = [
"editor",
"gpui",
"log",
- "serde",
"settings",
"shellexpand",
"workspace",
@@ -9512,7 +9440,6 @@ dependencies = [
"paths",
"project",
"schemars 1.0.4",
- "serde",
"serde_json",
"settings",
"snippet_provider",
@@ -9608,7 +9535,6 @@ dependencies = [
"anyhow",
"collections",
"command_palette",
- "component",
"db",
"editor",
"fs",
@@ -9623,7 +9549,6 @@ dependencies = [
"paths",
"project",
"search",
- "serde",
"serde_json",
"settings",
"telemetry",
@@ -9835,7 +9760,6 @@ dependencies = [
"async-trait",
"collections",
"extension",
- "fs",
"futures 0.3.32",
"gpui",
"language",
@@ -9867,7 +9791,6 @@ dependencies = [
"language_model_core",
"log",
"parking_lot",
- "serde",
"serde_json",
"thiserror 2.0.17",
]
@@ -9942,7 +9865,6 @@ dependencies = [
"openai_subscribed",
"opencode",
"parking_lot",
- "pretty_assertions",
"rand 0.9.4",
"release_channel",
"schemars 1.0.4",
@@ -10661,7 +10583,6 @@ dependencies = [
"project",
"settings",
"text",
- "theme",
"theme_settings",
"ui",
"util",
@@ -10846,7 +10767,6 @@ dependencies = [
"project",
"serde_json",
"settings",
- "tempfile",
"theme",
"theme_settings",
"ui",
@@ -10999,7 +10919,6 @@ dependencies = [
"bindgen 0.71.1",
"core-foundation 0.10.0",
"core-video",
- "ctor",
"foreign-types 0.5.0",
"metal",
"objc",
@@ -11551,7 +11470,6 @@ dependencies = [
name = "net"
version = "0.1.0"
dependencies = [
- "anyhow",
"async-io",
"smol",
"tempfile",
@@ -14307,7 +14225,6 @@ dependencies = [
"pretty_assertions",
"project",
"rayon",
- "remote_connection",
"schemars 1.0.4",
"serde",
"serde_json",
@@ -15149,10 +15066,8 @@ dependencies = [
"remote_connection",
"remote_server",
"semver",
- "serde",
"serde_json",
"settings",
- "task",
"telemetry",
"ui",
"util",
@@ -15374,7 +15289,6 @@ dependencies = [
"client",
"clock",
"collections",
- "crash-handler",
"crashes",
"dap_adapters",
"debug_adapter_extension",
@@ -15382,7 +15296,6 @@ dependencies = [
"env_logger 0.11.8",
"extension",
"extension_host",
- "fork",
"fs",
"futures 0.3.32",
"git",
@@ -15397,10 +15310,8 @@ dependencies = [
"language_extension",
"language_model",
"languages",
- "libc",
"log",
"lsp",
- "minidumper",
"net",
"node_runtime",
"paths",
@@ -15414,7 +15325,6 @@ dependencies = [
"rpc",
"rust-embed",
"semver",
- "serde",
"serde_json",
"settings",
"shellexpand",
@@ -15600,7 +15510,6 @@ dependencies = [
"http_client_tls",
"log",
"regex",
- "serde",
"tokio",
"zed-reqwest",
]
@@ -16256,7 +16165,6 @@ dependencies = [
"clap",
"env_logger 0.11.8",
"schemars 1.0.4",
- "serde",
"serde_json",
"settings",
"theme",
@@ -16495,7 +16403,6 @@ dependencies = [
"pretty_assertions",
"project",
"regex",
- "serde",
"serde_json",
"settings",
"smol",
@@ -16993,7 +16900,6 @@ dependencies = [
"telemetry",
"theme",
"theme_settings",
- "title_bar",
"ui",
"ui_input",
"url",
@@ -18548,7 +18454,6 @@ dependencies = [
"menu",
"picker",
"project",
- "serde",
"serde_json",
"task",
"tree-sitter",
@@ -18577,7 +18482,6 @@ name = "telemetry"
version = "0.1.0"
dependencies = [
"futures 0.3.32",
- "serde",
"serde_json",
"telemetry_events",
]
@@ -18805,7 +18709,6 @@ dependencies = [
"log",
"picker",
"project",
- "serde",
"serde_json",
"settings",
"telemetry",
@@ -19046,11 +18949,9 @@ dependencies = [
"gpui",
"icons",
"livekit_client",
- "notifications",
"platform_title_bar",
"project",
"recent_projects",
- "release_channel",
"remote",
"remote_connection",
"rpc",
@@ -19063,7 +18964,6 @@ dependencies = [
"theme",
"ui",
"util",
- "windows 0.61.3",
"workspace",
"zed_actions",
]
@@ -19942,7 +19842,6 @@ dependencies = [
"theme_settings",
"ui_macros",
"web-time",
- "windows 0.61.3",
]
[[package]]
@@ -21248,7 +21147,6 @@ dependencies = [
"cloud_llm_client",
"collections",
"gpui",
- "serde",
]
[[package]]
@@ -21264,7 +21162,6 @@ dependencies = [
"gpui",
"http_client",
"language_model",
- "serde",
"serde_json",
"web_search",
]
@@ -21538,7 +21435,6 @@ version = "0.1.0"
dependencies = [
"command_palette",
"gpui",
- "serde",
"settings",
"theme_settings",
"ui",
@@ -22848,7 +22744,6 @@ dependencies = [
"url",
"util",
"uuid",
- "windows 0.61.3",
"zed_actions",
"zlog",
]
@@ -22878,7 +22773,6 @@ dependencies = [
"pretty_assertions",
"rand 0.9.4",
"rpc",
- "serde",
"serde_json",
"settings",
"smallvec",
@@ -23323,7 +23217,6 @@ dependencies = [
"collab_ui",
"collections",
"command_palette",
- "component",
"component_preview",
"copilot",
"copilot_chat",
@@ -23429,7 +23322,6 @@ dependencies = [
"system_specs",
"tab_switcher",
"tabular_data_preview",
- "task",
"tasks_ui",
"telemetry",
"telemetry_events",
@@ -23595,7 +23487,6 @@ dependencies = [
"gpui",
"paths",
"release_channel",
- "serde",
"serde_json",
]
diff --git a/Cargo.toml b/Cargo.toml
index fe7a53e8bb0..4103cd99bb4 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -497,7 +497,6 @@ which_key = { path = "crates/which_key" }
workspace = { path = "crates/workspace" }
worktree = { path = "crates/worktree" }
x_ai = { path = "crates/x_ai" }
-zed = { path = "crates/zed" }
zed_actions = { path = "crates/zed_actions" }
zed_credentials_provider = { path = "crates/zed_credentials_provider" }
zed_env_vars = { path = "crates/zed_env_vars" }
@@ -560,13 +559,11 @@ base64 = "0.22"
bitflags = "2.6.0"
block = "0.1"
block2 = "0.6"
-brotli = "8.0.2"
brush-parser = "0.3"
bytes = "1.0"
cargo_metadata = "0.19"
cargo_toml = "0.21"
cbindgen = { version = "0.28.0", default-features = false }
-cfg-if = "1.0.3"
chardetng = "0.1"
chrono = { version = "0.4", features = ["serde"] }
ciborium = "0.2"
@@ -575,7 +572,6 @@ clap = { version = "4.4", features = ["derive", "wrap_help"] }
clap_complete = { version = "4.4" }
clap_complete_nushell = { version = "4.4" }
cocoa = "=0.26.0"
-cocoa-foundation = "=0.2.0"
console = "0.16"
console_error_panic_hook = "0.1.7"
const_format = "0.2"
@@ -622,7 +618,6 @@ fork = "0.4.0"
futures = "0.3.32"
futures-concurrency = "7.7.1"
futures-lite = "1.13"
-futures-util = "0.3.32"
gh-workflow = { git = "https://github.com/zed-industries/gh-workflow", rev = "37f3c0575d379c218a9c455ee67585184e40d43f" }
globset = "0.4"
handlebars = "4.3"
@@ -732,7 +727,6 @@ palette = { version = "0.7.5", default-features = false, features = ["std"] }
parking_lot = "0.12.1"
parse_int = "0.9"
partial-json-fixer = "0.5.3"
-pathdiff = "0.2"
pathfinder_geometry = "0.5"
pciid-parser = "0.8.0"
percent-encoding = "2.3.2"
@@ -1118,16 +1112,6 @@ large_enum_variant = "allow"
# Boolean expressions can be hard to read, requiring only the minimal form gets in the way
nonminimal_bool = "allow"
-[workspace.metadata.cargo-machete]
-ignored = [
- "bindgen",
- "cbindgen",
- "prost_build",
- "serde",
- "component",
- "documented",
- "sea-orm-macros",
-]
# Dylint discovers our custom lints through this entry, so `cargo dylint --all`
# runs them without a `--path` argument. The `lints` package pins its own
diff --git a/crates/acp_tools/Cargo.toml b/crates/acp_tools/Cargo.toml
index 2613d39962b..f38ca890e2f 100644
--- a/crates/acp_tools/Cargo.toml
+++ b/crates/acp_tools/Cargo.toml
@@ -25,7 +25,6 @@ gpui.workspace = true
language.workspace= true
markdown.workspace = true
project.workspace = true
-serde.workspace = true
serde_json.workspace = true
settings.workspace = true
theme_settings.workspace = true
diff --git a/crates/agent/Cargo.toml b/crates/agent/Cargo.toml
index 30eb959298e..2ef00b0953b 100644
--- a/crates/agent/Cargo.toml
+++ b/crates/agent/Cargo.toml
@@ -85,7 +85,6 @@ zstd.workspace = true
release_channel.workspace = true
[dev-dependencies]
-assets.workspace = true
async-io.workspace = true
agent_servers = { workspace = true, "features" = ["test-support"] }
client = { workspace = true, "features" = ["test-support"] }
@@ -116,3 +115,6 @@ theme_settings.workspace = true
unindent = { workspace = true }
zlog.workspace = true
+
+[package.metadata.cargo-shear]
+ignored = ["editor"]
diff --git a/crates/agent_servers/Cargo.toml b/crates/agent_servers/Cargo.toml
index cdd691e8de1..58bf698b0f2 100644
--- a/crates/agent_servers/Cargo.toml
+++ b/crates/agent_servers/Cargo.toml
@@ -61,10 +61,6 @@ util.workspace = true
watch.workspace = true
zed_credentials_provider.workspace = true
-[target.'cfg(unix)'.dependencies]
-libc.workspace = true
-nix.workspace = true
-
[dev-dependencies]
client = { workspace = true, features = ["test-support"] }
env_logger.workspace = true
diff --git a/crates/agent_ui/Cargo.toml b/crates/agent_ui/Cargo.toml
index 97ffc8edcb9..3c22a95cadf 100644
--- a/crates/agent_ui/Cargo.toml
+++ b/crates/agent_ui/Cargo.toml
@@ -105,7 +105,6 @@ terminal_view.workspace = true
text.workspace = true
theme.workspace = true
theme_settings.workspace = true
-time.workspace = true
ui.workspace = true
unicode-script.workspace = true
unicode-segmentation.workspace = true
@@ -125,7 +124,6 @@ agent = { workspace = true, features = ["test-support"] }
agent_servers = { workspace = true, features = ["test-support"] }
buffer_diff = { workspace = true, features = ["test-support"] }
client = { workspace = true, features = ["test-support"] }
-clock = { workspace = true, features = ["test-support"] }
db = { workspace = true, features = ["test-support"] }
editor = { workspace = true, features = ["test-support"] }
eval_utils.workspace = true
@@ -135,12 +133,10 @@ indoc.workspace = true
language = { workspace = true, "features" = ["test-support"] }
languages = { workspace = true, features = ["test-support"] }
language_model = { workspace = true, "features" = ["test-support"] }
-node_runtime = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] }
remote = { workspace = true, features = ["test-support"] }
remote_connection = { workspace = true, features = ["test-support"] }
-remote_server = { workspace = true, features = ["test-support"] }
search = { workspace = true, features = ["test-support"] }
semver.workspace = true
@@ -148,6 +144,4 @@ shlex.workspace = true
reqwest_client.workspace = true
tempfile.workspace = true
vim.workspace = true
-tree-sitter-md.workspace = true
-unindent.workspace = true
terminal = { workspace = true, features = ["test-support"] }
diff --git a/crates/ai_onboarding/Cargo.toml b/crates/ai_onboarding/Cargo.toml
index a83188ca456..8215ea820bc 100644
--- a/crates/ai_onboarding/Cargo.toml
+++ b/crates/ai_onboarding/Cargo.toml
@@ -20,8 +20,10 @@ cloud_api_types.workspace = true
component.workspace = true
gpui.workspace = true
language_model.workspace = true
-serde.workspace = true
smallvec.workspace = true
telemetry.workspace = true
ui.workspace = true
zed_actions.workspace = true
+
+[package.metadata.cargo-shear]
+ignored = ["component"]
diff --git a/crates/askpass/Cargo.toml b/crates/askpass/Cargo.toml
index 9c2f97ba880..8c0cabcdb6a 100644
--- a/crates/askpass/Cargo.toml
+++ b/crates/askpass/Cargo.toml
@@ -30,6 +30,3 @@ windows.workspace = true
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
-
-[package.metadata.cargo-machete]
-ignored = ["log"]
diff --git a/crates/audio/Cargo.toml b/crates/audio/Cargo.toml
index 156915b4ba2..86b042c5fc4 100644
--- a/crates/audio/Cargo.toml
+++ b/crates/audio/Cargo.toml
@@ -21,7 +21,6 @@ gpui.workspace = true
log.workspace = true
parking_lot.workspace = true
rodio.workspace = true
-serde.workspace = true
settings.workspace = true
thiserror.workspace = true
util.workspace = true
diff --git a/crates/auto_update_ui/Cargo.toml b/crates/auto_update_ui/Cargo.toml
index 7dbec922fc5..a7d54d4cb98 100644
--- a/crates/auto_update_ui/Cargo.toml
+++ b/crates/auto_update_ui/Cargo.toml
@@ -20,7 +20,6 @@ db.workspace = true
editor.workspace = true
gpui.workspace = true
markdown_preview.workspace = true
-notifications.workspace = true
prompt_store.workspace = true
release_channel.workspace = true
semver.workspace = true
diff --git a/crates/benchmarks/Cargo.toml b/crates/benchmarks/Cargo.toml
index 1db9acf391b..e8f4d1834e4 100644
--- a/crates/benchmarks/Cargo.toml
+++ b/crates/benchmarks/Cargo.toml
@@ -42,6 +42,9 @@ ui.workspace = true
util = { workspace = true, features = ["test-support"] }
zed_actions.workspace = true
+[package.metadata.cargo-shear]
+ignored = ["gpui_platform"]
+
[[bench]]
name = "editor_render"
harness = false
diff --git a/crates/buffer_diff/Cargo.toml b/crates/buffer_diff/Cargo.toml
index 4bcdd3422ec..53be798fff7 100644
--- a/crates/buffer_diff/Cargo.toml
+++ b/crates/buffer_diff/Cargo.toml
@@ -39,5 +39,5 @@ text = { workspace = true, features = ["test-support"] }
unindent.workspace = true
zlog.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/channel/Cargo.toml b/crates/channel/Cargo.toml
index a8664da8e93..ffddb5d17f1 100644
--- a/crates/channel/Cargo.toml
+++ b/crates/channel/Cargo.toml
@@ -29,7 +29,6 @@ release_channel.workspace = true
rpc.workspace = true
settings.workspace = true
text.workspace = true
-time.workspace = true
util.workspace = true
[dev-dependencies]
diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml
index c21847d64bd..9e401280e6d 100644
--- a/crates/collab/Cargo.toml
+++ b/crates/collab/Cargo.toml
@@ -42,14 +42,12 @@ envy = "0.4.2"
futures.workspace = true
gpui.workspace = true
hex.workspace = true
-http_client.workspace = true
livekit_api.workspace = true
log.workspace = true
nanoid.workspace = true
parking_lot.workspace = true
prometheus = "0.14"
prost.workspace = true
-rand.workspace = true
reqwest = { version = "0.11", features = ["json"] }
rpc.workspace = true
# sea-orm and sea-orm-macros versions must match exactly.
@@ -74,9 +72,8 @@ util.workspace = true
uuid.workspace = true
[dev-dependencies]
-agent = { workspace = true, features = ["test-support"] }
-async-trait.workspace = true
async-channel.workspace = true
+async-trait.workspace = true
buffer_diff.workspace = true
call = { workspace = true, features = ["test-support"] }
@@ -101,6 +98,7 @@ git_hosting_providers.workspace = true
git_ui = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
gpui_tokio.workspace = true
+http_client.workspace = true
indoc.workspace = true
language = { workspace = true, features = ["test-support"] }
@@ -113,7 +111,7 @@ node_runtime.workspace = true
notifications = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] }
-prompt_store.workspace = true
+rand.workspace = true
recent_projects = { workspace = true, features = ["test-support"] }
release_channel.workspace = true
remote = { workspace = true, features = ["test-support"] }
@@ -123,11 +121,10 @@ sea-orm = { version = "=1.1.10", features = ["sqlx-sqlite"] }
serde_json.workspace = true
session = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
-smol.workspace = true
sqlx = { version = "0.8", features = ["sqlite"] }
task.workspace = true
-theme_settings = { workspace = true, features = ["test-support"] }
theme.workspace = true
+theme_settings = { workspace = true, features = ["test-support"] }
title_bar = { workspace = true, features = ["test-support"] }
unindent.workspace = true
@@ -136,3 +133,6 @@ workspace = { workspace = true, features = ["test-support"] }
worktree = { workspace = true, features = ["test-support"] }
zed_actions.workspace = true
zlog.workspace = true
+
+[package.metadata.cargo-shear]
+ignored = ["sea-orm-macros"]
diff --git a/crates/collab/src/completion.rs b/crates/collab/src/completion.rs
deleted file mode 100644
index 634355b4674..00000000000
--- a/crates/collab/src/completion.rs
+++ /dev/null
@@ -1,2 +0,0 @@
-use anyhow::{Result, anyhow};
-use rpc::proto;
diff --git a/crates/collab/src/db/queries/dev_server_projects.rs b/crates/collab/src/db/queries/dev_server_projects.rs
deleted file mode 100644
index 8b137891791..00000000000
--- a/crates/collab/src/db/queries/dev_server_projects.rs
+++ /dev/null
@@ -1 +0,0 @@
-
diff --git a/crates/collab/src/errors.rs b/crates/collab/src/errors.rs
deleted file mode 100644
index 93e46848a1c..00000000000
--- a/crates/collab/src/errors.rs
+++ /dev/null
@@ -1,29 +0,0 @@
-// Allow tide Results to accept context like other Results do when
-// using anyhow.
-pub trait TideResultExt {
- fn context<C>(self, cx: C) -> Self
- where
- C: std::fmt::Display + Send + Sync + 'static;
-
- fn with_context<C, F>(self, f: F) -> Self
- where
- C: std::fmt::Display + Send + Sync + 'static,
- F: FnOnce() -> C;
-}
-
-impl<T> TideResultExt for tide::Result<T> {
- fn context<C>(self, cx: C) -> Self
- where
- C: std::fmt::Display + Send + Sync + 'static,
- {
- self.map_err(|e| tide::Error::new(e.status(), e.into_inner().context(cx)))
- }
-
- fn with_context<C, F>(self, f: F) -> Self
- where
- C: std::fmt::Display + Send + Sync + 'static,
- F: FnOnce() -> C,
- {
- self.map_err(|e| tide::Error::new(e.status(), e.into_inner().context(f())))
- }
-}
diff --git a/crates/collab_ui/Cargo.toml b/crates/collab_ui/Cargo.toml
index 80ade0d74a3..a3535d56b0f 100644
--- a/crates/collab_ui/Cargo.toml
+++ b/crates/collab_ui/Cargo.toml
@@ -54,7 +54,6 @@ smol.workspace = true
telemetry.workspace = true
theme.workspace = true
theme_settings.workspace = true
-time.workspace = true
title_bar.workspace = true
ui.workspace = true
util.workspace = true
diff --git a/crates/command_palette/Cargo.toml b/crates/command_palette/Cargo.toml
index 1b2af52662c..b228c083017 100644
--- a/crates/command_palette/Cargo.toml
+++ b/crates/command_palette/Cargo.toml
@@ -18,7 +18,6 @@ doctest = false
[dependencies]
anyhow.workspace = true
client.workspace = true
-collections.workspace = true
command_palette_hooks.workspace = true
db.workspace = true
fuzzy_nucleo.workspace = true
@@ -49,4 +48,4 @@ menu.workspace = true
project = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
-theme_settings.workspace = true
\ No newline at end of file
+theme_settings.workspace = true
diff --git a/crates/component_preview/Cargo.toml b/crates/component_preview/Cargo.toml
index f6aeeefdc26..8b7ad1bc509 100644
--- a/crates/component_preview/Cargo.toml
+++ b/crates/component_preview/Cargo.toml
@@ -21,29 +21,29 @@ client.workspace = true
collections.workspace = true
component.workspace = true
db.workspace = true
-fs.workspace = true
gpui.workspace = true
language.workspace = true
log.workspace = true
-node_runtime.workspace = true
notifications.workspace = true
project.workspace = true
-release_channel.workspace = true
-reqwest_client.workspace = true
-session.workspace = true
-settings.workspace = true
-theme.workspace = true
-theme_settings.workspace = true
ui.workspace = true
ui_input.workspace = true
-uuid.workspace = true
workspace.workspace = true
[dev-dependencies]
assets.workspace = true
editor.workspace = true
env_logger.workspace = true
+fs.workspace = true
gpui_platform = { workspace = true, features = ["screen-capture", "font-kit", "wayland", "x11"] }
+node_runtime.workspace = true
+release_channel.workspace = true
+reqwest_client.workspace = true
+session.workspace = true
+settings.workspace = true
+theme.workspace = true
+theme_settings.workspace = true
+uuid.workspace = true
[[example]]
name = "component_preview"
diff --git a/crates/context_server/Cargo.toml b/crates/context_server/Cargo.toml
index efea3dd250f..e2c7380cf18 100644
--- a/crates/context_server/Cargo.toml
+++ b/crates/context_server/Cargo.toml
@@ -42,4 +42,3 @@ util.workspace = true
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
-pollster.workspace = true
diff --git a/crates/copilot/Cargo.toml b/crates/copilot/Cargo.toml
index 3b73bacb2e0..b961d5d4915 100644
--- a/crates/copilot/Cargo.toml
+++ b/crates/copilot/Cargo.toml
@@ -47,9 +47,6 @@ sum_tree.workspace = true
util.workspace = true
workspace.workspace = true
-[target.'cfg(windows)'.dependencies]
-async-std.workspace = true
-
[dev-dependencies]
collections = { workspace = true, features = ["test-support"] }
editor = { workspace = true, features = ["test-support"] }
diff --git a/crates/credentials_provider/Cargo.toml b/crates/credentials_provider/Cargo.toml
index da83c0cd79a..43f19456197 100644
--- a/crates/credentials_provider/Cargo.toml
+++ b/crates/credentials_provider/Cargo.toml
@@ -14,4 +14,3 @@ path = "src/credentials_provider.rs"
[dependencies]
anyhow.workspace = true
gpui.workspace = true
-serde.workspace = true
diff --git a/crates/dap/Cargo.toml b/crates/dap/Cargo.toml
index a1b107eb42a..146de96a9ae 100644
--- a/crates/dap/Cargo.toml
+++ b/crates/dap/Cargo.toml
@@ -50,9 +50,6 @@ task.workspace = true
telemetry.workspace = true
util.workspace = true
-[target.'cfg(not(windows))'.dependencies]
-libc.workspace = true
-
[dev-dependencies]
async-pipe.workspace = true
gpui = { workspace = true, features = ["test-support"] }
diff --git a/crates/dap_adapters/Cargo.toml b/crates/dap_adapters/Cargo.toml
index 7bdf39c74a4..302bd2255c3 100644
--- a/crates/dap_adapters/Cargo.toml
+++ b/crates/dap_adapters/Cargo.toml
@@ -33,7 +33,6 @@ json_dotpath.workspace = true
language.workspace = true
log.workspace = true
paths.workspace = true
-serde.workspace = true
serde_json.workspace = true
smol.workspace = true
task.workspace = true
diff --git a/crates/debugger_ui/Cargo.toml b/crates/debugger_ui/Cargo.toml
index 0a7857152b4..d84295ba555 100644
--- a/crates/debugger_ui/Cargo.toml
+++ b/crates/debugger_ui/Cargo.toml
@@ -28,7 +28,6 @@ test-support = [
[dependencies]
anyhow.workspace = true
bitflags.workspace = true
-client.workspace = true
collections.workspace = true
command_palette_hooks.workspace = true
dap.workspace = true
diff --git a/crates/dev_container/Cargo.toml b/crates/dev_container/Cargo.toml
index c235b24db4a..c9d9eb5f3fe 100644
--- a/crates/dev_container/Cargo.toml
+++ b/crates/dev_container/Cargo.toml
@@ -21,7 +21,6 @@ fs.workspace = true
futures.workspace = true
log.workspace = true
menu.workspace = true
-paths.workspace = true
regex.workspace = true
picker.workspace = true
project.workspace = true
diff --git a/crates/diagnostics/Cargo.toml b/crates/diagnostics/Cargo.toml
index 0c96524ec03..60694c1e09d 100644
--- a/crates/diagnostics/Cargo.toml
+++ b/crates/diagnostics/Cargo.toml
@@ -16,7 +16,6 @@ doctest = false
agent_settings.workspace = true
anyhow.workspace = true
collections.workspace = true
-component.workspace = true
ctor.workspace = true
editor.workspace = true
futures-lite.workspace = true
@@ -29,7 +28,6 @@ lsp.workspace = true
markdown.workspace = true
project.workspace = true
rand.workspace = true
-serde.workspace = true
serde_json.workspace = true
settings.workspace = true
text.workspace = true
diff --git a/crates/edit_prediction/Cargo.toml b/crates/edit_prediction/Cargo.toml
index 49b4da1c1ee..27b67e5d570 100644
--- a/crates/edit_prediction/Cargo.toml
+++ b/crates/edit_prediction/Cargo.toml
@@ -61,7 +61,6 @@ telemetry.workspace = true
telemetry_events.workspace = true
text.workspace = true
thiserror.workspace = true
-time.workspace = true
toml.workspace = true
ui.workspace = true
util.workspace = true
diff --git a/crates/edit_prediction_cli/Cargo.toml b/crates/edit_prediction_cli/Cargo.toml
index 733deb895c0..4649e2a83e3 100644
--- a/crates/edit_prediction_cli/Cargo.toml
+++ b/crates/edit_prediction_cli/Cargo.toml
@@ -81,8 +81,8 @@ gaoya = "0.2.0"
[features]
dynamic_prompts = []
-[package.metadata.cargo-machete]
-ignored = ["wasmtime"]
+[package.metadata.cargo-shear]
+ignored = ["wasmtime", "workspace"]
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
diff --git a/crates/edit_prediction_context/Cargo.toml b/crates/edit_prediction_context/Cargo.toml
index f1bcefc4065..8f0632aad0d 100644
--- a/crates/edit_prediction_context/Cargo.toml
+++ b/crates/edit_prediction_context/Cargo.toml
@@ -22,7 +22,6 @@ log.workspace = true
lsp.workspace = true
parking_lot.workspace = true
project.workspace = true
-serde.workspace = true
smallvec.workspace = true
telemetry.workspace = true
text.workspace = true
diff --git a/crates/edit_prediction_metrics/Cargo.toml b/crates/edit_prediction_metrics/Cargo.toml
index 080c3a60b2c..f046b3f110f 100644
--- a/crates/edit_prediction_metrics/Cargo.toml
+++ b/crates/edit_prediction_metrics/Cargo.toml
@@ -24,4 +24,3 @@ zeta_prompt.workspace = true
[dev-dependencies]
indoc.workspace = true
-pretty_assertions.workspace = true
diff --git a/crates/edit_prediction_ui/Cargo.toml b/crates/edit_prediction_ui/Cargo.toml
index 29c53bbaf8c..911cd359c02 100644
--- a/crates/edit_prediction_ui/Cargo.toml
+++ b/crates/edit_prediction_ui/Cargo.toml
@@ -15,8 +15,6 @@ doctest = false
[dependencies]
anyhow.workspace = true
buffer_diff.workspace = true
-collections.workspace = true
-time.workspace = true
client.workspace = true
cloud_llm_client.workspace = true
codestral.workspace = true
@@ -55,7 +53,6 @@ editor = { workspace = true, features = ["test-support"] }
futures.workspace = true
indoc.workspace = true
project = { workspace = true, features = ["test-support"] }
-theme = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
diff --git a/crates/editor/Cargo.toml b/crates/editor/Cargo.toml
index b6df4a370fc..09467381bdf 100644
--- a/crates/editor/Cargo.toml
+++ b/crates/editor/Cargo.toml
@@ -82,7 +82,6 @@ sum_tree.workspace = true
task.workspace = true
telemetry.workspace = true
text.workspace = true
-time.workspace = true
theme.workspace = true
theme_settings.workspace = true
tree-sitter-c = { workspace = true, optional = true }
@@ -91,7 +90,6 @@ tree-sitter-rust = { workspace = true, optional = true }
tree-sitter-typescript = { workspace = true, optional = true }
tree-sitter-python = { workspace = true, optional = true }
ztracing.workspace = true
-tracing.workspace = true
unicode-segmentation.workspace = true
unicode-script.workspace = true
unindent = { workspace = true, optional = true }
diff --git a/crates/editor/src/tasks.rs b/crates/editor/src/tasks.rs
deleted file mode 100644
index 7323d4159ce..00000000000
--- a/crates/editor/src/tasks.rs
+++ /dev/null
@@ -1,101 +0,0 @@
-use crate::Editor;
-
-use collections::HashMap;
-use gpui::{App, Task, Window};
-use lsp::LanguageServerName;
-use project::{Location, project_settings::ProjectSettings};
-use settings::Settings as _;
-use task::{TaskContext, TaskVariables, VariableName};
-use text::{BufferId, ToOffset, ToPoint};
-
-impl Editor {
- pub fn task_context(&self, window: &mut Window, cx: &mut App) -> Task<Option<TaskContext>> {
- let Some(project) = self.project.clone() else {
- return Task::ready(None);
- };
- let display_snapshot = self.display_snapshot(cx);
- let selection = self.selections.newest_adjusted(&display_snapshot);
- let start = display_snapshot
- .buffer_snapshot()
- .anchor_after(selection.start);
- let end = display_snapshot
- .buffer_snapshot()
- .anchor_after(selection.end);
- let Some((buffer_snapshot, range)) = display_snapshot
- .buffer_snapshot()
- .anchor_range_to_buffer_anchor_range(start..end)
- else {
- return Task::ready(None);
- };
- let Some(buffer) = self.buffer.read(cx).buffer(buffer_snapshot.remote_id()) else {
- return Task::ready(None);
- };
- let location = Location { buffer, range };
- let captured_variables = {
- let mut variables = TaskVariables::default();
- let buffer = location.buffer.read(cx);
- let buffer_id = buffer.remote_id();
- let snapshot = buffer.snapshot();
- let starting_point = location.range.start.to_point(&snapshot);
- let starting_offset = starting_point.to_offset(&snapshot);
- for (_, tasks) in self
- .tasks
- .range((buffer_id, 0)..(buffer_id, starting_point.row + 1))
- {
- if !tasks
- .context_range
- .contains(&crate::BufferOffset(starting_offset))
- {
- continue;
- }
- for (capture_name, value) in tasks.extra_variables.iter() {
- variables.insert(
- VariableName::Custom(capture_name.to_owned().into()),
- value.clone(),
- );
- }
- }
- variables
- };
-
- project.update(cx, |project, cx| {
- project.task_store().update(cx, |task_store, cx| {
- task_store.task_context_for_location(captured_variables, location, cx)
- })
- })
- }
-
- pub fn lsp_task_sources(&self, cx: &App) -> HashMap<LanguageServerName, Vec<BufferId>> {
- let lsp_settings = &ProjectSettings::get_global(cx).lsp;
-
- self.buffer()
- .read(cx)
- .all_buffers()
- .into_iter()
- .filter_map(|buffer| {
- let lsp_tasks_source = buffer
- .read(cx)
- .language()?
- .context_provider()?
- .lsp_task_source()?;
- if lsp_settings
- .get(&lsp_tasks_source)
- .is_none_or(|s| s.enable_lsp_tasks)
- {
- let buffer_id = buffer.read(cx).remote_id();
- Some((lsp_tasks_source, buffer_id))
- } else {
- None
- }
- })
- .fold(
- HashMap::default(),
- |mut acc, (lsp_task_source, buffer_id)| {
- acc.entry(lsp_task_source)
- .or_insert_with(Vec::new)
- .push(buffer_id);
- acc
- },
- )
- }
-}
diff --git a/crates/eval_utils/Cargo.toml b/crates/eval_utils/Cargo.toml
index 479e146b998..de4ef711488 100644
--- a/crates/eval_utils/Cargo.toml
+++ b/crates/eval_utils/Cargo.toml
@@ -14,5 +14,4 @@ doctest = false
[dependencies]
gpui_platform.workspace = true
-serde.workspace = true
smol.workspace = true
diff --git a/crates/extension/Cargo.toml b/crates/extension/Cargo.toml
index 776e84490cb..be58aa535c1 100644
--- a/crates/extension/Cargo.toml
+++ b/crates/extension/Cargo.toml
@@ -48,5 +48,5 @@ indoc.workspace = true
pretty_assertions.workspace = true
tempfile.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/extension_api/Cargo.toml b/crates/extension_api/Cargo.toml
index 829455e6291..c766954952e 100644
--- a/crates/extension_api/Cargo.toml
+++ b/crates/extension_api/Cargo.toml
@@ -23,3 +23,6 @@ wit-bindgen = "0.41"
[package.metadata.component]
target = { path = "wit" }
+
+[package.metadata.cargo-shear]
+ignored-paths = ["wit/since_v*/settings.rs"]
diff --git a/crates/extension_cli/Cargo.toml b/crates/extension_cli/Cargo.toml
index 0927c246683..1f6c1493d36 100644
--- a/crates/extension_cli/Cargo.toml
+++ b/crates/extension_cli/Cargo.toml
@@ -24,7 +24,6 @@ gpui_platform.workspace = true
language.workspace = true
log.workspace = true
reqwest_client.workspace = true
-serde.workspace = true
serde_json.workspace = true
serde_json_lenient.workspace = true
settings_content.workspace = true
diff --git a/crates/extension_host/Cargo.toml b/crates/extension_host/Cargo.toml
index 1895b8b6ecb..150c59bfad5 100644
--- a/crates/extension_host/Cargo.toml
+++ b/crates/extension_host/Cargo.toml
@@ -75,5 +75,5 @@ zlog.workspace = true
name = "extension_compilation_benchmark"
harness = false
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/extensions_ui/Cargo.toml b/crates/extensions_ui/Cargo.toml
index 4729bf9ca62..c8581ec61ce 100644
--- a/crates/extensions_ui/Cargo.toml
+++ b/crates/extensions_ui/Cargo.toml
@@ -46,3 +46,6 @@ zed_actions.workspace = true
[dev-dependencies]
editor = { workspace = true, features = ["test-support"] }
+
+[package.metadata.cargo-shear]
+ignored = ["component"]
diff --git a/crates/file_finder/Cargo.toml b/crates/file_finder/Cargo.toml
index 284bd61a8dc..36fde5b4d64 100644
--- a/crates/file_finder/Cargo.toml
+++ b/crates/file_finder/Cargo.toml
@@ -30,7 +30,6 @@ picker.workspace = true
picker_preview.workspace = true
project.workspace = true
settings.workspace = true
-serde.workspace = true
theme.workspace = true
ui.workspace = true
util.workspace = true
@@ -48,5 +47,4 @@ serde_json.workspace = true
theme = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
zlog.workspace = true
-remote_connection = { workspace = true, features = ["test-support"] }
theme_settings = { workspace = true, features = ["test-support"] }
diff --git a/crates/file_icons/Cargo.toml b/crates/file_icons/Cargo.toml
index d45b606e5a8..ccb0b27a0c1 100644
--- a/crates/file_icons/Cargo.toml
+++ b/crates/file_icons/Cargo.toml
@@ -14,6 +14,5 @@ doctest = false
[dependencies]
gpui.workspace = true
-serde.workspace = true
theme.workspace = true
util.workspace = true
diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.toml
index 4d618e065da..73567cf45d1 100644
--- a/crates/fs/Cargo.toml
+++ b/crates/fs/Cargo.toml
@@ -41,7 +41,6 @@ smol.workspace = true
telemetry.workspace = true
tempfile.workspace = true
text.workspace = true
-time.workspace = true
util.workspace = true
path.workspace = true
is_executable = "1.0.5"
@@ -56,12 +55,12 @@ windows.workspace = true
dunce.workspace = true
async-std.workspace = true
-[target.'cfg(any(target_os = "linux", target_os = "freebsd"))'.dependencies]
-ashpd.workspace = true
-
[target.'cfg(target_os = "macos")'.dependencies]
unicode-normalization = "0.1"
+[package.metadata.cargo-shear]
+ignored = ["async-std"]
+
[dev-dependencies]
fs = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
diff --git a/crates/git_ui/Cargo.toml b/crates/git_ui/Cargo.toml
index 528c609b59b..1dd2868db04 100644
--- a/crates/git_ui/Cargo.toml
+++ b/crates/git_ui/Cargo.toml
@@ -74,9 +74,6 @@ git_ui_core.workspace = true
zed_actions.workspace = true
ztracing.workspace = true
-[target.'cfg(windows)'.dependencies]
-windows.workspace = true
-
[dev-dependencies]
ctor.workspace = true
db = { workspace = true, features = ["test-support"] }
@@ -96,5 +93,5 @@ unindent.workspace = true
workspace = { workspace = true, features = ["test-support"] }
zlog.workspace = true
-[package.metadata.cargo-machete]
-ignored = ["remote_connection", "tracing"]
+[package.metadata.cargo-shear]
+ignored = ["component", "remote_connection", "tracing"]
diff --git a/crates/go_to_line/Cargo.toml b/crates/go_to_line/Cargo.toml
index c0765698538..36cc630c460 100644
--- a/crates/go_to_line/Cargo.toml
+++ b/crates/go_to_line/Cargo.toml
@@ -18,7 +18,6 @@ gpui.workspace = true
language.workspace = true
menu.workspace = true
multi_buffer.workspace = true
-serde.workspace = true
settings.workspace = true
text.workspace = true
theme.workspace = true
diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml
index f86c16830ff..e9c4d98b973 100644
--- a/crates/gpui/Cargo.toml
+++ b/crates/gpui/Cargo.toml
@@ -112,28 +112,12 @@ uuid = { workspace = true, features = ["js"] }
[target.'cfg(target_os = "macos")'.dependencies]
-block.workspace = true
-cocoa.workspace = true
-cocoa-foundation.workspace = true
-core-foundation.workspace = true
-core-foundation-sys.workspace = true
-core-graphics.workspace = true
core-video.workspace = true
-core-text.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 }
-foreign-types.workspace = true
log.workspace = true
-media.workspace = true
-objc.workspace = true
objc2 = { workspace = true, optional = true }
objc2-metal = { version = "0.3", optional = true }
-mach2.workspace = true
-#TODO: replace with "objc2"
-metal.workspace = true
-
-[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "macos"))'.dependencies]
-pathfinder_geometry.workspace = true
[target.'cfg(any(target_os = "linux", target_os = "freebsd", target_os = "windows"))'.dependencies]
scap = { workspace = true, optional = true }
@@ -162,17 +146,23 @@ reqwest_client = { workspace = true, features = ["test-support"] }
[target.'cfg(target_family = "wasm")'.dev-dependencies]
wasm-bindgen = { workspace = true }
-gpui_web.workspace = true
[build-dependencies]
embed-resource = { version = "3.0", optional = true }
[target.'cfg(target_os = "macos")'.build-dependencies]
bindgen = "0.71"
-cbindgen.workspace = true
-[package.metadata.cargo-machete]
-ignored = ["tracing"]
+[package.metadata.cargo-shear]
+ignored = [
+ "bindgen",
+ "font-kit",
+ "getrandom",
+ "objc2",
+ "objc2-metal",
+ "tracing",
+]
+ignored-paths = ["src/_ownership_and_data_flow.rs"]
[[example]]
name = "hello_world"
diff --git a/crates/gpui_linux/Cargo.toml b/crates/gpui_linux/Cargo.toml
index 9d7360c8168..99568212e7c 100644
--- a/crates/gpui_linux/Cargo.toml
+++ b/crates/gpui_linux/Cargo.toml
@@ -56,19 +56,14 @@ accesskit_unix.workspace = true
anyhow.workspace = true
bytemuck = "1"
collections.workspace = true
-image.workspace = true
futures.workspace = true
gpui.workspace = true
gpui_util.workspace = true
gpui_wgpu = { workspace = true, optional = true, features = ["font-kit"] }
http_client.workspace = true
-itertools.workspace = true
libc.workspace = true
log.workspace = true
parking_lot.workspace = true
-pathfinder_geometry.workspace = true
-pollster.workspace = true
-profiling.workspace = true
smallvec.workspace = true
smol.workspace = true
strum.workspace = true
@@ -86,7 +81,6 @@ raw-window-handle.workspace = true
# Used in both windowing options
ashpd = { workspace = true, optional = true }
-swash.workspace = true
bitflags = { workspace = true, optional = true }
filedescriptor = { version = "0.8.2", optional = true }
open = { version = "5.2.0", optional = true }
@@ -133,3 +127,6 @@ xim = { git = "https://github.com/zed-industries/xim-rs.git", rev = "16f35a2c881
"x11rb-client",
], package = "zed-xim", version = "0.4.0-zed", optional = true }
x11-clipboard = { version = "0.9.3", optional = true }
+
+[package.metadata.cargo-shear]
+ignored = ["bitflags", "scap", "x11-clipboard"]
diff --git a/crates/gpui_web/Cargo.toml b/crates/gpui_web/Cargo.toml
index c02b57642ee..3471fedd677 100644
--- a/crates/gpui_web/Cargo.toml
+++ b/crates/gpui_web/Cargo.toml
@@ -86,3 +86,6 @@ web-sys = { version = "0.3", features = [
"WheelEvent",
"Window",
] }
+
+[package.metadata.cargo-shear]
+ignored = ["scheduler"]
diff --git a/crates/gpui_wgpu/Cargo.toml b/crates/gpui_wgpu/Cargo.toml
index 280c64ddf8f..3d889ffb46a 100644
--- a/crates/gpui_wgpu/Cargo.toml
+++ b/crates/gpui_wgpu/Cargo.toml
@@ -38,14 +38,8 @@ wgpu.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 }
-[target.'cfg(not(target_family = "wasm"))'.dependencies]
-pollster.workspace = true
-
[target.'cfg(target_family = "wasm")'.dependencies]
-wasm-bindgen.workspace = true
-wasm-bindgen-futures.workspace = true
web-sys = { version = "0.3", features = ["HtmlCanvasElement"] }
-js-sys.workspace = true
wgpu = { workspace = true, features = ["webgl"] }
[dev-dependencies]
diff --git a/crates/gpui_windows/Cargo.toml b/crates/gpui_windows/Cargo.toml
index 2baa3c7b172..823e4d1d62e 100644
--- a/crates/gpui_windows/Cargo.toml
+++ b/crates/gpui_windows/Cargo.toml
@@ -47,3 +47,6 @@ optional = true
[target.'cfg(target_os = "windows")'.build-dependencies]
windows-registry = "0.5"
+
+[package.metadata.cargo-shear]
+ignored = ["scap"]
diff --git a/crates/image_viewer/Cargo.toml b/crates/image_viewer/Cargo.toml
index f200641e573..46047c3b360 100644
--- a/crates/image_viewer/Cargo.toml
+++ b/crates/image_viewer/Cargo.toml
@@ -25,7 +25,6 @@ language.workspace = true
log.workspace = true
menu.workspace = true
project.workspace = true
-serde.workspace = true
settings.workspace = true
theme_settings.workspace = true
ui.workspace = true
diff --git a/crates/journal/Cargo.toml b/crates/journal/Cargo.toml
index a78a2cc3b2e..e91e7387539 100644
--- a/crates/journal/Cargo.toml
+++ b/crates/journal/Cargo.toml
@@ -18,7 +18,6 @@ chrono.workspace = true
editor.workspace = true
gpui.workspace = true
log.workspace = true
-serde.workspace = true
settings.workspace = true
shellexpand.workspace = true
workspace.workspace = true
diff --git a/crates/json_schema_store/Cargo.toml b/crates/json_schema_store/Cargo.toml
index 8180ffd7917..511215a79f6 100644
--- a/crates/json_schema_store/Cargo.toml
+++ b/crates/json_schema_store/Cargo.toml
@@ -31,7 +31,6 @@ paths.workspace = true
project.workspace = true
schemars.workspace = true
serde_json.workspace = true
-serde.workspace = true
settings.workspace = true
snippet_provider.workspace = true
task.workspace = true
diff --git a/crates/keymap_editor/Cargo.toml b/crates/keymap_editor/Cargo.toml
index 63bfba05d4e..904447c460f 100644
--- a/crates/keymap_editor/Cargo.toml
+++ b/crates/keymap_editor/Cargo.toml
@@ -15,7 +15,6 @@ path = "src/keymap_editor.rs"
anyhow.workspace = true
collections.workspace = true
command_palette.workspace = true
-component.workspace = true
db.workspace = true
editor.workspace = true
fs.workspace = true
@@ -31,7 +30,6 @@ paths.workspace = true
project.workspace = true
search.workspace = true
serde_json.workspace = true
-serde.workspace = true
settings.workspace = true
telemetry.workspace = true
tempfile.workspace = true
diff --git a/crates/language/Cargo.toml b/crates/language/Cargo.toml
index 7fcef180cee..2fbe198048a 100644
--- a/crates/language/Cargo.toml
+++ b/crates/language/Cargo.toml
@@ -115,5 +115,5 @@ theme_settings.workspace = true
name = "highlight_map"
harness = false
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/language_extension/Cargo.toml b/crates/language_extension/Cargo.toml
index 2bbd48b9ecc..f724dd94896 100644
--- a/crates/language_extension/Cargo.toml
+++ b/crates/language_extension/Cargo.toml
@@ -17,7 +17,6 @@ async-trait.workspace = true
collections.workspace = true
extension.workspace = true
futures.workspace = true
-fs.workspace = true
gpui.workspace = true
language.workspace = true
log.workspace = true
@@ -29,5 +28,5 @@ tracing.workspace = true
util.workspace = true
ztracing.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/language_model/Cargo.toml b/crates/language_model/Cargo.toml
index 2f0a6911f4e..da9c036fa57 100644
--- a/crates/language_model/Cargo.toml
+++ b/crates/language_model/Cargo.toml
@@ -30,7 +30,6 @@ image.workspace = true
language_model_core.workspace = true
log.workspace = true
parking_lot.workspace = true
-serde.workspace = true
serde_json.workspace = true
thiserror.workspace = true
diff --git a/crates/language_models/Cargo.toml b/crates/language_models/Cargo.toml
index 4c2a7d1bc49..d24f757f8e5 100644
--- a/crates/language_models/Cargo.toml
+++ b/crates/language_models/Cargo.toml
@@ -77,5 +77,7 @@ gpui = { workspace = true, features = ["test-support"] }
http_client = { workspace = true, features = ["test-support"] }
language_model = { workspace = true, features = ["test-support"] }
parking_lot.workspace = true
-pretty_assertions.workspace = true
settings = { workspace = true, features = ["test-support"] }
+
+[package.metadata.cargo-shear]
+ignored = ["component"]
diff --git a/crates/livekit_api/Cargo.toml b/crates/livekit_api/Cargo.toml
index 80ba67d9941..f8a3a8bb8d1 100644
--- a/crates/livekit_api/Cargo.toml
+++ b/crates/livekit_api/Cargo.toml
@@ -29,5 +29,5 @@ serde.workspace = true
[build-dependencies]
prost-build.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["prost-types"]
diff --git a/crates/livekit_client/Cargo.toml b/crates/livekit_client/Cargo.toml
index a229d39ca8c..ab4b8411a62 100644
--- a/crates/livekit_client/Cargo.toml
+++ b/crates/livekit_client/Cargo.toml
@@ -72,5 +72,5 @@ simplelog.workspace = true
serde.workspace = true
serde_json.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["serde_json"]
diff --git a/crates/lsp_locations/Cargo.toml b/crates/lsp_locations/Cargo.toml
index 2559e571e80..828117f7df1 100644
--- a/crates/lsp_locations/Cargo.toml
+++ b/crates/lsp_locations/Cargo.toml
@@ -39,5 +39,4 @@ language = { workspace = true, features = ["test-support"] }
lsp = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
-theme = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
diff --git a/crates/markdown_preview/Cargo.toml b/crates/markdown_preview/Cargo.toml
index 1c7767a104f..69addd9034e 100644
--- a/crates/markdown_preview/Cargo.toml
+++ b/crates/markdown_preview/Cargo.toml
@@ -38,5 +38,4 @@ editor = { workspace = true, features = ["test-support"] }
fs.workspace = true
gpui = { workspace = true, features = ["test-support"] }
serde_json.workspace = true
-tempfile.workspace = true
workspace = { workspace = true, features = ["test-support"] }
diff --git a/crates/media/Cargo.toml b/crates/media/Cargo.toml
index 7dcf7e356ed..330fc26a06a 100644
--- a/crates/media/Cargo.toml
+++ b/crates/media/Cargo.toml
@@ -18,7 +18,6 @@ anyhow.workspace = true
[target.'cfg(target_os = "macos")'.dependencies]
core-foundation.workspace = true
-ctor.workspace = true
foreign-types.workspace = true
metal.workspace = true
core-video.workspace = true
diff --git a/crates/mermaid_render/Cargo.toml b/crates/mermaid_render/Cargo.toml
index 895093fbdec..df9bfc08786 100644
--- a/crates/mermaid_render/Cargo.toml
+++ b/crates/mermaid_render/Cargo.toml
@@ -29,5 +29,5 @@ gpui = { workspace = true, features = ["test-support"] }
mermaid_render = { path = ".", features = ["test-support"] }
usvg.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/multi_buffer/Cargo.toml b/crates/multi_buffer/Cargo.toml
index fa680c4fc57..dcdca9b7cf1 100644
--- a/crates/multi_buffer/Cargo.toml
+++ b/crates/multi_buffer/Cargo.toml
@@ -59,5 +59,5 @@ text = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
zlog.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/net/Cargo.toml b/crates/net/Cargo.toml
index 8ce273e30ce..2321b451d5a 100644
--- a/crates/net/Cargo.toml
+++ b/crates/net/Cargo.toml
@@ -16,7 +16,6 @@ doctest = false
smol.workspace = true
[target.'cfg(target_os = "windows")'.dependencies]
-anyhow.workspace = true
async-io = "2.4"
windows.workspace = true
diff --git a/crates/node_runtime/Cargo.toml b/crates/node_runtime/Cargo.toml
index 5da2f60f124..9d2cc4f6bf9 100644
--- a/crates/node_runtime/Cargo.toml
+++ b/crates/node_runtime/Cargo.toml
@@ -35,3 +35,6 @@ which.workspace = true
[target.'cfg(windows)'.dependencies]
async-std.workspace = true
+
+[package.metadata.cargo-shear]
+ignored = ["async-std"]
diff --git a/crates/notifications/Cargo.toml b/crates/notifications/Cargo.toml
index b03a658655f..5a5ff9eee1a 100644
--- a/crates/notifications/Cargo.toml
+++ b/crates/notifications/Cargo.toml
@@ -40,3 +40,6 @@ 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/onboarding/Cargo.toml b/crates/onboarding/Cargo.toml
index 0092b440a26..6994b2ba95c 100644
--- a/crates/onboarding/Cargo.toml
+++ b/crates/onboarding/Cargo.toml
@@ -44,3 +44,6 @@ zlog.workspace = true
[dev-dependencies]
db = {workspace = true, features = ["test-support"]}
+
+[package.metadata.cargo-shear]
+ignored = ["component", "documented"]
diff --git a/crates/outline_panel/Cargo.toml b/crates/outline_panel/Cargo.toml
index a5bbf3f7ccc..2db006dc156 100644
--- a/crates/outline_panel/Cargo.toml
+++ b/crates/outline_panel/Cargo.toml
@@ -46,5 +46,5 @@ lsp.workspace = true
search = { workspace = true, features = ["test-support"] }
pretty_assertions.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["log"]
diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml
index b42ddfcc950..937a123b15b 100644
--- a/crates/project/Cargo.toml
+++ b/crates/project/Cargo.toml
@@ -129,5 +129,5 @@ util = { workspace = true, features = ["test-support"] }
worktree = { workspace = true, features = ["test-support"] }
remote = { workspace = true, features = ["test-support"] }
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/project_panel/Cargo.toml b/crates/project_panel/Cargo.toml
index 76902a5678d..bf729392a40 100644
--- a/crates/project_panel/Cargo.toml
+++ b/crates/project_panel/Cargo.toml
@@ -58,7 +58,6 @@ 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"] }
-remote_connection = { workspace = true, features = ["test-support"] }
serde_json.workspace = true
tempfile.workspace = true
workspace = { workspace = true, features = ["test-support"] }
diff --git a/crates/recent_projects/Cargo.toml b/crates/recent_projects/Cargo.toml
index 033e47db15f..d81ea124228 100644
--- a/crates/recent_projects/Cargo.toml
+++ b/crates/recent_projects/Cargo.toml
@@ -41,10 +41,8 @@ release_channel.workspace = true
remote.workspace = true
remote_connection.workspace = true
semver.workspace = true
-serde.workspace = true
serde_json.workspace = true
settings.workspace = true
-task.workspace = true
telemetry.workspace = true
ui.workspace = true
util.workspace = true
diff --git a/crates/remote_server/Cargo.toml b/crates/remote_server/Cargo.toml
index 6f22970504b..094521a9f1e 100644
--- a/crates/remote_server/Cargo.toml
+++ b/crates/remote_server/Cargo.toml
@@ -61,7 +61,6 @@ reqwest_client.workspace = true
rpc.workspace = true
rust-embed = { workspace = true, optional = true, features = ["debug-embed"] }
semver.workspace = true
-serde.workspace = true
serde_json.workspace = true
settings.workspace = true
shellexpand.workspace = true
@@ -76,12 +75,6 @@ thiserror.workspace = true
rayon.workspace = true
uuid = { workspace = true, features = ["v4"] }
-[target.'cfg(not(windows))'.dependencies]
-crash-handler.workspace = true
-fork.workspace = true
-libc.workspace = true
-minidumper.workspace = true
-
[target.'cfg(windows)'.dependencies]
windows.workspace = true
gpui = { workspace = true, features = ["windows-manifest"] }
@@ -115,5 +108,5 @@ zlog.workspace = true
cargo_toml.workspace = true
toml.workspace = true
-[package.metadata.cargo-machete]
-ignored = ["rust-embed", "paths"]
+[package.metadata.cargo-shear]
+ignored = ["rust-embed"]
diff --git a/crates/repl/Cargo.toml b/crates/repl/Cargo.toml
index 1c7d52da4d0..b430b52d404 100644
--- a/crates/repl/Cargo.toml
+++ b/crates/repl/Cargo.toml
@@ -78,6 +78,3 @@ tree-sitter-typescript.workspace = true
tree-sitter-python.workspace = true
workspace = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
-
-[package.metadata.cargo-machete]
-ignored = ["remote"]
diff --git a/crates/reqwest_client/Cargo.toml b/crates/reqwest_client/Cargo.toml
index 105a3e7df81..ae1150051a5 100644
--- a/crates/reqwest_client/Cargo.toml
+++ b/crates/reqwest_client/Cargo.toml
@@ -20,7 +20,6 @@ anyhow.workspace = true
bytes.workspace = true
futures.workspace = true
http_client.workspace = true
-serde.workspace = true
log.workspace = true
tokio = { workspace = true, features = ["rt", "rt-multi-thread"] }
regex.workspace = true
@@ -29,5 +28,3 @@ gpui_util.workspace = true
[target.'cfg(not(target_family = "wasm"))'.dependencies]
http_client_tls.workspace = true
-
-[dev-dependencies]
diff --git a/crates/rope/Cargo.toml b/crates/rope/Cargo.toml
index a4273c8abff..76515d6b9d0 100644
--- a/crates/rope/Cargo.toml
+++ b/crates/rope/Cargo.toml
@@ -33,5 +33,5 @@ zlog.workspace = true
name = "rope_benchmark"
harness = false
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/schema_generator/Cargo.toml b/crates/schema_generator/Cargo.toml
index 71beb54597e..de9c0232d52 100644
--- a/crates/schema_generator/Cargo.toml
+++ b/crates/schema_generator/Cargo.toml
@@ -13,8 +13,7 @@ anyhow.workspace = true
clap = { workspace = true, features = ["derive"] }
env_logger.workspace = true
schemars = { workspace = true, features = ["indexmap2"] }
-serde.workspace = true
serde_json.workspace = true
settings.workspace = true
theme.workspace = true
-theme_settings.workspace = true
\ No newline at end of file
+theme_settings.workspace = true
diff --git a/crates/search/Cargo.toml b/crates/search/Cargo.toml
index 60cdfa8fa96..220879dda8f 100644
--- a/crates/search/Cargo.toml
+++ b/crates/search/Cargo.toml
@@ -38,7 +38,6 @@ picker.workspace = true
picker_preview.workspace = true
project.workspace = true
regex.workspace = true
-serde.workspace = true
serde_json.workspace = true
settings.workspace = true
smol.workspace = true
@@ -62,6 +61,3 @@ lsp.workspace = true
pretty_assertions.workspace = true
unindent.workspace = true
workspace = { workspace = true, features = ["test-support"] }
-
-[package.metadata.cargo-machete]
-ignored = ["tracing"]
diff --git a/crates/settings_ui/Cargo.toml b/crates/settings_ui/Cargo.toml
index ecc19ef8ac5..b3e7acd324d 100644
--- a/crates/settings_ui/Cargo.toml
+++ b/crates/settings_ui/Cargo.toml
@@ -83,5 +83,7 @@ pretty_assertions.workspace = true
project = { workspace = true, features = ["test-support"] }
serde_json.workspace = true
settings = { workspace = true, features = ["test-support"] }
-title_bar = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
+
+[package.metadata.cargo-shear]
+ignored = ["component"]
diff --git a/crates/sum_tree/Cargo.toml b/crates/sum_tree/Cargo.toml
index 8392baa4678..2872378caba 100644
--- a/crates/sum_tree/Cargo.toml
+++ b/crates/sum_tree/Cargo.toml
@@ -28,7 +28,7 @@ proptest.workspace = true
zlog.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
[features]
diff --git a/crates/tasks_ui/Cargo.toml b/crates/tasks_ui/Cargo.toml
index c3884252b44..89a1426a5d9 100644
--- a/crates/tasks_ui/Cargo.toml
+++ b/crates/tasks_ui/Cargo.toml
@@ -23,7 +23,6 @@ menu.workspace = true
picker.workspace = true
project.workspace = true
task.workspace = true
-serde.workspace = true
tree-sitter.workspace = true
tree-sitter-json.workspace = true
ui.workspace = true
diff --git a/crates/telemetry/Cargo.toml b/crates/telemetry/Cargo.toml
index ed166ea4c71..f79c80bb17e 100644
--- a/crates/telemetry/Cargo.toml
+++ b/crates/telemetry/Cargo.toml
@@ -12,7 +12,6 @@ workspace = true
path = "src/telemetry.rs"
[dependencies]
-serde.workspace = true
serde_json.workspace = true
telemetry_events.workspace = true
futures.workspace = true
diff --git a/crates/terminal_view/Cargo.toml b/crates/terminal_view/Cargo.toml
index 5197dee517a..53ac2eb8fd2 100644
--- a/crates/terminal_view/Cargo.toml
+++ b/crates/terminal_view/Cargo.toml
@@ -58,6 +58,3 @@ rpc = { workspace = true, features = ["test-support"] }
semver.workspace = true
terminal = { workspace = true, features = ["test-support"] }
workspace = { workspace = true, features = ["test-support"] }
-
-[package.metadata.cargo-machete]
-ignored = ["log"]
diff --git a/crates/theme_selector/Cargo.toml b/crates/theme_selector/Cargo.toml
index 68f9c7d0c31..3c7474a9dfa 100644
--- a/crates/theme_selector/Cargo.toml
+++ b/crates/theme_selector/Cargo.toml
@@ -18,7 +18,6 @@ fuzzy.workspace = true
gpui.workspace = true
log.workspace = true
picker.workspace = true
-serde.workspace = true
settings.workspace = true
telemetry.workspace = true
theme.workspace = true
diff --git a/crates/title_bar/Cargo.toml b/crates/title_bar/Cargo.toml
index 02b2634f762..2d82ab65b91 100644
--- a/crates/title_bar/Cargo.toml
+++ b/crates/title_bar/Cargo.toml
@@ -46,7 +46,6 @@ git_ui_core.workspace = true
gpui = { workspace = true, features = ["screen-capture"] }
icons.workspace = true
livekit_client.workspace = true
-notifications.workspace = true
project.workspace = true
recent_projects.workspace = true
remote.workspace = true
@@ -65,17 +64,12 @@ workspace.workspace = true
zed_actions.workspace = true
arrayvec = "0.7.6"
-[target.'cfg(windows)'.dependencies]
-windows.workspace = true
-
[dev-dependencies]
call = { workspace = true, features = ["test-support"] }
client = { workspace = true, features = ["test-support"] }
gpui = { workspace = true, features = ["test-support"] }
-notifications = { workspace = true, features = ["test-support"] }
project = { workspace = true, features = ["test-support"] }
recent_projects = { workspace = true, features = ["test-support"] }
-release_channel.workspace = true
remote = { workspace = true, features = ["test-support"] }
rpc = { workspace = true, features = ["test-support"] }
semver.workspace = true
diff --git a/crates/title_bar/src/stories.rs b/crates/title_bar/src/stories.rs
deleted file mode 100644
index 21ed2268dba..00000000000
--- a/crates/title_bar/src/stories.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-mod application_menu;
-
-pub use application_menu::*;
diff --git a/crates/ui/Cargo.toml b/crates/ui/Cargo.toml
index 656b068d3e0..7ff2cfa3712 100644
--- a/crates/ui/Cargo.toml
+++ b/crates/ui/Cargo.toml
@@ -32,15 +32,12 @@ ui_macros.workspace = true
web-time.workspace = true
gpui_util.workspace = true
-[target.'cfg(windows)'.dependencies]
-windows.workspace = true
-
[dev-dependencies]
gpui = { workspace = true, features = ["test-support"] }
settings = { workspace = true, features = ["test-support"] }
theme_settings.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["log"]
[features]
diff --git a/crates/ui/src/components/stories.rs b/crates/ui/src/components/stories.rs
deleted file mode 100644
index bcfcfd04c31..00000000000
--- a/crates/ui/src/components/stories.rs
+++ /dev/null
@@ -1,3 +0,0 @@
-mod context_menu;
-
-pub use context_menu::*;
diff --git a/crates/util/src/test/git.rs b/crates/util/src/test/git.rs
deleted file mode 100644
index e69de29bb2d..00000000000
diff --git a/crates/web_search/Cargo.toml b/crates/web_search/Cargo.toml
index d0e32e71f08..1da66095144 100644
--- a/crates/web_search/Cargo.toml
+++ b/crates/web_search/Cargo.toml
@@ -16,4 +16,3 @@ anyhow.workspace = true
cloud_llm_client.workspace = true
collections.workspace = true
gpui.workspace = true
-serde.workspace = true
diff --git a/crates/web_search_providers/Cargo.toml b/crates/web_search_providers/Cargo.toml
index e2bbc1aeb2d..92a33b73822 100644
--- a/crates/web_search_providers/Cargo.toml
+++ b/crates/web_search_providers/Cargo.toml
@@ -21,6 +21,5 @@ futures.workspace = true
gpui.workspace = true
http_client.workspace = true
language_model.workspace = true
-serde.workspace = true
serde_json.workspace = true
web_search.workspace = true
diff --git a/crates/which_key/Cargo.toml b/crates/which_key/Cargo.toml
index cafcc2306b8..c2f926efeaa 100644
--- a/crates/which_key/Cargo.toml
+++ b/crates/which_key/Cargo.toml
@@ -15,7 +15,6 @@ doctest = false
[dependencies]
command_palette.workspace = true
gpui.workspace = true
-serde.workspace = true
settings.workspace = true
theme_settings.workspace = true
ui.workspace = true
diff --git a/crates/workspace/Cargo.toml b/crates/workspace/Cargo.toml
index 4fa5c142596..abb49eda1f5 100644
--- a/crates/workspace/Cargo.toml
+++ b/crates/workspace/Cargo.toml
@@ -72,9 +72,6 @@ util.workspace = true
uuid.workspace = true
zed_actions.workspace = true
-[target.'cfg(target_os = "windows")'.dependencies]
-windows.workspace = true
-
[dev-dependencies]
client = { workspace = true, features = ["test-support"] }
db = { workspace = true, features = ["test-support"] }
diff --git a/crates/worktree/Cargo.toml b/crates/worktree/Cargo.toml
index 6ba5c1ebe0c..99cbf3268aa 100644
--- a/crates/worktree/Cargo.toml
+++ b/crates/worktree/Cargo.toml
@@ -50,8 +50,6 @@ paths.workspace = true
postage.workspace = true
pretty_assertions = { workspace = true, optional = true }
rpc = { workspace = true, features = ["gpui"] }
-serde.workspace = true
-serde_json.workspace = true
settings.workspace = true
smallvec.workspace = true
sum_tree.workspace = true
@@ -67,10 +65,11 @@ gpui = { workspace = true, features = ["test-support"] }
paths = { workspace = true, features = ["test-support"] }
rand.workspace = true
rpc = { workspace = true, features = ["test-support"] }
+serde_json.workspace = true
settings = { workspace = true, features = ["test-support"] }
util = { workspace = true, features = ["test-support"] }
worktree = { workspace = true, features = ["test-support"] }
zlog.workspace = true
-[package.metadata.cargo-machete]
+[package.metadata.cargo-shear]
ignored = ["tracing"]
diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml
index 1258dfc5f4a..8409911f6d3 100644
--- a/crates/zed/Cargo.toml
+++ b/crates/zed/Cargo.toml
@@ -91,7 +91,6 @@ codestral.workspace = true
collab_ui.workspace = true
collections.workspace = true
command_palette.workspace = true
-component.workspace = true
component_preview.workspace = true
copilot.workspace = true
copilot_chat.workspace = true
@@ -196,7 +195,6 @@ snippets_ui.workspace = true
svg_preview.workspace = true
sysinfo.workspace = true
tab_switcher.workspace = true
-task.workspace = true
tasks_ui.workspace = true
telemetry.workspace = true
telemetry_events.workspace = true
@@ -313,5 +311,5 @@ osx_minimum_system_version = "10.15.7"
osx_info_plist_exts = ["resources/info/*"]
osx_url_schemes = ["zed"]
-[package.metadata.cargo-machete]
-ignored = ["profiling", "zstd", "tracing"]
+[package.metadata.cargo-shear]
+ignored = ["profiling", "tracing"]
diff --git a/crates/zed_actions/Cargo.toml b/crates/zed_actions/Cargo.toml
index 1e368745412..08dd7360026 100644
--- a/crates/zed_actions/Cargo.toml
+++ b/crates/zed_actions/Cargo.toml
@@ -13,3 +13,6 @@ gpui.workspace = true
schemars.workspace = true
serde.workspace = true
util.workspace = true
+
+[package.metadata.cargo-shear]
+ignored = ["util"]
diff --git a/crates/zed_credentials_provider/Cargo.toml b/crates/zed_credentials_provider/Cargo.toml
index 9f64801d466..653aa05b808 100644
--- a/crates/zed_credentials_provider/Cargo.toml
+++ b/crates/zed_credentials_provider/Cargo.toml
@@ -18,5 +18,4 @@ futures.workspace = true
gpui.workspace = true
paths.workspace = true
release_channel.workspace = true
-serde.workspace = true
serde_json.workspace = true
diff --git a/nix/modules/devshells.nix b/nix/modules/devshells.nix
index 62b80a8d9e0..e134e12e08b 100644
--- a/nix/modules/devshells.nix
+++ b/nix/modules/devshells.nix
@@ -72,7 +72,7 @@
rustToolchain # cargo, rustc, and rust-toolchain.toml components included
cargo-nextest
cargo-hakari
- cargo-machete
+ cargo-shear
cargo-zigbuild
# TODO: package protobuf-language-server for editing zed.proto
# TODO: add other tools used in our scripts
diff --git a/script/clippy b/script/clippy
index 617d99a5623..2919abfb9d5 100755
--- a/script/clippy
+++ b/script/clippy
@@ -11,8 +11,8 @@ set -x
# If local, run other checks if we have the tools installed.
if [[ -z "${GITHUB_ACTIONS+x}" ]]; then
- which cargo-machete >/dev/null 2>&1 || exit 0
- cargo machete
+ which cargo-shear >/dev/null 2>&1 || exit 0
+ cargo shear --locked --deny-warnings
which typos >/dev/null 2>&1 || exit 0
typos --config typos.toml
diff --git a/tooling/xtask/src/tasks/workflows/autofix_pr.rs b/tooling/xtask/src/tasks/workflows/autofix_pr.rs
index 24cd0f7991e..7ccb8539ad9 100644
--- a/tooling/xtask/src/tasks/workflows/autofix_pr.rs
+++ b/tooling/xtask/src/tasks/workflows/autofix_pr.rs
@@ -61,8 +61,8 @@ fn run_autofix(pr_number: &WorkflowInput, run_clippy: &WorkflowInput) -> NamedJo
.add_env(("GITHUB_TOKEN", vars::GITHUB_TOKEN))
}
- fn install_cargo_machete() -> Step<Use> {
- steps::taiki_install_action("[email protected]")
+ fn install_cargo_shear() -> Step<Use> {
+ steps::taiki_install_action("[email protected]")
}
fn run_cargo_fmt() -> Step<Run> {
@@ -73,8 +73,8 @@ fn run_autofix(pr_number: &WorkflowInput, run_clippy: &WorkflowInput) -> NamedJo
named::bash("cargo fix --workspace --allow-dirty --allow-staged")
}
- fn run_cargo_machete_fix() -> Step<Run> {
- named::bash("cargo machete --fix")
+ fn run_cargo_shear_fix() -> Step<Run> {
+ named::bash("cargo shear --fix")
}
fn run_clippy_fix() -> Step<Run> {
@@ -116,9 +116,9 @@ fn run_autofix(pr_number: &WorkflowInput, run_clippy: &WorkflowInput) -> NamedJo
.add_step(steps::cache_rust_dependencies_namespace())
.map(steps::install_linux_dependencies)
.add_step(steps::setup_pnpm())
- .add_step(install_cargo_machete().if_condition(clippy_enabled(run_clippy)))
+ .add_step(install_cargo_shear().if_condition(clippy_enabled(run_clippy)))
.add_step(run_cargo_fix().if_condition(clippy_enabled(run_clippy)))
- .add_step(run_cargo_machete_fix().if_condition(clippy_enabled(run_clippy)))
+ .add_step(run_cargo_shear_fix().if_condition(clippy_enabled(run_clippy)))
.add_step(run_clippy_fix().if_condition(clippy_enabled(run_clippy)))
.add_step(run_prettier_fix())
.add_step(run_cargo_fmt())
diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rs
index cfb86a26e0a..ce44c05fc46 100644
--- a/tooling/xtask/src/tasks/workflows/run_tests.rs
+++ b/tooling/xtask/src/tasks/workflows/run_tests.rs
@@ -450,12 +450,12 @@ fn check_style() -> NamedJob {
}
fn check_dependencies() -> NamedJob {
- fn install_cargo_machete() -> Step<Use> {
- steps::taiki_install_action("[email protected]")
+ fn install_cargo_shear() -> Step<Use> {
+ steps::taiki_install_action("[email protected]")
}
- fn run_cargo_machete() -> Step<Run> {
- named::bash("cargo machete")
+ fn run_cargo_shear() -> Step<Run> {
+ named::bash("cargo shear --locked --deny-warnings")
}
fn check_cargo_lock() -> Step<Run> {
@@ -482,8 +482,8 @@ fn check_dependencies() -> NamedJob {
.add_step(steps::harden_runner())
.add_step(steps::checkout_repo())
.add_step(steps::cache_rust_dependencies_namespace())
- .add_step(install_cargo_machete())
- .add_step(run_cargo_machete())
+ .add_step(install_cargo_shear())
+ .add_step(run_cargo_shear())
.add_step(check_cargo_lock())
.add_step(check_crate_graph())
.add_step(check_vulnerable_dependencies()),