Unverified Commit 6363f5ad authored by Tim Neutkens's avatar Tim Neutkens Committed by GitHub

Turbopack: Improve unreachable code error message (#80934)

## What?

Improves this `unreachable!()` as [Ciprian
Caba](https://x.com/cipriancaba) reached out hitting this particular
case but there's no info as to what path causes it. This PR adds that
info.
parent b3e6b5b6
...@@ -165,7 +165,13 @@ async fn track_glob_internal( ...@@ -165,7 +165,13 @@ async fn track_glob_internal(
reads.push(fs.read(*path)) reads.push(fs.read(*path))
} }
} }
DirectoryEntry::Symlink(_) => unreachable!("we already resolved symlinks"), DirectoryEntry::Symlink(symlink_path) => unreachable!(
"resolve_symlink_safely() should have resolved all symlinks, but found \
unresolved symlink at path: '{}'. Found path: '{}'. Please report this \
as a bug.",
entry_path,
symlink_path.await?
),
DirectoryEntry::Other(path) => { DirectoryEntry::Other(path) => {
if glob_value.matches(&entry_path) { if glob_value.matches(&entry_path) {
types.push(path.get_type()) types.push(path.get_type())
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment