From bec63dee23d2c257bf0010c87bda8b45b838134d Mon Sep 17 00:00:00 2001 From: Kirill Bulatov Date: Tue, 15 Sep 2026 16:58:03 +0000 Subject: [PATCH] Revert "Implement `inspector` flag (#62920)" (#64248) This reverts commit bf2d51bcfdf0b498b2ee21c1a0a62bbe42c41982. As discussed with @\ChristopherBiscardi , this has to be implemented differently, making a first step towards that. Release Notes: - N/A --- crates/inspector_ui/Cargo.toml | 3 --- crates/inspector_ui/src/inspector_ui.rs | 10 +++++----- crates/ui/Cargo.toml | 1 - crates/ui/src/traits/styled_ext.rs | 5 +---- crates/zed/Cargo.toml | 5 ----- 5 files changed, 6 insertions(+), 18 deletions(-) diff --git a/crates/inspector_ui/Cargo.toml b/crates/inspector_ui/Cargo.toml index 892f93d9b5..ec1f01195c 100644 --- a/crates/inspector_ui/Cargo.toml +++ b/crates/inspector_ui/Cargo.toml @@ -11,9 +11,6 @@ workspace = true [lib] path = "src/inspector_ui.rs" -[features] -inspector = [] - [dependencies] anyhow.workspace = true command_palette_hooks.workspace = true diff --git a/crates/inspector_ui/src/inspector_ui.rs b/crates/inspector_ui/src/inspector_ui.rs index d608ea76ca..1342007005 100644 --- a/crates/inspector_ui/src/inspector_ui.rs +++ b/crates/inspector_ui/src/inspector_ui.rs @@ -1,19 +1,19 @@ -#[cfg(any(debug_assertions, feature = "inspector"))] +#[cfg(debug_assertions)] mod div_inspector; -#[cfg(any(debug_assertions, feature = "inspector"))] +#[cfg(debug_assertions)] mod inspector; -#[cfg(any(debug_assertions, feature = "inspector"))] +#[cfg(debug_assertions)] pub use inspector::init; -#[cfg(not(any(debug_assertions, feature = "inspector")))] +#[cfg(not(debug_assertions))] pub fn init(_app_state: std::sync::Arc, cx: &mut gpui::App) { use std::any::TypeId; use workspace::notifications::NotifyResultExt as _; cx.on_action(|_: &zed_actions::dev::ToggleInspector, cx| { Err::<(), anyhow::Error>(anyhow::anyhow!( - "dev::ToggleInspector is only available in debug builds and Nightly" + "dev::ToggleInspector is only available in debug builds" )) .notify_app_err(cx); }); diff --git a/crates/ui/Cargo.toml b/crates/ui/Cargo.toml index 6b2ed189aa..7ff2cfa371 100644 --- a/crates/ui/Cargo.toml +++ b/crates/ui/Cargo.toml @@ -42,4 +42,3 @@ ignored = ["log"] [features] default = [] -derive_inspector_reflection = [] diff --git a/crates/ui/src/traits/styled_ext.rs b/crates/ui/src/traits/styled_ext.rs index c509595362..849e56a024 100644 --- a/crates/ui/src/traits/styled_ext.rs +++ b/crates/ui/src/traits/styled_ext.rs @@ -20,10 +20,7 @@ fn elevated_borderless(this: E, cx: &mut App, index: ElevationIndex) /// Extends [`gpui::Styled`] with Zed-specific styling methods. // gate on rust-analyzer so rust-analyzer never needs to expand this macro, it takes up to 10 seconds to expand due to inefficiencies in rust-analyzers proc-macro srv #[cfg_attr( - all( - any(debug_assertions, feature = "derive_inspector_reflection"), - not(rust_analyzer) - ), + all(debug_assertions, not(rust_analyzer)), gpui_macros::derive_inspector_reflection )] pub trait StyledExt: Styled + Sized { diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index d9562b672b..c706989746 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -12,11 +12,6 @@ default-run = "zed" workspace = true [features] -inspector = [ - "gpui/inspector", - "inspector_ui/inspector", - "ui/derive_inspector_reflection", -] tracy = ["ztracing/tracy"] # LEAK_BACKTRACE=1 cargo run --features zed/track-project-leak --profile release-fast track-project-leak = ["gpui/leak-detection"]