From 800c2685ea4315d8749019b4530c067d66a6975e Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Fri, 3 Nov 2023 09:05:58 +0100 Subject: [PATCH] Remove dependency from gpui from editor2 --- Cargo.lock | 5 +---- crates/copilot2/Cargo.toml | 2 +- crates/editor2/Cargo.toml | 6 +++--- crates/editor2/src/editor.rs | 2 +- crates/editor2/src/mouse_context_menu.rs | 1 - crates/gpui2/Cargo.toml | 1 - 6 files changed, 6 insertions(+), 11 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 46d481c2ea..135e8a7ca9 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1866,7 +1866,6 @@ dependencies = [ "async-tar", "clock", "collections", - "context_menu", "fs", "futures 0.3.28", "gpui2", @@ -2631,7 +2630,6 @@ dependencies = [ "client2", "clock", "collections", - "context_menu", "convert_case 0.6.0", "copilot2", "ctor", @@ -2654,7 +2652,7 @@ dependencies = [ "postage", "project2", "rand 0.8.5", - "rich_text", + "rich_text2", "rpc2", "schemars", "serde", @@ -3578,7 +3576,6 @@ dependencies = [ "foreign-types", "futures 0.3.28", "gpui2_macros", - "gpui_macros", "image", "itertools 0.10.5", "lazy_static", diff --git a/crates/copilot2/Cargo.toml b/crates/copilot2/Cargo.toml index 2021194607..2ce432d9fc 100644 --- a/crates/copilot2/Cargo.toml +++ b/crates/copilot2/Cargo.toml @@ -20,7 +20,7 @@ test-support = [ [dependencies] collections = { path = "../collections" } -context_menu = { path = "../context_menu" } +# context_menu = { path = "../context_menu" } gpui = { package = "gpui2", path = "../gpui2" } language = { package = "language2", path = "../language2" } settings = { package = "settings2", path = "../settings2" } diff --git a/crates/editor2/Cargo.toml b/crates/editor2/Cargo.toml index f0002787f3..e356a35155 100644 --- a/crates/editor2/Cargo.toml +++ b/crates/editor2/Cargo.toml @@ -29,7 +29,7 @@ copilot = { package="copilot2", path = "../copilot2" } db = { package="db2", path = "../db2" } drag_and_drop = { path = "../drag_and_drop" } collections = { path = "../collections" } -context_menu = { path = "../context_menu" } +# context_menu = { path = "../context_menu" } fuzzy = { package = "fuzzy2", path = "../fuzzy2" } git = { path = "../git" } gpui = { package = "gpui2", path = "../gpui2" } @@ -38,7 +38,7 @@ lsp = { package = "lsp2", path = "../lsp2" } multi_buffer = { package = "multi_buffer2", path = "../multi_buffer2" } project = { package = "project2", path = "../project2" } rpc = { package = "rpc2", path = "../rpc2" } -rich_text = { path = "../rich_text" } +rich_text = { package = "rich_text2", path = "../rich_text2" } settings = { package="settings2", path = "../settings2" } snippet = { path = "../snippet" } sum_tree = { path = "../sum_tree" } @@ -46,7 +46,7 @@ text = { package="text2", path = "../text2" } theme = { package="theme2", path = "../theme2" } util = { path = "../util" } sqlez = { path = "../sqlez" } -workspace = { package="workspace2", path = "../workspace2" } +workspace = { package = "workspace2", path = "../workspace2" } aho-corasick = "1.1" anyhow.workspace = true diff --git a/crates/editor2/src/editor.rs b/crates/editor2/src/editor.rs index e2d923c339..16997fcacc 100644 --- a/crates/editor2/src/editor.rs +++ b/crates/editor2/src/editor.rs @@ -622,7 +622,7 @@ pub struct Editor { // inlay_background_highlights: TreeMap, InlayBackgroundHighlight>, nav_history: Option, context_menu: RwLock>, - mouse_context_menu: View, + // mouse_context_menu: View, completion_tasks: Vec<(CompletionId, Task>)>, next_completion_id: CompletionId, available_code_actions: Option<(Model, Arc<[CodeAction]>)>, diff --git a/crates/editor2/src/mouse_context_menu.rs b/crates/editor2/src/mouse_context_menu.rs index 97787c3d39..b70a826bf8 100644 --- a/crates/editor2/src/mouse_context_menu.rs +++ b/crates/editor2/src/mouse_context_menu.rs @@ -1,5 +1,4 @@ use crate::{DisplayPoint, Editor, EditorMode, SelectMode}; -use context_menu::ContextMenuItem; use gpui::{Pixels, Point, ViewContext}; pub fn deploy_context_menu( diff --git a/crates/gpui2/Cargo.toml b/crates/gpui2/Cargo.toml index fa072dadc3..df461af7b8 100644 --- a/crates/gpui2/Cargo.toml +++ b/crates/gpui2/Cargo.toml @@ -15,7 +15,6 @@ doctest = false [dependencies] collections = { path = "../collections" } -gpui_macros = { path = "../gpui_macros" } gpui2_macros = { path = "../gpui2_macros" } util = { path = "../util" } sum_tree = { path = "../sum_tree" }