Skip to content

Commit 642ae3e

Browse files
authored
Turbopack: follow-up changes from untracked tracing (#84629)
### What? avoid some calls when tracing is not enabled
1 parent 3dcbb84 commit 642ae3e

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

turbopack/crates/turbopack-core/src/module_graph/mod.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1698,12 +1698,11 @@ enum SingleModuleGraphBuilderNode {
16981698

16991699
impl SingleModuleGraphBuilderNode {
17001700
async fn new_module(emit_spans: bool, module: ResolvedVc<Box<dyn Module>>) -> Result<Self> {
1701-
let ident = module.ident();
17021701
Ok(Self::Module {
17031702
module,
17041703
ident: if emit_spans {
17051704
// INVALIDATION: we don't need to invalidate when the span name changes
1706-
Some(ident.to_string().untracked().await?)
1705+
Some(module.ident_string().untracked().await?)
17071706
} else {
17081707
None
17091708
},

turbopack/crates/turbopack-core/src/output.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@ pub trait OutputAsset: Asset {
2020
/// The identifier of the [OutputAsset] as string. It's expected to be unique and
2121
/// capture all properties of the [OutputAsset].
2222
#[turbo_tasks::function]
23-
async fn path_string(self: Vc<Self>) -> Result<Vc<RcStr>> {
24-
Ok(self.path().resolve().await?.to_string())
23+
fn path_string(self: Vc<Self>) -> Vc<RcStr> {
24+
self.path().to_string()
2525
}
2626

2727
/// Other references [OutputAsset]s from this [OutputAsset].

0 commit comments

Comments
 (0)