From cd6378e84806e7fa8db3cbca2c57fa21ecc57366 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Tue, 5 Oct 2021 14:30:56 +0200 Subject: [PATCH] Extract `file_finder` into its own crate --- Cargo.lock | 16 ++++++++++++++++ crates/file_finder/Cargo.toml | 18 ++++++++++++++++++ .../file_finder.rs => file_finder/src/lib.rs} | 0 crates/zed/Cargo.toml | 1 + crates/zed/src/lib.rs | 1 - crates/zed/src/main.rs | 2 +- 6 files changed, 36 insertions(+), 2 deletions(-) create mode 100644 crates/file_finder/Cargo.toml rename crates/{zed/src/file_finder.rs => file_finder/src/lib.rs} (100%) diff --git a/Cargo.lock b/Cargo.lock index 87a8f3f0ac..57446e740a 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1855,6 +1855,21 @@ dependencies = [ "subtle", ] +[[package]] +name = "file_finder" +version = "0.1.0" +dependencies = [ + "editor", + "fuzzy", + "gpui", + "postage", + "project", + "serde_json 1.0.64", + "theme", + "util", + "workspace", +] + [[package]] name = "filetime" version = "0.2.14" @@ -6124,6 +6139,7 @@ dependencies = [ "easy-parallel", "editor", "env_logger", + "file_finder", "fsevent", "futures", "fuzzy", diff --git a/crates/file_finder/Cargo.toml b/crates/file_finder/Cargo.toml new file mode 100644 index 0000000000..70267b1d19 --- /dev/null +++ b/crates/file_finder/Cargo.toml @@ -0,0 +1,18 @@ +[package] +name = "file_finder" +version = "0.1.0" +edition = "2018" + +[dependencies] +editor = { path = "../editor" } +fuzzy = { path = "../fuzzy" } +gpui = { path = "../gpui" } +project = { path = "../project" } +util = { path = "../util" } +theme = { path = "../theme" } +workspace = { path = "../workspace" } +postage = { version = "0.4.1", features = ["futures-traits"] } + +[dev-dependencies] +serde_json = { version = "1.0.64", features = ["preserve_order"] } +workspace = { path = "../workspace", features = ["test-support"] } diff --git a/crates/zed/src/file_finder.rs b/crates/file_finder/src/lib.rs similarity index 100% rename from crates/zed/src/file_finder.rs rename to crates/file_finder/src/lib.rs diff --git a/crates/zed/Cargo.toml b/crates/zed/Cargo.toml index cc21d726e2..48195fcb4c 100644 --- a/crates/zed/Cargo.toml +++ b/crates/zed/Cargo.toml @@ -31,6 +31,7 @@ clock = { path = "../clock" } fsevent = { path = "../fsevent" } fuzzy = { path = "../fuzzy" } editor = { path = "../editor" } +file_finder = { path = "../file_finder" } gpui = { path = "../gpui" } project = { path = "../project" } project_panel = { path = "../project_panel" } diff --git a/crates/zed/src/lib.rs b/crates/zed/src/lib.rs index 2a9568e0a8..831bc98b62 100644 --- a/crates/zed/src/lib.rs +++ b/crates/zed/src/lib.rs @@ -1,5 +1,4 @@ pub mod assets; -pub mod file_finder; pub mod language; pub mod menus; pub mod people_panel; diff --git a/crates/zed/src/main.rs b/crates/zed/src/main.rs index 155d40b672..13be0128ff 100644 --- a/crates/zed/src/main.rs +++ b/crates/zed/src/main.rs @@ -13,7 +13,7 @@ use zed::{ self, assets::Assets, client::{self, http, ChannelList, UserStore}, - editor, file_finder, + editor, fs::RealFs, language, menus, people_panel, theme_selector, AppState, OpenParams, OpenPaths, };