Skip to content

Commit

Permalink
Review comments: bail when dropping traced externals
Browse files Browse the repository at this point in the history
  • Loading branch information
mischnic committed Nov 19, 2024
1 parent a5d4be8 commit d2458e4
Showing 1 changed file with 11 additions and 11 deletions.
22 changes: 11 additions & 11 deletions turbopack/crates/turbopack-core/src/resolve/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -698,17 +698,17 @@ impl ResolveResult {
request,
match item {
ResolveResultItem::Source(source) => asset_fn(source).await?,
ResolveResultItem::External {
name,
ty,
// TODO remove this whole function? it's easy to drop traced
// externals now
traced: _,
} => ModuleResolveResultItem::External {
name,
ty,
traced: None,
},
ResolveResultItem::External { name, ty, traced } => {
if traced == ExternalTraced::Traced {
// Should use map_primary_items instead
bail!("map_module doesn't handle traced externals");
}
ModuleResolveResultItem::External {
name,
ty,
traced: None,
}
}
ResolveResultItem::Ignore => ModuleResolveResultItem::Ignore,
ResolveResultItem::Empty => ModuleResolveResultItem::Empty,
ResolveResultItem::Error(e) => {
Expand Down

0 comments on commit d2458e4

Please sign in to comment.