Unverified Commit 642ae3e4 authored by Tobias Koppers's avatar Tobias Koppers Committed by GitHub

Turbopack: follow-up changes from untracked tracing (#84629)

### What?

avoid some calls when tracing is not enabled
parent 3dcbb849
...@@ -1698,12 +1698,11 @@ enum SingleModuleGraphBuilderNode { ...@@ -1698,12 +1698,11 @@ enum SingleModuleGraphBuilderNode {
impl SingleModuleGraphBuilderNode { impl SingleModuleGraphBuilderNode {
async fn new_module(emit_spans: bool, module: ResolvedVc<Box<dyn Module>>) -> Result<Self> { async fn new_module(emit_spans: bool, module: ResolvedVc<Box<dyn Module>>) -> Result<Self> {
let ident = module.ident();
Ok(Self::Module { Ok(Self::Module {
module, module,
ident: if emit_spans { ident: if emit_spans {
// INVALIDATION: we don't need to invalidate when the span name changes // INVALIDATION: we don't need to invalidate when the span name changes
Some(ident.to_string().untracked().await?) Some(module.ident_string().untracked().await?)
} else { } else {
None None
}, },
......
...@@ -20,8 +20,8 @@ pub trait OutputAsset: Asset { ...@@ -20,8 +20,8 @@ pub trait OutputAsset: Asset {
/// The identifier of the [OutputAsset] as string. It's expected to be unique and /// The identifier of the [OutputAsset] as string. It's expected to be unique and
/// capture all properties of the [OutputAsset]. /// capture all properties of the [OutputAsset].
#[turbo_tasks::function] #[turbo_tasks::function]
async fn path_string(self: Vc<Self>) -> Result<Vc<RcStr>> { fn path_string(self: Vc<Self>) -> Vc<RcStr> {
Ok(self.path().resolve().await?.to_string()) self.path().to_string()
} }
/// Other references [OutputAsset]s from this [OutputAsset]. /// Other references [OutputAsset]s from this [OutputAsset].
......
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