diff --git a/.github/workflows/autofix_pr.yml b/.github/workflows/autofix_pr.yml index 7524b2a489..4337917ad3 100644 --- a/.github/workflows/autofix_pr.yml +++ b/.github/workflows/autofix_pr.yml @@ -61,7 +61,7 @@ jobs: run: cargo fix --workspace --allow-dirty --allow-staged - name: autofix_pr::run_autofix::run_cargo_shear_fix if: inputs.run_clippy == true || inputs.run_clippy == 'true' - run: cargo shear --fix + run: cargo shear --fix --check-test-targets - 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 09726ed3ed..b77e66a4e7 100644 --- a/.github/workflows/run_tests.yml +++ b/.github/workflows/run_tests.yml @@ -707,7 +707,7 @@ jobs: with: tool: cargo-shear@1.13.4 - name: run_tests::check_dependencies::run_cargo_shear - run: cargo shear --locked --deny-warnings + run: cargo shear --locked --deny-warnings --check-test-targets - name: run_tests::check_dependencies::check_cargo_lock run: cargo update --locked --workspace - name: run_tests::check_dependencies::check_crate_graph diff --git a/crates/acp_tools/Cargo.toml b/crates/acp_tools/Cargo.toml index f38ca890e2..4ee524b368 100644 --- a/crates/acp_tools/Cargo.toml +++ b/crates/acp_tools/Cargo.toml @@ -12,6 +12,7 @@ workspace = true [lib] path = "src/acp_tools.rs" doctest = false +test = false [features] test-support = ["workspace/test-support"] diff --git a/crates/action_log/Cargo.toml b/crates/action_log/Cargo.toml index c8d3b6a36d..88a86c9684 100644 --- a/crates/action_log/Cargo.toml +++ b/crates/action_log/Cargo.toml @@ -7,6 +7,7 @@ license = "GPL-3.0-or-later" [lib] path = "src/action_log.rs" +doctest = false [lints] workspace = true diff --git a/crates/activity_indicator/Cargo.toml b/crates/activity_indicator/Cargo.toml index df4c4a0db6..198033c680 100644 --- a/crates/activity_indicator/Cargo.toml +++ b/crates/activity_indicator/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/activity_indicator.rs" doctest = false +test = false [features] test-support = [] diff --git a/crates/agent/Cargo.toml b/crates/agent/Cargo.toml index 62d6f271c4..5c7c8de346 100644 --- a/crates/agent/Cargo.toml +++ b/crates/agent/Cargo.toml @@ -7,6 +7,7 @@ license = "GPL-3.0-or-later" [lib] path = "src/agent.rs" +doctest = false [features] test-support = ["db/test-support"] diff --git a/crates/agent_settings/Cargo.toml b/crates/agent_settings/Cargo.toml index 5d50e7251a..82a430e5e1 100644 --- a/crates/agent_settings/Cargo.toml +++ b/crates/agent_settings/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/agent_settings.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/agent_skills/Cargo.toml b/crates/agent_skills/Cargo.toml index 31864f7a4f..d277ff33bc 100644 --- a/crates/agent_skills/Cargo.toml +++ b/crates/agent_skills/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "agent_skills.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/ai_onboarding/Cargo.toml b/crates/ai_onboarding/Cargo.toml index 8215ea820b..0d537aaf81 100644 --- a/crates/ai_onboarding/Cargo.toml +++ b/crates/ai_onboarding/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/ai_onboarding.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/anthropic/Cargo.toml b/crates/anthropic/Cargo.toml index afb5a2f2ca..ca41a0ecec 100644 --- a/crates/anthropic/Cargo.toml +++ b/crates/anthropic/Cargo.toml @@ -14,6 +14,7 @@ workspace = true [lib] path = "src/anthropic.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/askpass/Cargo.toml b/crates/askpass/Cargo.toml index 8c0cabcdb6..4792fdbea7 100644 --- a/crates/askpass/Cargo.toml +++ b/crates/askpass/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/askpass.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/assets/Cargo.toml b/crates/assets/Cargo.toml index 475b6d457d..643bbacdc8 100644 --- a/crates/assets/Cargo.toml +++ b/crates/assets/Cargo.toml @@ -7,6 +7,8 @@ license = "GPL-3.0-or-later" [lib] path = "src/assets.rs" +test = false +doctest = false [lints] workspace = true diff --git a/crates/auto_update_ui/Cargo.toml b/crates/auto_update_ui/Cargo.toml index a7d54d4cb9..f15ead3df2 100644 --- a/crates/auto_update_ui/Cargo.toml +++ b/crates/auto_update_ui/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/auto_update_ui.rs" +test = false +doctest = false [dependencies] agent_skills.workspace = true diff --git a/crates/aws_http_client/Cargo.toml b/crates/aws_http_client/Cargo.toml index 24569a764d..fc9d7fc593 100644 --- a/crates/aws_http_client/Cargo.toml +++ b/crates/aws_http_client/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/aws_http_client.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/bedrock/Cargo.toml b/crates/bedrock/Cargo.toml index 17f69cde6b..e9def2d251 100644 --- a/crates/bedrock/Cargo.toml +++ b/crates/bedrock/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/bedrock.rs" +doctest = false [features] default = [] diff --git a/crates/benchmarks/Cargo.toml b/crates/benchmarks/Cargo.toml index 2415ebc396..63fa36275a 100644 --- a/crates/benchmarks/Cargo.toml +++ b/crates/benchmarks/Cargo.toml @@ -8,6 +8,7 @@ license = "GPL-3.0-or-later" [lib] path = "src/benchmarks.rs" doctest = false +test = false [lints] workspace = true diff --git a/crates/breadcrumbs/Cargo.toml b/crates/breadcrumbs/Cargo.toml index e6db2b8f20..766e82c9ad 100644 --- a/crates/breadcrumbs/Cargo.toml +++ b/crates/breadcrumbs/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/breadcrumbs.rs" doctest = false +test = false [dependencies] gpui.workspace = true diff --git a/crates/buffer_diff/Cargo.toml b/crates/buffer_diff/Cargo.toml index 53be798fff..53997f7a68 100644 --- a/crates/buffer_diff/Cargo.toml +++ b/crates/buffer_diff/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/buffer_diff.rs" +doctest = false [features] test-support = ["settings"] diff --git a/crates/cloud_api_client/Cargo.toml b/crates/cloud_api_client/Cargo.toml index 1b65a1491e..64f8fa80ee 100644 --- a/crates/cloud_api_client/Cargo.toml +++ b/crates/cloud_api_client/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/cloud_api_client.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/cloud_api_types/Cargo.toml b/crates/cloud_api_types/Cargo.toml index a220f688f5..2d461993da 100644 --- a/crates/cloud_api_types/Cargo.toml +++ b/crates/cloud_api_types/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/cloud_api_types.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/cloud_llm_client/Cargo.toml b/crates/cloud_llm_client/Cargo.toml index 7cc59f255a..4a7a4a705f 100644 --- a/crates/cloud_llm_client/Cargo.toml +++ b/crates/cloud_llm_client/Cargo.toml @@ -14,6 +14,7 @@ workspace = true [lib] path = "src/cloud_llm_client.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/codestral/Cargo.toml b/crates/codestral/Cargo.toml index 1802f2a2d7..812820c2b5 100644 --- a/crates/codestral/Cargo.toml +++ b/crates/codestral/Cargo.toml @@ -7,6 +7,8 @@ license = "GPL-3.0-or-later" [lib] path = "src/codestral.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true @@ -24,5 +26,3 @@ serde_json.workspace = true text.workspace = true zed_credentials_provider.workspace = true zeta_prompt.workspace = true - -[dev-dependencies] diff --git a/crates/collab/Cargo.toml b/crates/collab/Cargo.toml index 9e401280e6..d2b7bce2b8 100644 --- a/crates/collab/Cargo.toml +++ b/crates/collab/Cargo.toml @@ -19,6 +19,7 @@ test-support = ["sqlite"] [lib] test = false +doctest = false [[test]] name = "collab_tests" diff --git a/crates/command_palette_hooks/Cargo.toml b/crates/command_palette_hooks/Cargo.toml index 6ba771562d..0a618a10c4 100644 --- a/crates/command_palette_hooks/Cargo.toml +++ b/crates/command_palette_hooks/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/command_palette_hooks.rs" doctest = false +test = false [dependencies] collections.workspace = true diff --git a/crates/component/Cargo.toml b/crates/component/Cargo.toml index 4ca95cbbbd..84cb5efa8a 100644 --- a/crates/component/Cargo.toml +++ b/crates/component/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/component.rs" +test = false [dependencies] collections.workspace = true diff --git a/crates/component_preview/Cargo.toml b/crates/component_preview/Cargo.toml index 8b7ad1bc50..c805fb4bf3 100644 --- a/crates/component_preview/Cargo.toml +++ b/crates/component_preview/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/component_preview.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/context_server/Cargo.toml b/crates/context_server/Cargo.toml index e2c7380cf1..01141ce862 100644 --- a/crates/context_server/Cargo.toml +++ b/crates/context_server/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/context_server.rs" +doctest = false [features] test-support = ["gpui/test-support"] diff --git a/crates/copilot_ui/Cargo.toml b/crates/copilot_ui/Cargo.toml index 315831525d..c5dc6d25cd 100644 --- a/crates/copilot_ui/Cargo.toml +++ b/crates/copilot_ui/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/copilot_ui.rs" doctest = false +test = false [features] default = [] diff --git a/crates/crashes/Cargo.toml b/crates/crashes/Cargo.toml index 1b118097cb..7d873b0f7f 100644 --- a/crates/crashes/Cargo.toml +++ b/crates/crashes/Cargo.toml @@ -30,3 +30,4 @@ workspace = true [lib] path = "src/crashes.rs" +doctest = false diff --git a/crates/credentials_provider/Cargo.toml b/crates/credentials_provider/Cargo.toml index 43f1945619..36f059911e 100644 --- a/crates/credentials_provider/Cargo.toml +++ b/crates/credentials_provider/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/credentials_provider.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/debug_adapter_extension/Cargo.toml b/crates/debug_adapter_extension/Cargo.toml index 08f916eb9e..0897925f84 100644 --- a/crates/debug_adapter_extension/Cargo.toml +++ b/crates/debug_adapter_extension/Cargo.toml @@ -21,3 +21,5 @@ workspace = true [lib] path = "src/debug_adapter_extension.rs" +test = false +doctest = false diff --git a/crates/deepseek/Cargo.toml b/crates/deepseek/Cargo.toml index 25e8f2f25c..451f9752e4 100644 --- a/crates/deepseek/Cargo.toml +++ b/crates/deepseek/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/deepseek.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/dev_container/Cargo.toml b/crates/dev_container/Cargo.toml index c9d9eb5f3f..b405cd91c7 100644 --- a/crates/dev_container/Cargo.toml +++ b/crates/dev_container/Cargo.toml @@ -4,6 +4,9 @@ version = "0.1.0" publish.workspace = true edition.workspace = true +[lib] +doctest = false + [dependencies] anyhow.workspace = true async-tar.workspace = true diff --git a/crates/edit_prediction/Cargo.toml b/crates/edit_prediction/Cargo.toml index d8a26c016c..e86e3f5a48 100644 --- a/crates/edit_prediction/Cargo.toml +++ b/crates/edit_prediction/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/edit_prediction.rs" +doctest = false [features] cli-support = [] diff --git a/crates/edit_prediction_context/Cargo.toml b/crates/edit_prediction_context/Cargo.toml index 8f0632aad0..7f40db303a 100644 --- a/crates/edit_prediction_context/Cargo.toml +++ b/crates/edit_prediction_context/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/edit_prediction_context.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/edit_prediction_metrics/Cargo.toml b/crates/edit_prediction_metrics/Cargo.toml index f046b3f110..5c31f9bd17 100644 --- a/crates/edit_prediction_metrics/Cargo.toml +++ b/crates/edit_prediction_metrics/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/edit_prediction_metrics.rs" +doctest = false [features] tree-sitter = ["dep:tree-sitter"] diff --git a/crates/edit_prediction_types/Cargo.toml b/crates/edit_prediction_types/Cargo.toml index 4de0c9f62c..baa4af0b20 100644 --- a/crates/edit_prediction_types/Cargo.toml +++ b/crates/edit_prediction_types/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/edit_prediction_types.rs" +test = false +doctest = false [dependencies] client.workspace = true diff --git a/crates/encoding_selector/Cargo.toml b/crates/encoding_selector/Cargo.toml index 4903ab56d6..b83ac22456 100644 --- a/crates/encoding_selector/Cargo.toml +++ b/crates/encoding_selector/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/encoding_selector.rs" doctest = false +test = false [dependencies] editor.workspace = true diff --git a/crates/env_var/Cargo.toml b/crates/env_var/Cargo.toml index 3c879a2f49..ea3c180867 100644 --- a/crates/env_var/Cargo.toml +++ b/crates/env_var/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/env_var.rs" +test = false +doctest = false [dependencies] gpui_shared_string.workspace = true diff --git a/crates/etw_tracing/Cargo.toml b/crates/etw_tracing/Cargo.toml index 639b1d6c4b..fc67fddf77 100644 --- a/crates/etw_tracing/Cargo.toml +++ b/crates/etw_tracing/Cargo.toml @@ -7,6 +7,8 @@ license = "GPL-3.0-or-later" [lib] path = "etw_tracing.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/eval_utils/Cargo.toml b/crates/eval_utils/Cargo.toml index de4ef71148..17b93ccd62 100644 --- a/crates/eval_utils/Cargo.toml +++ b/crates/eval_utils/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/eval_utils.rs" doctest = false +test = false [dependencies] gpui_platform.workspace = true diff --git a/crates/explorer_command_injector/Cargo.toml b/crates/explorer_command_injector/Cargo.toml index 44471b7f37..f5aefe2b61 100644 --- a/crates/explorer_command_injector/Cargo.toml +++ b/crates/explorer_command_injector/Cargo.toml @@ -12,6 +12,7 @@ workspace = true crate-type = ["cdylib"] path = "src/explorer_command_injector.rs" doctest = false +test = false [features] default = ["nightly"] @@ -23,5 +24,3 @@ nightly = [] windows.workspace = true windows-core.workspace = true windows-registry.workspace = true - -[dependencies] diff --git a/crates/extension/Cargo.toml b/crates/extension/Cargo.toml index be58aa535c..98835dcd41 100644 --- a/crates/extension/Cargo.toml +++ b/crates/extension/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/extension.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/extension_api/Cargo.toml b/crates/extension_api/Cargo.toml index c766954952..377d794469 100644 --- a/crates/extension_api/Cargo.toml +++ b/crates/extension_api/Cargo.toml @@ -15,6 +15,8 @@ workspace = true [lib] path = "src/extension_api.rs" +test = false +doctest = false [dependencies] serde = { version = "1.0", features = ["derive"] } diff --git a/crates/extensions_ui/Cargo.toml b/crates/extensions_ui/Cargo.toml index f4a59df51b..b574edfa97 100644 --- a/crates/extensions_ui/Cargo.toml +++ b/crates/extensions_ui/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/extensions_ui.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/feature_flags/Cargo.toml b/crates/feature_flags/Cargo.toml index 31ec5ec0da..b6f564f9bd 100644 --- a/crates/feature_flags/Cargo.toml +++ b/crates/feature_flags/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/feature_flags.rs" +doctest = false [dependencies] collections.workspace = true diff --git a/crates/feature_flags_macros/Cargo.toml b/crates/feature_flags_macros/Cargo.toml index 794160e683..aebfa5f7c1 100644 --- a/crates/feature_flags_macros/Cargo.toml +++ b/crates/feature_flags_macros/Cargo.toml @@ -8,6 +8,7 @@ license = "GPL-3.0-or-later" [lib] path = "src/feature_flags_macros.rs" proc-macro = true +doctest = false [lints] workspace = true diff --git a/crates/feedback/Cargo.toml b/crates/feedback/Cargo.toml index 981fc4ea41..0938c07435 100644 --- a/crates/feedback/Cargo.toml +++ b/crates/feedback/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/feedback.rs" +test = false +doctest = false [features] test-support = [] diff --git a/crates/fs/Cargo.toml b/crates/fs/Cargo.toml index 73567cf45d..502c4601d7 100644 --- a/crates/fs/Cargo.toml +++ b/crates/fs/Cargo.toml @@ -10,7 +10,7 @@ workspace = true [lib] path = "src/fs.rs" -test = false +doctest = false [[test]] name = "integration" diff --git a/crates/git/Cargo.toml b/crates/git/Cargo.toml index 7ecb8fa18e..72db89537e 100644 --- a/crates/git/Cargo.toml +++ b/crates/git/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/git.rs" +doctest = false [features] test-support = ["rand", "gpui/test-support"] diff --git a/crates/git_hosting_providers/Cargo.toml b/crates/git_hosting_providers/Cargo.toml index 9480e0ec28..beb210cd4d 100644 --- a/crates/git_hosting_providers/Cargo.toml +++ b/crates/git_hosting_providers/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/git_hosting_providers.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/git_ui/Cargo.toml b/crates/git_ui/Cargo.toml index 0916c8450d..727d4601ed 100644 --- a/crates/git_ui/Cargo.toml +++ b/crates/git_ui/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] name = "git_ui" path = "src/git_ui.rs" +doctest = false [features] test-support = ["multi_buffer/test-support", "remote_connection/test-support"] diff --git a/crates/git_ui_core/Cargo.toml b/crates/git_ui_core/Cargo.toml index 9538fec421..76815af5f2 100644 --- a/crates/git_ui_core/Cargo.toml +++ b/crates/git_ui_core/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] name = "git_ui_core" path = "src/git_ui_core.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/google_ai/Cargo.toml b/crates/google_ai/Cargo.toml index 3848ed5f87..4bbff2959d 100644 --- a/crates/google_ai/Cargo.toml +++ b/crates/google_ai/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/google_ai.rs" +doctest = false [features] schemars = ["dep:schemars"] diff --git a/crates/gpui/Cargo.toml b/crates/gpui/Cargo.toml index 7ab3121d08..e767de582f 100644 --- a/crates/gpui/Cargo.toml +++ b/crates/gpui/Cargo.toml @@ -44,7 +44,6 @@ stacker = ["dep:stacksafe"] [lib] path = "src/gpui.rs" -doctest = false [dependencies] accesskit.workspace = true diff --git a/crates/gpui_apple/Cargo.toml b/crates/gpui_apple/Cargo.toml index 87fec14653..ead06aa2c8 100644 --- a/crates/gpui_apple/Cargo.toml +++ b/crates/gpui_apple/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/gpui_apple.rs" +doctest = false [features] default = [] diff --git a/crates/gpui_linux/Cargo.toml b/crates/gpui_linux/Cargo.toml index ecc9ceb5a4..c4040af022 100644 --- a/crates/gpui_linux/Cargo.toml +++ b/crates/gpui_linux/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/gpui_linux.rs" +doctest = false [features] default = ["wayland", "x11"] diff --git a/crates/gpui_macos/Cargo.toml b/crates/gpui_macos/Cargo.toml index 009bf6f0a0..3f57a8ccf8 100644 --- a/crates/gpui_macos/Cargo.toml +++ b/crates/gpui_macos/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/gpui_macos.rs" +doctest = false [features] default = ["gpui/default"] diff --git a/crates/gpui_macros/Cargo.toml b/crates/gpui_macros/Cargo.toml index 513dd61d7b..7e705a17b8 100644 --- a/crates/gpui_macros/Cargo.toml +++ b/crates/gpui_macros/Cargo.toml @@ -16,6 +16,7 @@ inspector = [] path = "src/gpui_macros.rs" proc-macro = true doctest = true +test = false [dependencies] heck.workspace = true @@ -24,4 +25,4 @@ quote.workspace = true syn.workspace = true [dev-dependencies] -gpui = { workspace = true, features = ["inspector"] } \ No newline at end of file +gpui = { workspace = true, features = ["inspector"] } diff --git a/crates/gpui_platform/Cargo.toml b/crates/gpui_platform/Cargo.toml index ccb9905909..61be065c9d 100644 --- a/crates/gpui_platform/Cargo.toml +++ b/crates/gpui_platform/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/gpui_platform.rs" +doctest = false [features] default = [] diff --git a/crates/gpui_shared_string/Cargo.toml b/crates/gpui_shared_string/Cargo.toml index 36ce41ac7f..c3ba873621 100644 --- a/crates/gpui_shared_string/Cargo.toml +++ b/crates/gpui_shared_string/Cargo.toml @@ -7,6 +7,8 @@ license = "Apache-2.0" [lib] path = "gpui_shared_string.rs" +test = false +doctest = false [dependencies] schemars.workspace = true diff --git a/crates/gpui_tokio/Cargo.toml b/crates/gpui_tokio/Cargo.toml index 5ea343862f..3ad3cd249a 100644 --- a/crates/gpui_tokio/Cargo.toml +++ b/crates/gpui_tokio/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/gpui_tokio.rs" doctest = false +test = false [dependencies] anyhow.workspace = true diff --git a/crates/gpui_util/Cargo.toml b/crates/gpui_util/Cargo.toml index 06810be206..86843d64c0 100644 --- a/crates/gpui_util/Cargo.toml +++ b/crates/gpui_util/Cargo.toml @@ -5,6 +5,9 @@ publish.workspace = true edition.workspace = true license = "Apache-2.0" +[lib] +doctest = false + [dependencies] log.workspace = true anyhow.workspace = true diff --git a/crates/gpui_web/Cargo.toml b/crates/gpui_web/Cargo.toml index f1f4e36b24..80c4ca0dec 100644 --- a/crates/gpui_web/Cargo.toml +++ b/crates/gpui_web/Cargo.toml @@ -15,6 +15,7 @@ multithreaded = ["dep:wasm_thread", "scheduler/wasm-threads"] [lib] path = "src/gpui_web.rs" +doctest = false [dependencies] unicode-properties = "=0.1.3" diff --git a/crates/gpui_wgpu/Cargo.toml b/crates/gpui_wgpu/Cargo.toml index 84e76e929d..18d6737c3d 100644 --- a/crates/gpui_wgpu/Cargo.toml +++ b/crates/gpui_wgpu/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/gpui_wgpu.rs" +doctest = false [features] default = [] diff --git a/crates/gpui_windows/Cargo.toml b/crates/gpui_windows/Cargo.toml index 76f13ad7a4..3d6221a79a 100644 --- a/crates/gpui_windows/Cargo.toml +++ b/crates/gpui_windows/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/gpui_windows.rs" +doctest = false [features] default = ["gpui/default"] diff --git a/crates/grammars/Cargo.toml b/crates/grammars/Cargo.toml index 0df1966083..ef83bb7079 100644 --- a/crates/grammars/Cargo.toml +++ b/crates/grammars/Cargo.toml @@ -9,6 +9,8 @@ workspace = true [lib] path = "src/grammars.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/html_to_markdown/Cargo.toml b/crates/html_to_markdown/Cargo.toml index 70ff3b3555..8dc631f324 100644 --- a/crates/html_to_markdown/Cargo.toml +++ b/crates/html_to_markdown/Cargo.toml @@ -14,6 +14,7 @@ workspace = true [lib] path = "src/html_to_markdown.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/http_client/Cargo.toml b/crates/http_client/Cargo.toml index efae728ddb..ba2282a0ca 100644 --- a/crates/http_client/Cargo.toml +++ b/crates/http_client/Cargo.toml @@ -21,7 +21,7 @@ github-download = [ [lib] path = "src/http_client.rs" -doctest = true +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/http_client_tls/Cargo.toml b/crates/http_client_tls/Cargo.toml index 58cce9c745..3b2f456b3b 100644 --- a/crates/http_client_tls/Cargo.toml +++ b/crates/http_client_tls/Cargo.toml @@ -13,7 +13,8 @@ test-support = [] [lib] path = "src/http_client_tls.rs" -doctest = true +doctest = false +test = false [dependencies] log.workspace = true diff --git a/crates/http_proxy/Cargo.toml b/crates/http_proxy/Cargo.toml index 239cd9657d..1b4faecf7d 100644 --- a/crates/http_proxy/Cargo.toml +++ b/crates/http_proxy/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/http_proxy.rs" +doctest = false [features] # Compiles in the `ZED_SANDBOX_PROXY_ALLOW_LOCAL_IPS` escape hatch that lets the diff --git a/crates/icons/Cargo.toml b/crates/icons/Cargo.toml index fc00165843..7eac6af6d1 100644 --- a/crates/icons/Cargo.toml +++ b/crates/icons/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/icons.rs" +doctest = false [dependencies] serde.workspace = true diff --git a/crates/input_latency_ui/Cargo.toml b/crates/input_latency_ui/Cargo.toml index 67322ccb37..792f8fe107 100644 --- a/crates/input_latency_ui/Cargo.toml +++ b/crates/input_latency_ui/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/input_latency_ui.rs" +test = false +doctest = false [dependencies] chrono.workspace = true diff --git a/crates/inspector_ui/Cargo.toml b/crates/inspector_ui/Cargo.toml index e3dd67de2e..908479bb1f 100644 --- a/crates/inspector_ui/Cargo.toml +++ b/crates/inspector_ui/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/inspector_ui.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/install_cli/Cargo.toml b/crates/install_cli/Cargo.toml index cc849d11c0..0083c6aa5c 100644 --- a/crates/install_cli/Cargo.toml +++ b/crates/install_cli/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/install_cli.rs" +test = false +doctest = false [features] test-support = [] diff --git a/crates/json_schema_store/Cargo.toml b/crates/json_schema_store/Cargo.toml index d94e2a29d1..b9e9bf70c5 100644 --- a/crates/json_schema_store/Cargo.toml +++ b/crates/json_schema_store/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/json_schema_store.rs" +doctest = false [features] default = [] diff --git a/crates/keymap_editor/Cargo.toml b/crates/keymap_editor/Cargo.toml index 904447c460..d119bb8c91 100644 --- a/crates/keymap_editor/Cargo.toml +++ b/crates/keymap_editor/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/keymap_editor.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/language_core/Cargo.toml b/crates/language_core/Cargo.toml index 9941b1f8bf..5281c3e1b3 100644 --- a/crates/language_core/Cargo.toml +++ b/crates/language_core/Cargo.toml @@ -6,6 +6,7 @@ publish = false [lib] path = "src/language_core.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/language_detection/Cargo.toml b/crates/language_detection/Cargo.toml index b2d80c6f16..c00b885393 100644 --- a/crates/language_detection/Cargo.toml +++ b/crates/language_detection/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/language_detection.rs" +test = false +doctest = false [dependencies] betlang.workspace = true diff --git a/crates/language_extension/Cargo.toml b/crates/language_extension/Cargo.toml index f724dd9489..27939018c8 100644 --- a/crates/language_extension/Cargo.toml +++ b/crates/language_extension/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/language_extension.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/language_models/Cargo.toml b/crates/language_models/Cargo.toml index ada12849df..ae6c7c5687 100644 --- a/crates/language_models/Cargo.toml +++ b/crates/language_models/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/language_models.rs" +doctest = false [features] test-support = [] diff --git a/crates/language_models_cloud/Cargo.toml b/crates/language_models_cloud/Cargo.toml index 571d8e86eb..e73e79a9a0 100644 --- a/crates/language_models_cloud/Cargo.toml +++ b/crates/language_models_cloud/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/language_models_cloud.rs" +doctest = false [dependencies] anthropic = { workspace = true, features = ["schemars"] } diff --git a/crates/language_onboarding/Cargo.toml b/crates/language_onboarding/Cargo.toml index 1ab0a75fc3..9d4989cb51 100644 --- a/crates/language_onboarding/Cargo.toml +++ b/crates/language_onboarding/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/python.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/languages/Cargo.toml b/crates/languages/Cargo.toml index cf35e2e1e1..17ed9024fd 100644 --- a/crates/languages/Cargo.toml +++ b/crates/languages/Cargo.toml @@ -8,6 +8,9 @@ license = "GPL-3.0-or-later" [lints] workspace = true +[lib] +doctest = false + [features] test-support = [ "load-grammars" diff --git a/crates/line_ending_selector/Cargo.toml b/crates/line_ending_selector/Cargo.toml index db67823a6e..9aa2c3e4c0 100644 --- a/crates/line_ending_selector/Cargo.toml +++ b/crates/line_ending_selector/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/line_ending_selector.rs" doctest = false +test = false [dependencies] editor.workspace = true diff --git a/crates/llama_cpp/Cargo.toml b/crates/llama_cpp/Cargo.toml index 2309bf5e3e..91522abe4c 100644 --- a/crates/llama_cpp/Cargo.toml +++ b/crates/llama_cpp/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/llama_cpp.rs" +doctest = false [features] default = [] diff --git a/crates/lmstudio/Cargo.toml b/crates/lmstudio/Cargo.toml index 2ef8b96d32..c0ed0366b8 100644 --- a/crates/lmstudio/Cargo.toml +++ b/crates/lmstudio/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/lmstudio.rs" +doctest = false [features] default = [] diff --git a/crates/markdown_preview/Cargo.toml b/crates/markdown_preview/Cargo.toml index 662b3b95ff..1df6d72026 100644 --- a/crates/markdown_preview/Cargo.toml +++ b/crates/markdown_preview/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/markdown_preview.rs" +doctest = false [features] test-support = [] diff --git a/crates/menu/Cargo.toml b/crates/menu/Cargo.toml index fcb209df88..c1b728a13e 100644 --- a/crates/menu/Cargo.toml +++ b/crates/menu/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/menu.rs" doctest = false +test = false [dependencies] gpui.workspace = true diff --git a/crates/miniprofiler_ui/Cargo.toml b/crates/miniprofiler_ui/Cargo.toml index 09144c0fc6..5c60b582d5 100644 --- a/crates/miniprofiler_ui/Cargo.toml +++ b/crates/miniprofiler_ui/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/miniprofiler_ui.rs" +test = false +doctest = false [dependencies] command_palette_hooks.workspace = true diff --git a/crates/mistral/Cargo.toml b/crates/mistral/Cargo.toml index c4d475f014..d76b533f7c 100644 --- a/crates/mistral/Cargo.toml +++ b/crates/mistral/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/mistral.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/notifications/Cargo.toml b/crates/notifications/Cargo.toml index 5a5ff9eee1..11f27dcb32 100644 --- a/crates/notifications/Cargo.toml +++ b/crates/notifications/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/notifications.rs" doctest = false +test = false [features] test-support = [ diff --git a/crates/oauth_callback_server/Cargo.toml b/crates/oauth_callback_server/Cargo.toml index 5fcc6233af..5baf460613 100644 --- a/crates/oauth_callback_server/Cargo.toml +++ b/crates/oauth_callback_server/Cargo.toml @@ -12,6 +12,7 @@ workspace = true [lib] path = "src/oauth_callback_server.rs" doctest = false +test = false [dependencies] anyhow.workspace = true diff --git a/crates/ollama/Cargo.toml b/crates/ollama/Cargo.toml index fed74993fa..01ef988526 100644 --- a/crates/ollama/Cargo.toml +++ b/crates/ollama/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/ollama.rs" +doctest = false [features] default = [] diff --git a/crates/onboarding/Cargo.toml b/crates/onboarding/Cargo.toml index 6994b2ba95..585bf37a74 100644 --- a/crates/onboarding/Cargo.toml +++ b/crates/onboarding/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/onboarding.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/open_ai/Cargo.toml b/crates/open_ai/Cargo.toml index 8b89be9bad..f07e3bbfaa 100644 --- a/crates/open_ai/Cargo.toml +++ b/crates/open_ai/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/open_ai.rs" +doctest = false [features] default = [] diff --git a/crates/open_path_prompt/Cargo.toml b/crates/open_path_prompt/Cargo.toml index bbdba46ea4..55e143de89 100644 --- a/crates/open_path_prompt/Cargo.toml +++ b/crates/open_path_prompt/Cargo.toml @@ -31,3 +31,4 @@ workspace = true [lib] path = "src/open_path_prompt.rs" +doctest = false diff --git a/crates/open_router/Cargo.toml b/crates/open_router/Cargo.toml index 76e9a0d213..bf14a14c2b 100644 --- a/crates/open_router/Cargo.toml +++ b/crates/open_router/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/open_router.rs" +doctest = false [features] default = [] diff --git a/crates/openai_subscribed/Cargo.toml b/crates/openai_subscribed/Cargo.toml index 4ce7c8db7f..0eca2c0f45 100644 --- a/crates/openai_subscribed/Cargo.toml +++ b/crates/openai_subscribed/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/openai_subscribed.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/opencode/Cargo.toml b/crates/opencode/Cargo.toml index 035d78d53f..01ccb35cb9 100644 --- a/crates/opencode/Cargo.toml +++ b/crates/opencode/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/opencode.rs" test = false +doctest = false [features] default = [] diff --git a/crates/path/Cargo.toml b/crates/path/Cargo.toml index c50e6ef97c..f1668b78ce 100644 --- a/crates/path/Cargo.toml +++ b/crates/path/Cargo.toml @@ -7,6 +7,7 @@ license = "Apache-2.0" [lib] path = "src/path.rs" +doctest = false [features] test-support = [] diff --git a/crates/paths/Cargo.toml b/crates/paths/Cargo.toml index 31eaaa31a9..aed676abfe 100644 --- a/crates/paths/Cargo.toml +++ b/crates/paths/Cargo.toml @@ -13,6 +13,7 @@ test-support = [] [lib] path = "src/paths.rs" +doctest = false [dependencies] const_format.workspace = true diff --git a/crates/picker_preview/Cargo.toml b/crates/picker_preview/Cargo.toml index 12d7aec9cc..874148804b 100644 --- a/crates/picker_preview/Cargo.toml +++ b/crates/picker_preview/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/picker_preview.rs" doctest = false +test = false [dependencies] diff --git a/crates/platform_title_bar/Cargo.toml b/crates/platform_title_bar/Cargo.toml index 8497877d04..8f154bc897 100644 --- a/crates/platform_title_bar/Cargo.toml +++ b/crates/platform_title_bar/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/platform_title_bar.rs" doctest = false +test = false [dependencies] gpui.workspace = true diff --git a/crates/project/Cargo.toml b/crates/project/Cargo.toml index 937a123b15..a0e6d1e418 100644 --- a/crates/project/Cargo.toml +++ b/crates/project/Cargo.toml @@ -11,7 +11,6 @@ workspace = true [lib] path = "src/project.rs" doctest = false -test = false [[test]] name = "integration" diff --git a/crates/project/src/git_store.rs b/crates/project/src/git_store.rs index fe62b0ea04..68ff1f7352 100644 --- a/crates/project/src/git_store.rs +++ b/crates/project/src/git_store.rs @@ -11746,29 +11746,25 @@ mod tests { #[gpui::test] async fn test_merge_base_status_uses_worktree_contents(cx: &mut TestAppContext) { - use util::rel_path::rel_path; + use util::{path, rel_path::rel_path}; init_test(cx); + let project_root = Path::new(path!("/project")); + let dot_git = project_root.join(".git"); let fs = FakeFs::new(cx.executor()); fs.insert_tree( - Path::new("/project"), + project_root, json!({ ".git": {}, "committed.txt": "base\n", }), ) .await; - fs.set_head_and_index_for_repo( - Path::new("/project/.git"), - &[("committed.txt", "head\n".into())], - ); - fs.set_merge_base_content_for_repo( - Path::new("/project/.git"), - &[("committed.txt", "base\n".into())], - ); + fs.set_head_and_index_for_repo(&dot_git, &[("committed.txt", "head\n".into())]); + fs.set_merge_base_content_for_repo(&dot_git, &[("committed.txt", "base\n".into())]); - let project = Project::test(fs.clone(), [Path::new("/project")], cx).await; + let project = Project::test(fs.clone(), [project_root], cx).await; project .update(cx, |project, cx| project.git_scans_complete(cx)) .await; @@ -11836,10 +11832,7 @@ mod tests { assert_eq!(display_snapshot.statuses_by_path.iter().count(), 0); }); - fs.set_merge_base_content_for_repo( - Path::new("/project/.git"), - &[("committed.txt", "head\n".into())], - ); + fs.set_merge_base_content_for_repo(&dot_git, &[("committed.txt", "head\n".into())]); let repository = project.read_with(cx, |project, cx| project.active_repository(cx).unwrap()); let branches = repository.read_with(cx, |repository, _| { diff --git a/crates/prompt_store/Cargo.toml b/crates/prompt_store/Cargo.toml index bc4179e5e7..82d24e8944 100644 --- a/crates/prompt_store/Cargo.toml +++ b/crates/prompt_store/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/prompt_store.rs" +doctest = false [dependencies] agent_skills.workspace = true diff --git a/crates/refineable/Cargo.toml b/crates/refineable/Cargo.toml index 4c4e02851b..98bfd84bb8 100644 --- a/crates/refineable/Cargo.toml +++ b/crates/refineable/Cargo.toml @@ -12,6 +12,7 @@ workspace = true [lib] path = "src/refineable.rs" doctest = false +test = false [dependencies] derive_refineable.workspace = true diff --git a/crates/refineable/derive_refineable/Cargo.toml b/crates/refineable/derive_refineable/Cargo.toml index 75e9ef1f8f..8c3f7c1dfb 100644 --- a/crates/refineable/derive_refineable/Cargo.toml +++ b/crates/refineable/derive_refineable/Cargo.toml @@ -14,6 +14,7 @@ workspace = true path = "src/derive_refineable.rs" proc-macro = true doctest = false +test = false [dependencies] proc-macro2.workspace = true diff --git a/crates/release_channel/Cargo.toml b/crates/release_channel/Cargo.toml index 54a8afff8c..0454e5c5cc 100644 --- a/crates/release_channel/Cargo.toml +++ b/crates/release_channel/Cargo.toml @@ -8,6 +8,9 @@ license = "GPL-3.0-or-later" [lints] workspace = true +[lib] +doctest = false + [dependencies] gpui.workspace = true semver.workspace = true diff --git a/crates/remote_connection/Cargo.toml b/crates/remote_connection/Cargo.toml index 02cd44671c..783ac9de09 100644 --- a/crates/remote_connection/Cargo.toml +++ b/crates/remote_connection/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/remote_connection.rs" +doctest = false [features] default = [] diff --git a/crates/reqwest_client/Cargo.toml b/crates/reqwest_client/Cargo.toml index ae1150051a..066c1b0ef5 100644 --- a/crates/reqwest_client/Cargo.toml +++ b/crates/reqwest_client/Cargo.toml @@ -13,7 +13,7 @@ test-support = [] [lib] path = "src/reqwest_client.rs" -doctest = true +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/rope/Cargo.toml b/crates/rope/Cargo.toml index 76515d6b9d..41fb3b87fd 100644 --- a/crates/rope/Cargo.toml +++ b/crates/rope/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/rope.rs" +doctest = false [dependencies] heapless.workspace = true diff --git a/crates/sandbox/Cargo.toml b/crates/sandbox/Cargo.toml index a04f7b2bc2..672d0bfb0b 100644 --- a/crates/sandbox/Cargo.toml +++ b/crates/sandbox/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/sandbox.rs" +doctest = false [features] # Builds `bwrap_test_helper`, the behavior helper driven by the NixOS sandbox diff --git a/crates/settings_json/Cargo.toml b/crates/settings_json/Cargo.toml index a780b7fa0d..d84d9bb9cd 100644 --- a/crates/settings_json/Cargo.toml +++ b/crates/settings_json/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/settings_json.rs" +doctest = false [features] default = ["editing"] diff --git a/crates/settings_macros/Cargo.toml b/crates/settings_macros/Cargo.toml index 175c2f26a3..ecb60970c7 100644 --- a/crates/settings_macros/Cargo.toml +++ b/crates/settings_macros/Cargo.toml @@ -8,6 +8,8 @@ license = "GPL-3.0-or-later" [lib] path = "src/settings_macros.rs" proc-macro = true +test = false +doctest = false [lints] workspace = true diff --git a/crates/settings_ui/Cargo.toml b/crates/settings_ui/Cargo.toml index b854811fcd..861b71e221 100644 --- a/crates/settings_ui/Cargo.toml +++ b/crates/settings_ui/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/settings_ui.rs" +doctest = false [features] default = [] diff --git a/crates/shell_command_parser/Cargo.toml b/crates/shell_command_parser/Cargo.toml index 0e00eac7ef..8dec81812a 100644 --- a/crates/shell_command_parser/Cargo.toml +++ b/crates/shell_command_parser/Cargo.toml @@ -10,8 +10,7 @@ workspace = true [lib] path = "src/shell_command_parser.rs" +doctest = false [dependencies] brush-parser.workspace = true - -[dev-dependencies] diff --git a/crates/sidebar/Cargo.toml b/crates/sidebar/Cargo.toml index e15b7b339e..6d4b5b8e32 100644 --- a/crates/sidebar/Cargo.toml +++ b/crates/sidebar/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/sidebar.rs" +doctest = false [features] default = [] diff --git a/crates/snippet_provider/Cargo.toml b/crates/snippet_provider/Cargo.toml index c1f04117d4..da1ed237d7 100644 --- a/crates/snippet_provider/Cargo.toml +++ b/crates/snippet_provider/Cargo.toml @@ -8,6 +8,9 @@ license = "GPL-3.0-or-later" [lints] workspace = true +[lib] +doctest = false + [features] test-support = [] diff --git a/crates/snippets_ui/Cargo.toml b/crates/snippets_ui/Cargo.toml index 7335accac0..a52a2a33cb 100644 --- a/crates/snippets_ui/Cargo.toml +++ b/crates/snippets_ui/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/snippets_ui.rs" +test = false +doctest = false [dependencies] file_icons.workspace = true diff --git a/crates/sqlez/Cargo.toml b/crates/sqlez/Cargo.toml index f5db6f96a0..f3b666911e 100644 --- a/crates/sqlez/Cargo.toml +++ b/crates/sqlez/Cargo.toml @@ -8,6 +8,9 @@ license = "GPL-3.0-or-later" [lints] workspace = true +[lib] +doctest = false + [dependencies] anyhow.workspace = true collections.workspace = true diff --git a/crates/sqlez_macros/Cargo.toml b/crates/sqlez_macros/Cargo.toml index cff96d0b89..0c9beac390 100644 --- a/crates/sqlez_macros/Cargo.toml +++ b/crates/sqlez_macros/Cargo.toml @@ -12,6 +12,7 @@ workspace = true path = "src/sqlez_macros.rs" proc-macro = true doctest = false +test = false [dependencies] sqlez.workspace = true diff --git a/crates/streaming_diff/Cargo.toml b/crates/streaming_diff/Cargo.toml index d3365d5793..8d13705b9c 100644 --- a/crates/streaming_diff/Cargo.toml +++ b/crates/streaming_diff/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/streaming_diff.rs" +doctest = false [dependencies] ordered-float.workspace = true diff --git a/crates/svg_preview/Cargo.toml b/crates/svg_preview/Cargo.toml index 9ee085ee07..b206b616d9 100644 --- a/crates/svg_preview/Cargo.toml +++ b/crates/svg_preview/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/svg_preview.rs" +test = false +doctest = false [dependencies] multi_buffer.workspace = true diff --git a/crates/system_specs/Cargo.toml b/crates/system_specs/Cargo.toml index 7af62d934a..dcd6dd1e8c 100644 --- a/crates/system_specs/Cargo.toml +++ b/crates/system_specs/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/system_specs.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/tabular_data_preview/Cargo.toml b/crates/tabular_data_preview/Cargo.toml index a9d263b130..dfa1239701 100644 --- a/crates/tabular_data_preview/Cargo.toml +++ b/crates/tabular_data_preview/Cargo.toml @@ -6,6 +6,7 @@ edition.workspace = true [lib] path = "src/tabular_data_preview.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/tasks_ui/Cargo.toml b/crates/tasks_ui/Cargo.toml index 89a1426a5d..7512b22521 100644 --- a/crates/tasks_ui/Cargo.toml +++ b/crates/tasks_ui/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/tasks_ui.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/telemetry/Cargo.toml b/crates/telemetry/Cargo.toml index f79c80bb17..263ebbab25 100644 --- a/crates/telemetry/Cargo.toml +++ b/crates/telemetry/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/telemetry.rs" +test = false [dependencies] serde_json.workspace = true diff --git a/crates/telemetry_events/Cargo.toml b/crates/telemetry_events/Cargo.toml index 6a5149c545..1094f13896 100644 --- a/crates/telemetry_events/Cargo.toml +++ b/crates/telemetry_events/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/telemetry_events.rs" +test = false +doctest = false [dependencies] semver.workspace = true diff --git a/crates/theme_extension/Cargo.toml b/crates/theme_extension/Cargo.toml index ca5b71de20..3094ddb0b5 100644 --- a/crates/theme_extension/Cargo.toml +++ b/crates/theme_extension/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/theme_extension.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/toolchain_selector/Cargo.toml b/crates/toolchain_selector/Cargo.toml index 09f9acceab..0c3cd7ce0b 100644 --- a/crates/toolchain_selector/Cargo.toml +++ b/crates/toolchain_selector/Cargo.toml @@ -27,3 +27,4 @@ workspace = true [lib] path = "src/toolchain_selector.rs" doctest = false +test = false diff --git a/crates/ui_input/Cargo.toml b/crates/ui_input/Cargo.toml index fef5216266..6ee0df793f 100644 --- a/crates/ui_input/Cargo.toml +++ b/crates/ui_input/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/ui_input.rs" +test = false +doctest = false [dependencies] component.workspace = true diff --git a/crates/ui_macros/Cargo.toml b/crates/ui_macros/Cargo.toml index 74bd2186a7..e2e3f96697 100644 --- a/crates/ui_macros/Cargo.toml +++ b/crates/ui_macros/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/ui_macros.rs" proc-macro = true +test = false [dependencies] quote.workspace = true diff --git a/crates/ui_prompt/Cargo.toml b/crates/ui_prompt/Cargo.toml index b8425a1a66..a8644cc8ae 100644 --- a/crates/ui_prompt/Cargo.toml +++ b/crates/ui_prompt/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/ui_prompt.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/util_macros/Cargo.toml b/crates/util_macros/Cargo.toml index f72955b3ae..5eb4173eb7 100644 --- a/crates/util_macros/Cargo.toml +++ b/crates/util_macros/Cargo.toml @@ -12,7 +12,7 @@ workspace = true [lib] path = "src/util_macros.rs" proc-macro = true -doctest = false +test = false [dependencies] quote.workspace = true diff --git a/crates/vim_mode_setting/Cargo.toml b/crates/vim_mode_setting/Cargo.toml index 6306d125b2..99814994bb 100644 --- a/crates/vim_mode_setting/Cargo.toml +++ b/crates/vim_mode_setting/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/vim_mode_setting.rs" +test = false +doctest = false [dependencies] gpui.workspace = true diff --git a/crates/web_search/Cargo.toml b/crates/web_search/Cargo.toml index 1da6609514..9b28a6914b 100644 --- a/crates/web_search/Cargo.toml +++ b/crates/web_search/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/web_search.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/web_search_providers/Cargo.toml b/crates/web_search_providers/Cargo.toml index 92a33b7382..e745f19299 100644 --- a/crates/web_search_providers/Cargo.toml +++ b/crates/web_search_providers/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/web_search_providers.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/windows_resources/Cargo.toml b/crates/windows_resources/Cargo.toml index 4344040660..41a277cccd 100644 --- a/crates/windows_resources/Cargo.toml +++ b/crates/windows_resources/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/windows_resources.rs" doctest = false +test = false [target.'cfg(target_os = "windows")'.dependencies] embed-resource = "3.0" diff --git a/crates/worktree/Cargo.toml b/crates/worktree/Cargo.toml index 99cbf3268a..fb0ef41338 100644 --- a/crates/worktree/Cargo.toml +++ b/crates/worktree/Cargo.toml @@ -8,7 +8,6 @@ license = "GPL-3.0-or-later" [lib] path = "src/worktree.rs" doctest = false -test = false [[test]] name = "integration" diff --git a/crates/x_ai/Cargo.toml b/crates/x_ai/Cargo.toml index 8ff020df8c..bf6a463149 100644 --- a/crates/x_ai/Cargo.toml +++ b/crates/x_ai/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/x_ai.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/x_ai_subscribed/Cargo.toml b/crates/x_ai_subscribed/Cargo.toml index e9ab153ef1..e1d1420952 100644 --- a/crates/x_ai_subscribed/Cargo.toml +++ b/crates/x_ai_subscribed/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/x_ai_subscribed.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/zed_actions/Cargo.toml b/crates/zed_actions/Cargo.toml index 08dd736002..5f2dd6fa58 100644 --- a/crates/zed_actions/Cargo.toml +++ b/crates/zed_actions/Cargo.toml @@ -8,6 +8,10 @@ license = "GPL-3.0-or-later" [lints] workspace = true +[lib] +test = false +doctest = false + [dependencies] gpui.workspace = true schemars.workspace = true diff --git a/crates/zed_credentials_provider/Cargo.toml b/crates/zed_credentials_provider/Cargo.toml index 653aa05b80..50bbc74cbb 100644 --- a/crates/zed_credentials_provider/Cargo.toml +++ b/crates/zed_credentials_provider/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/zed_credentials_provider.rs" +test = false +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/zed_env_vars/Cargo.toml b/crates/zed_env_vars/Cargo.toml index bf863b7425..28a35c8f33 100644 --- a/crates/zed_env_vars/Cargo.toml +++ b/crates/zed_env_vars/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/zed_env_vars.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/zeta_prompt/Cargo.toml b/crates/zeta_prompt/Cargo.toml index 8acd91a7a4..e4601383f9 100644 --- a/crates/zeta_prompt/Cargo.toml +++ b/crates/zeta_prompt/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/zeta_prompt.rs" +doctest = false [dependencies] anyhow.workspace = true diff --git a/crates/zlog/Cargo.toml b/crates/zlog/Cargo.toml index 46f2cff324..b1a8ce3a43 100644 --- a/crates/zlog/Cargo.toml +++ b/crates/zlog/Cargo.toml @@ -10,6 +10,7 @@ workspace = true [lib] path = "src/zlog.rs" +doctest = false [features] default = [] diff --git a/crates/zlog_settings/Cargo.toml b/crates/zlog_settings/Cargo.toml index 39c3b6a193..f7ca29c82a 100644 --- a/crates/zlog_settings/Cargo.toml +++ b/crates/zlog_settings/Cargo.toml @@ -10,6 +10,8 @@ workspace = true [lib] path = "src/zlog_settings.rs" +test = false +doctest = false [features] default = [] diff --git a/crates/ztracing/Cargo.toml b/crates/ztracing/Cargo.toml index e823785acd..c08ca435cb 100644 --- a/crates/ztracing/Cargo.toml +++ b/crates/ztracing/Cargo.toml @@ -8,6 +8,9 @@ license = "Apache-2.0" [lints] workspace = true +[lib] +doctest = false + [features] tracy = ["tracing-tracy", "tracy-client"] web = ["dep:async-channel", "dep:js-sys", "dep:wasm-bindgen", "dep:web-sys"] diff --git a/crates/ztracing_macro/Cargo.toml b/crates/ztracing_macro/Cargo.toml index 5420bc6063..78feebb873 100644 --- a/crates/ztracing_macro/Cargo.toml +++ b/crates/ztracing_macro/Cargo.toml @@ -7,5 +7,5 @@ license = "Apache-2.0" [lib] proc-macro = true - -[dependencies] +test = false +doctest = false diff --git a/extensions/glsl/Cargo.toml b/extensions/glsl/Cargo.toml index 2c08cf936d..4c68d56c8a 100644 --- a/extensions/glsl/Cargo.toml +++ b/extensions/glsl/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/glsl.rs" crate-type = ["cdylib"] +test = false [dependencies] zed_extension_api = "0.1.0" diff --git a/extensions/html/Cargo.toml b/extensions/html/Cargo.toml index aefe0eb120..80051a2592 100644 --- a/extensions/html/Cargo.toml +++ b/extensions/html/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/html.rs" crate-type = ["cdylib"] +test = false [dependencies] zed_extension_api = "0.7.0" diff --git a/extensions/proto/Cargo.toml b/extensions/proto/Cargo.toml index 685b3271f5..80123069ac 100644 --- a/extensions/proto/Cargo.toml +++ b/extensions/proto/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/proto.rs" crate-type = ["cdylib"] +test = false [dependencies] zed_extension_api = "0.7.0" diff --git a/extensions/test-extension/Cargo.toml b/extensions/test-extension/Cargo.toml index 7d2412b98f..9de84dec27 100644 --- a/extensions/test-extension/Cargo.toml +++ b/extensions/test-extension/Cargo.toml @@ -11,6 +11,7 @@ workspace = true [lib] path = "src/test_extension.rs" crate-type = ["cdylib"] +test = false [dependencies] zed_extension_api = { path = "../../crates/extension_api" } diff --git a/tooling/compliance/Cargo.toml b/tooling/compliance/Cargo.toml index f98fef6305..8a781b3a68 100644 --- a/tooling/compliance/Cargo.toml +++ b/tooling/compliance/Cargo.toml @@ -8,6 +8,9 @@ license = "GPL-3.0-or-later" [lints] workspace = true +[lib] +doctest = false + [features] octo-client = ["dep:octocrab", "dep:jsonwebtoken", "dep:tokio"] diff --git a/tooling/perf/Cargo.toml b/tooling/perf/Cargo.toml index d4acad1fdb..1dc07d89b3 100644 --- a/tooling/perf/Cargo.toml +++ b/tooling/perf/Cargo.toml @@ -6,8 +6,6 @@ edition.workspace = true license = "Apache-2.0" description = "A tool for measuring Zed test performance, with too many Clippy lints" -[lib] - # Some personal lint preferences :3 [lints.rust] missing_docs = "warn" @@ -30,3 +28,7 @@ disallowed_methods = { level = "allow", priority = 1} collections.workspace = true serde.workspace = true serde_json.workspace = true + +[lib] +test = false +doctest = false diff --git a/tooling/xtask/src/tasks/workflows/autofix_pr.rs b/tooling/xtask/src/tasks/workflows/autofix_pr.rs index 7ccb8539ad..403f5c51b1 100644 --- a/tooling/xtask/src/tasks/workflows/autofix_pr.rs +++ b/tooling/xtask/src/tasks/workflows/autofix_pr.rs @@ -74,7 +74,7 @@ fn run_autofix(pr_number: &WorkflowInput, run_clippy: &WorkflowInput) -> NamedJo } fn run_cargo_shear_fix() -> Step { - named::bash("cargo shear --fix") + named::bash("cargo shear --fix --check-test-targets") } fn run_clippy_fix() -> Step { diff --git a/tooling/xtask/src/tasks/workflows/run_tests.rs b/tooling/xtask/src/tasks/workflows/run_tests.rs index 2dd40c45e4..7ab25bcdec 100644 --- a/tooling/xtask/src/tasks/workflows/run_tests.rs +++ b/tooling/xtask/src/tasks/workflows/run_tests.rs @@ -464,7 +464,7 @@ fn check_dependencies() -> NamedJob { } fn run_cargo_shear() -> Step { - named::bash("cargo shear --locked --deny-warnings") + named::bash("cargo shear --locked --deny-warnings --check-test-targets") } fn check_cargo_lock() -> Step {