Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
update prettier2, call2 and project2 to use fs2
KCaverlyb34f0c3bee3b
diff --git a/Cargo.lock b/Cargo.lockindex a5d187d08e5..85eb0fde850 100644--- a/Cargo.lock+++ b/Cargo.lock@@ -1165,7 +1165,7 @@ dependencies = ["audio2","client2","collections",- "fs",+ "fs2","futures 0.3.28","gpui2","language2",@@ -6034,7 +6034,7 @@ dependencies = ["anyhow","client2","collections",- "fs",+ "fs2","futures 0.3.28","gpui2","language2",@@ -6201,7 +6201,7 @@ dependencies = ["ctor","db2","env_logger 0.9.3",- "fs",+ "fs2","fsevent","futures 0.3.28","fuzzy2",diff --git a/crates/call2/Cargo.toml b/crates/call2/Cargo.tomlindex efc7ab326e6..f0e47832ed3 100644--- a/crates/call2/Cargo.toml+++ b/crates/call2/Cargo.toml@@ -25,7 +25,7 @@ collections = { path = "../collections" }gpui2 = { path = "../gpui2" }log.workspace = truelive_kit_client = { path = "../live_kit_client" }-fs = { path = "../fs" }+fs2 = { path = "../fs2" }language2 = { path = "../language2" }media = { path = "../media" }project2 = { path = "../project2" }@@ -43,7 +43,7 @@ serde_derive.workspace = true[dev-dependencies]client2 = { path = "../client2", features = ["test-support"] }-fs = { path = "../fs", features = ["test-support"] }+fs2 = { path = "../fs2", features = ["test-support"] }language2 = { path = "../language2", features = ["test-support"] }collections = { path = "../collections", features = ["test-support"] }gpui2 = { path = "../gpui2", features = ["test-support"] }diff --git a/crates/call2/src/room.rs b/crates/call2/src/room.rsindex 7f51c64d4b6..b7bac52a8bf 100644--- a/crates/call2/src/room.rs+++ b/crates/call2/src/room.rs@@ -13,7 +13,7 @@ use client2::{Client, ParticipantIndex, TypedEnvelope, User, UserStore,};use collections::{BTreeMap, HashMap, HashSet};-use fs::Fs;+use fs2::Fs;use futures::{FutureExt, StreamExt};use gpui2::{AppContext, AsyncAppContext, Context, EventEmitter, Model, ModelContext, Task, WeakModel,diff --git a/crates/prettier2/Cargo.toml b/crates/prettier2/Cargo.tomlindex 8defd402624..b98124f72cf 100644--- a/crates/prettier2/Cargo.toml+++ b/crates/prettier2/Cargo.toml@@ -16,7 +16,7 @@ client2 = { path = "../client2" }collections = { path = "../collections"}language2 = { path = "../language2" }gpui2 = { path = "../gpui2" }-fs = { path = "../fs" }+fs2 = { path = "../fs2" }lsp2 = { path = "../lsp2" }node_runtime = { path = "../node_runtime"}util = { path = "../util" }@@ -32,4 +32,4 @@ parking_lot.workspace = true[dev-dependencies]language2 = { path = "../language2", features = ["test-support"] }gpui2 = { path = "../gpui2", features = ["test-support"] }-fs = { path = "../fs", features = ["test-support"] }+fs2 = { path = "../fs2", features = ["test-support"] }diff --git a/crates/prettier2/src/prettier2.rs b/crates/prettier2/src/prettier2.rsindex 52e5971a80e..804aeab5945 100644--- a/crates/prettier2/src/prettier2.rs+++ b/crates/prettier2/src/prettier2.rs@@ -1,6 +1,6 @@use anyhow::Context;use collections::{HashMap, HashSet};-use fs::Fs;+use fs2::Fs;use gpui2::{AsyncAppContext, Model};use language2::{language_settings::language_settings, Buffer, BundledFormatter, Diff};use lsp2::{LanguageServer, LanguageServerId};diff --git a/crates/project2/Cargo.toml b/crates/project2/Cargo.tomlindex 98bf9b62beb..b135b5367c1 100644--- a/crates/project2/Cargo.toml+++ b/crates/project2/Cargo.toml@@ -25,7 +25,7 @@ client2 = { path = "../client2" }clock = { path = "../clock" }collections = { path = "../collections" }db2 = { path = "../db2" }-fs = { path = "../fs" }+fs2 = { path = "../fs2" }fsevent = { path = "../fsevent" }fuzzy2 = { path = "../fuzzy2" }git = { path = "../git" }@@ -71,7 +71,7 @@ pretty_assertions.workspace = trueclient2 = { path = "../client2", features = ["test-support"] }collections = { path = "../collections", features = ["test-support"] }db2 = { path = "../db2", features = ["test-support"] }-fs = { path = "../fs", features = ["test-support"] }+fs2 = { path = "../fs2", features = ["test-support"] }gpui2 = { path = "../gpui2", features = ["test-support"] }language2 = { path = "../language2", features = ["test-support"] }lsp2 = { path = "../lsp2", features = ["test-support"] }diff --git a/crates/project2/src/project2.rs b/crates/project2/src/project2.rsindex ce97b9cc22d..c2ee1718663 100644--- a/crates/project2/src/project2.rs+++ b/crates/project2/src/project2.rs@@ -89,7 +89,7 @@ use util::{post_inc, ResultExt, TryFutureExt as _,};-pub use fs::*;+pub use fs2::*;pub use worktree::*;const MAX_SERVER_REINSTALL_ATTEMPT_COUNT: u64 = 4;@@ -5201,7 +5201,7 @@ impl Project {fs.create_file(&abs_path,op.options- .map(|options| fs::CreateOptions {+ .map(|options| fs2::CreateOptions {overwrite: options.overwrite.unwrap_or(false),ignore_if_exists: options.ignore_if_exists.unwrap_or(false),})@@ -5224,7 +5224,7 @@ impl Project {&source_abs_path,&target_abs_path,op.options- .map(|options| fs::RenameOptions {+ .map(|options| fs2::RenameOptions {overwrite: options.overwrite.unwrap_or(false),ignore_if_exists: options.ignore_if_exists.unwrap_or(false),})@@ -5240,7 +5240,7 @@ impl Project {.map_err(|_| anyhow!("can't convert URI to path"))?;let options = op.options- .map(|options| fs::RemoveOptions {+ .map(|options| fs2::RemoveOptions {recursive: options.recursive.unwrap_or(false),ignore_if_not_exists: options.ignore_if_not_exists.unwrap_or(false),})diff --git a/crates/project2/src/worktree.rs b/crates/project2/src/worktree.rsindex 00ab10d8e8e..d73769cc000 100644--- a/crates/project2/src/worktree.rs+++ b/crates/project2/src/worktree.rs@@ -6,7 +6,7 @@ use anyhow::{anyhow, Context as _, Result};use client2::{proto, Client};use clock::ReplicaId;use collections::{HashMap, HashSet, VecDeque};-use fs::{+use fs2::{repository::{GitFileStatus, GitRepository, RepoPath},Fs,};@@ -2815,7 +2815,7 @@ pub type UpdatedGitRepositoriesSet = Arc<[(Arc<Path>, GitRepositoryChange)]>;impl Entry {fn new(path: Arc<Path>,- metadata: &fs::Metadata,+ metadata: &fs2::Metadata,next_entry_id: &AtomicUsize,root_char_bag: CharBag,) -> Self {