windows: Add some trace-level logging to help dig into missing FS update bugs (#40200)

Related to https://github.com/zed-industries/zed/issues/38109

Release Notes:

- N/A
This commit is contained in:
Cole Miller
2025-10-14 23:12:30 +00:00
committed by GitHub
parent 0d84651f14
commit 54df5812d9
4 changed files with 16 additions and 1 deletions
+2 -1
View File
@@ -2439,6 +2439,7 @@ impl LocalSnapshot {
}
fn insert_entry(&mut self, mut entry: Entry, fs: &dyn Fs) -> Entry {
log::trace!("insert entry {:?}", entry.path);
if entry.is_file() && entry.path.file_name() == Some(&GITIGNORE) {
let abs_path = self.absolutize(&entry.path);
match smol::block_on(build_gitignore(&abs_path, fs)) {
@@ -3769,6 +3770,7 @@ impl BackgroundScanner {
}
async fn process_events(&self, mut abs_paths: Vec<PathBuf>) {
log::trace!("process events: {abs_paths:?}");
let root_path = self.state.lock().snapshot.abs_path.clone();
let root_canonical_path = self.fs.canonicalize(root_path.as_path()).await;
let root_canonical_path = match &root_canonical_path {
@@ -4368,7 +4370,6 @@ impl BackgroundScanner {
// detected regardless of the order of the paths.
for (path, metadata) in relative_paths.iter().zip(metadata.iter()) {
if matches!(metadata, Ok(None)) || doing_recursive_update {
log::trace!("remove path {:?}", path);
state.remove_path(path);
}
}