Skip to content

Commit 52032b3

Browse files
committed
add tracing code
1 parent 13f37b6 commit 52032b3

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

  • crates/vite_task/src

crates/vite_task/src/fs.rs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ fn hash_content(mut stream: impl Read) -> io::Result<u64> {
4040
}
4141

4242
impl FileSystem for RealFileSystem {
43+
#[tracing::instrument(level = "trace")]
4344
fn fingerprint_path(
4445
&self,
4546
path: &Arc<AbsolutePath>,
@@ -59,7 +60,13 @@ impl FileSystem for RealFileSystem {
5960
return RealFileSystem::process_directory(std_path, path_read);
6061
}
6162
}
62-
63+
if err.kind() != io::ErrorKind::NotFound {
64+
tracing::trace!(
65+
"Uncommon error when openning {:?} for fingerprinting: {}",
66+
std_path,
67+
err
68+
);
69+
}
6370
// There are many reasons why opening a file might fail (NotFound, InvalidFilename, NotADirectory, PermissionDenied).
6471
// Consider all of them as NotFound for fingerprinting purposes.
6572
return Ok(PathFingerprint::NotFound);

0 commit comments

Comments
 (0)