Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
More detailed errors when opening files
Kirill Bulatov888098bad2fc
diff --git a/crates/project/src/project.rs b/crates/project/src/project.rsindex 468659e5b9f..322b2ae894f 100644--- a/crates/project/src/project.rs+++ b/crates/project/src/project.rs@@ -1709,6 +1709,7 @@ impl Project {self.open_remote_buffer_internal(&project_path.path, &worktree, cx)};+ let project_path = project_path.clone();cx.spawn(move |this, mut cx| async move {let load_result = load_buffer.await;*tx.borrow_mut() = Some(this.update(&mut cx, |this, _| {@@ -1726,7 +1727,7 @@ impl Project {cx.foreground().spawn(async move {wait_for_loading_buffer(loading_watch).await- .map_err(|error| anyhow!("{}", error))+ .map_err(|error| anyhow!("{project_path:?} opening failure: {error:#}"))})}diff --git a/crates/project/src/worktree.rs b/crates/project/src/worktree.rsindex 80fd44761c7..785ce58bb8d 100644--- a/crates/project/src/worktree.rs+++ b/crates/project/src/worktree.rs@@ -3694,7 +3694,7 @@ impl BackgroundScanner {}Err(err) => {// TODO - create a special 'error' entry in the entries tree to mark this- log::error!("error reading file on event {:?}", err);+ log::error!("error reading file {abs_path:?} on event: {err:#}");}}}diff --git a/crates/project2/src/project2.rs b/crates/project2/src/project2.rsindex efe407f847b..61ad500a734 100644--- a/crates/project2/src/project2.rs+++ b/crates/project2/src/project2.rs@@ -1741,6 +1741,7 @@ impl Project {self.open_remote_buffer_internal(&project_path.path, &worktree, cx)};+ let project_path = project_path.clone();cx.spawn(move |this, mut cx| async move {let load_result = load_buffer.await;*tx.borrow_mut() = Some(this.update(&mut cx, |this, _| {@@ -1759,7 +1760,7 @@ impl Project {cx.background_executor().spawn(async move {wait_for_loading_buffer(loading_watch).await- .map_err(|error| anyhow!("{}", error))+ .map_err(|error| anyhow!("{project_path:?} opening failure: {error:#}"))})}diff --git a/crates/project2/src/worktree.rs b/crates/project2/src/worktree.rsindex 65959d3f310..9444dd91854 100644--- a/crates/project2/src/worktree.rs+++ b/crates/project2/src/worktree.rs@@ -3684,7 +3684,7 @@ impl BackgroundScanner {}Err(err) => {// TODO - create a special 'error' entry in the entries tree to mark this- log::error!("error reading file on event {:?}", err);+ log::error!("error reading file {abs_path:?} on event: {err:#}");}}}