Skip to content

Commit bb9b325

Browse files
committed
Debugging DirAssetReference
1 parent 046ecc4 commit bb9b325

File tree

1 file changed

+12
-1
lines changed
  • turbopack/crates/turbopack-ecmascript/src/references

1 file changed

+12
-1
lines changed

turbopack/crates/turbopack-ecmascript/src/references/node.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
use anyhow::Result;
22
use either::Either;
3+
use tracing::Instrument;
34
use turbo_rcstr::{RcStr, rcstr};
45
use turbo_tasks::{ResolvedVc, ValueToString, Vc};
56
use turbo_tasks_fs::FileSystemPath;
@@ -156,7 +157,17 @@ impl ModuleReference for DirAssetReference {
156157
#[turbo_tasks::function]
157158
async fn resolve_reference(&self) -> Result<Vc<ModuleResolveResult>> {
158159
let parent_path = self.source.ident().path().await?.parent();
159-
Ok(resolve_reference_from_dir(parent_path, *self.path))
160+
let span = tracing::trace_span!(
161+
"resolve DirAssetReference",
162+
pattern = display(self.path.to_string().await?)
163+
);
164+
async {
165+
resolve_reference_from_dir(parent_path, *self.path)
166+
.resolve()
167+
.await
168+
}
169+
.instrument(span)
170+
.await
160171
}
161172
}
162173

0 commit comments

Comments
 (0)