Unverified Commit 438606c4 authored by Luke Sandberg's avatar Luke Sandberg Committed by GitHub

[turbopack] Remove the `turbo_tasks::function` attributes from a number of tasks…

[turbopack] Remove the `turbo_tasks::function` attributes from a number of tasks that do not get cache hits. (#83241)

Drop `turbo_tasks::function` annotation from functions that never get cache hits.

We only do this in cases where:
* there are no cache hits in production or dev builds
* There is a structural reason for it.  Typically, because that task is 'dominated' by another one.
* Or, the task being cached is so small that we shouldn't worry about even theoretical hits.

Tasks being modified or removed (numbers are from a vercel-site build):
* `turbopack-ecmascript::parse::parse`  (63398 tasks)
    - this task gets no hits due to a few 'dominating' tasks. In this case we remove turbotasks::function from `EcmascriptModuleAsset::parse`, since there are some theoretical hits.
* `EcmascriptChunkItemContent::module_factory` (55804 tasks)
    - This function is completely 'dominated' by `module_factory_with_code_generation_issue` so we don't need it, even in a PC environment we should expect this to be the case
* `Module::style_type` (63237 tasks, though we don't save all of them)
    * Only gets called once for each module so there were no cache hits.  However, it is useful for HMR and PC to ensure we don't recompute style groups. So move this to a new trait and call it conditionally which eliminates all overhead while preseving cacheability
*  `track_glob` (11432 tasks)
     * this is used to set up dependencies on files read by webpack loaders.  This was made conditional on whether or not any dependencies are being tracked. at all
* `apply_module_type` (152887 tasks) and `apply_reexport_treeshaking` (57527 tasks):
    - both of these are dominated by other tasks
* `EcmascriptAnalyzable::module_content` (40310 tasks)
    - This one is trivially dominated and really just plugs two other Vcs together, so i dropped `turbo_tasks::function`, as default trait method this actually required a new feature in the macro gencode.

So altogether this eliminates about 4.97% (444595/8939581)  tasks from a build of vercel-site. 

From measuring the builds I also see a progression

![image.png](https://app.graphite.dev/user-attachments/assets/f7d960e1-30d6-4430-8712-ae94723adaae.png)

Which is  (@P50) 1.7 seconds faster (-2.6%) and uses 290 MB less memory (-2%).  The micro benchmarks show bigger progressions, but that makes sense, they are more sensitive to overheads.
parent d054cac6
......@@ -438,8 +438,7 @@ pub fn project_new(
)?;
let turbopack_ctx = NextTurbopackContext::new(turbo_tasks.clone(), napi_callbacks);
let stats_path = std::env::var_os("NEXT_TURBOPACK_TASK_STATISTICS");
if let Some(stats_path) = stats_path {
if let Some(stats_path) = std::env::var_os("NEXT_TURBOPACK_TASK_STATISTICS") {
let task_stats = turbo_tasks.task_statistics().enable().clone();
exit.on_exit(async move {
tokio::task::spawn_blocking(move || {
......
......@@ -3077,6 +3077,10 @@ impl<B: BackingStorage> Backend for TurboTasksBackend<B> {
fn task_statistics(&self) -> &TaskStatisticsApi {
&self.0.task_statistics
}
fn is_tracking_dependencies(&self) -> bool {
self.0.options.dependency_tracking
}
}
enum DebugTraceTransientTask {
......
......@@ -324,6 +324,10 @@ impl TurboTasksApi for VcStorage {
fn send_compilation_event(&self, _event: Arc<dyn CompilationEvent>) {
unimplemented!()
}
fn is_tracking_dependencies(&self) -> bool {
false
}
}
impl VcStorage {
......
......@@ -726,4 +726,6 @@ pub trait Backend: Sync + Send {
fn dispose_root_task(&self, task: TaskId, turbo_tasks: &dyn TurboTasksBackendApi<Self>);
fn task_statistics(&self) -> &TaskStatisticsApi;
fn is_tracking_dependencies(&self) -> bool;
}
......@@ -202,6 +202,9 @@ pub trait TurboTasksApi: TurboTasksCallApi + Sync + Send {
event_types: Option<Vec<String>>,
) -> Receiver<Arc<dyn CompilationEvent>>;
fn send_compilation_event(&self, event: Arc<dyn CompilationEvent>);
// Returns true if TurboTasks is configured to track dependencies.
fn is_tracking_dependencies(&self) -> bool;
}
/// A wrapper around a value that is unused.
......@@ -1442,6 +1445,10 @@ impl<B: Backend + 'static> TurboTasksApi for TurboTasks<B> {
tracing::warn!("Failed to send compilation event: {e}");
}
}
fn is_tracking_dependencies(&self) -> bool {
self.backend.is_tracking_dependencies()
}
}
impl<B: Backend + 'static> TurboTasksBackendApi<B> for TurboTasks<B> {
......
......@@ -243,7 +243,7 @@ where
/// Returns `None` if the underlying value type does not implement `K`.
///
/// **Note:** if the trait `T` is required to implement `K`, use [`ResolvedVc::upcast`] instead.
/// This provides stronger guarantees, removing the need for a [`Result`] return type.
/// This provides stronger guarantees, removing the need for a [`Option`] return type.
///
/// See also: [`Vc::try_resolve_sidecast`].
pub fn try_sidecast<K>(this: Self) -> Option<ResolvedVc<K>>
......
use serde::{Deserialize, Serialize};
use turbo_tasks::{NonLocalValue, ResolvedVc, Vc, trace::TraceRawVcs};
use turbo_tasks::{ResolvedVc, TaskInput, Vc};
use crate::{asset::Asset, ident::AssetIdent, reference::ModuleReferences};
#[derive(Clone, Copy, Debug, Serialize, Deserialize, PartialEq, Eq, TraceRawVcs, NonLocalValue)]
#[derive(Clone, Copy, Debug, TaskInput, Hash)]
#[turbo_tasks::value(shared)]
pub enum StyleType {
IsolatedStyle,
GlobalStyle,
}
#[turbo_tasks::value(transparent)]
pub struct OptionStyleType(Option<StyleType>);
/// A module. This usually represents parsed source code, which has references
/// to other modules.
#[turbo_tasks::value_trait]
......@@ -33,12 +30,13 @@ pub trait Module: Asset {
fn is_self_async(self: Vc<Self>) -> Vc<bool> {
Vc::cell(false)
}
}
#[turbo_tasks::value_trait]
pub trait StyleModule: Module + Asset {
/// The style type of the module.
#[turbo_tasks::function]
fn style_type(self: Vc<Self>) -> Vc<OptionStyleType> {
Vc::cell(None)
}
fn style_type(&self) -> Vc<StyleType>;
}
#[turbo_tasks::value(transparent)]
......
......@@ -15,7 +15,7 @@ use crate::{
ChunkItem, ChunkItemBatchWithAsyncModuleInfo, ChunkItemWithAsyncModuleInfo, ChunkType,
ChunkableModule, ChunkingContext, chunk_item_batch::attach_async_info_to_chunkable_module,
},
module::{Module, StyleType},
module::{Module, StyleModule, StyleType},
module_graph::{
GraphTraversalAction, ModuleGraph, module_batch::ModuleOrBatch,
module_batches::ModuleBatchesGraphEdge,
......@@ -129,8 +129,10 @@ pub async fn compute_style_groups(
}
}
Entry::Vacant(e) => {
let style_type = *module.style_type().await?;
if let Some(style_type) = style_type {
if let Some(style_module) =
ResolvedVc::try_sidecast::<Box<dyn StyleModule>>(module)
{
let style_type = *style_module.style_type().await?;
let mut info =
ModuleInfo::new(style_type, module.ident().to_string().owned().await?);
info.chunk_group_indices.insert(idx, styles.len());
......
......@@ -8,7 +8,7 @@ use turbopack_core::{
context::AssetContext,
environment::Environment,
ident::AssetIdent,
module::{Module, OptionStyleType, StyleType},
module::{Module, StyleModule, StyleType},
module_graph::ModuleGraph,
output::OutputAssets,
reference::{ModuleReference, ModuleReferences},
......@@ -148,14 +148,16 @@ impl Module for CssModuleAsset {
ParseCssResult::NotFound => Ok(ModuleReferences::empty()),
}
}
}
#[turbo_tasks::value_impl]
impl StyleModule for CssModuleAsset {
#[turbo_tasks::function]
fn style_type(&self) -> Vc<OptionStyleType> {
let style_type = match self.ty {
CssModuleAssetType::Default => StyleType::GlobalStyle,
CssModuleAssetType::Module => StyleType::IsolatedStyle,
};
Vc::cell(Some(style_type))
fn style_type(&self) -> Vc<StyleType> {
match self.ty {
CssModuleAssetType::Default => StyleType::GlobalStyle.cell(),
CssModuleAssetType::Module => StyleType::IsolatedStyle.cell(),
}
}
}
......
......@@ -85,9 +85,10 @@ impl EcmascriptChunkItemContent {
}
.cell())
}
}
#[turbo_tasks::function]
pub async fn module_factory(&self) -> Result<Vc<Code>> {
impl EcmascriptChunkItemContent {
async fn module_factory(&self) -> Result<ResolvedVc<Code>> {
let mut code = CodeBuilder::default();
for additional_id in self.additional_ids.iter().try_join().await? {
writeln!(code, "{}, ", StringifyJs(&*additional_id))?;
......@@ -130,7 +131,7 @@ impl EcmascriptChunkItemContent {
code += "})";
Ok(code.build().cell())
Ok(code.build().resolved_cell())
}
}
......@@ -221,37 +222,37 @@ async fn module_factory_with_code_generation_issue(
chunk_item: Vc<Box<dyn EcmascriptChunkItem>>,
async_module_info: Option<Vc<AsyncModuleInfo>>,
) -> Result<Vc<Code>> {
Ok(
match chunk_item
.content_with_async_module_info(async_module_info)
.module_factory()
.resolve()
.await
{
Ok(factory) => factory,
Err(error) => {
let id = chunk_item.asset_ident().to_string().await;
let id = id.as_ref().map_or_else(|_| "unknown", |id| &**id);
let error = error.context(format!(
"An error occurred while generating the chunk item {id}"
));
let error_message = format!("{}", PrettyPrintError(&error)).into();
let js_error_message = serde_json::to_string(&error_message)?;
CodeGenerationIssue {
severity: IssueSeverity::Error,
path: chunk_item.asset_ident().path().owned().await?,
title: StyledString::Text(rcstr!("Code generation for chunk item errored"))
.resolved_cell(),
message: StyledString::Text(error_message).resolved_cell(),
}
.resolved_cell()
.emit();
let mut code = CodeBuilder::default();
code += "(() => {{\n\n";
writeln!(code, "throw new Error({error});", error = &js_error_message)?;
code += "\n}})";
code.build().cell()
let content = match chunk_item
.content_with_async_module_info(async_module_info)
.await
{
Ok(item) => item.module_factory().await,
Err(err) => Err(err),
};
Ok(match content {
Ok(factory) => *factory,
Err(error) => {
let id = chunk_item.asset_ident().to_string().await;
let id = id.as_ref().map_or_else(|_| "unknown", |id| &**id);
let error = error.context(format!(
"An error occurred while generating the chunk item {id}"
));
let error_message = format!("{}", PrettyPrintError(&error)).into();
let js_error_message = serde_json::to_string(&error_message)?;
CodeGenerationIssue {
severity: IssueSeverity::Error,
path: chunk_item.asset_ident().path().owned().await?,
title: StyledString::Text(rcstr!("Code generation for chunk item errored"))
.resolved_cell(),
message: StyledString::Text(error_message).resolved_cell(),
}
},
)
.resolved_cell()
.emit();
let mut code = CodeBuilder::default();
code += "(() => {{\n\n";
writeln!(code, "throw new Error({error});", error = &js_error_message)?;
code += "\n}})";
code.build().cell()
}
})
}
......@@ -432,8 +432,8 @@ impl ModuleTypeResult {
impl EcmascriptParsable for EcmascriptModuleAsset {
#[turbo_tasks::function]
async fn failsafe_parse(self: Vc<Self>) -> Result<Vc<ParseResult>> {
let real_result = self.parse();
let this = self.await?;
let real_result = this.parse();
if this.options.await?.keep_last_successful_parse {
let real_result_value = real_result.await?;
let result_value = if matches!(*real_result_value, ParseResult::Ok { .. }) {
......@@ -476,7 +476,7 @@ impl EcmascriptAnalyzable for EcmascriptModuleAsset {
) -> Result<Vc<EcmascriptModuleContent>> {
let this = self.await?;
let parsed = self.parse();
let parsed = this.parse();
Ok(EcmascriptModuleContent::new_without_analysis(
parsed,
......@@ -492,7 +492,7 @@ impl EcmascriptAnalyzable for EcmascriptModuleAsset {
chunking_context: ResolvedVc<Box<dyn ChunkingContext>>,
async_module_info: Option<ResolvedVc<AsyncModuleInfo>>,
) -> Result<Vc<EcmascriptModuleContentOptions>> {
let parsed = self.parse().to_resolved().await?;
let parsed = self.await?.parse().to_resolved().await?;
let analyze = self.analyze();
let analyze_ref = analyze.await?;
......@@ -622,14 +622,13 @@ impl EcmascriptModuleAsset {
pub fn options(&self) -> Vc<EcmascriptOptions> {
*self.options
}
}
#[turbo_tasks::function]
impl EcmascriptModuleAsset {
pub fn parse(&self) -> Vc<ParseResult> {
parse(*self.source, self.ty, *self.transforms)
}
}
impl EcmascriptModuleAsset {
#[tracing::instrument(level = "trace", skip_all)]
pub(crate) async fn determine_module_type(self: Vc<Self>) -> Result<ReadRef<ModuleTypeResult>> {
let this = self.await?;
......
......@@ -195,7 +195,7 @@ impl SourceMapGenConfig for InlineSourcesContentConfig {
pub async fn parse(
source: ResolvedVc<Box<dyn Source>>,
ty: EcmascriptModuleAssetType,
transforms: Vc<EcmascriptInputTransforms>,
transforms: ResolvedVc<EcmascriptInputTransforms>,
) -> Result<Vc<ParseResult>> {
let name = source.ident().to_string().await?.to_string();
let span = tracing::info_span!("parse ecmascript", name = name, ty = display(&ty));
......@@ -215,11 +215,10 @@ pub async fn parse(
async fn parse_internal(
source: ResolvedVc<Box<dyn Source>>,
ty: EcmascriptModuleAssetType,
transforms: Vc<EcmascriptInputTransforms>,
transforms: ResolvedVc<EcmascriptInputTransforms>,
) -> Result<Vc<ParseResult>> {
let content = source.content();
let fs_path_vc = source.ident().path().owned().await?;
let fs_path = fs_path_vc.clone();
let fs_path = source.ident().path().owned().await?;
let ident = &*source.ident().to_string().await?;
let file_path_hash = hash_xxh3_hash64(&*source.ident().to_string().await?) as u128;
let content = match content.await {
......@@ -248,7 +247,6 @@ async fn parse_internal(
let transforms = &*transforms.await?;
match parse_file_content(
string,
fs_path_vc.clone(),
&fs_path,
ident,
source.ident().await?.query.clone(),
......@@ -297,7 +295,6 @@ async fn parse_internal(
async fn parse_file_content(
string: BytesStr,
fs_path_vc: FileSystemPath,
fs_path: &FileSystemPath,
ident: &str,
query: RcStr,
......@@ -458,7 +455,7 @@ async fn parse_file_content(
file_name_str: fs_path.file_name(),
file_name_hash: file_path_hash,
query_str: query,
file_path: fs_path_vc.clone(),
file_path: fs_path.clone(),
source
};
let span = tracing::trace_span!("transforms");
......
......@@ -143,7 +143,6 @@ use crate::{
code_gen::{CodeGen, CodeGens, IntoCodeGenReference},
export::Liveness,
magic_identifier,
parse::parse,
references::{
async_module::{AsyncModule, OptionAsyncModule},
cjs::{CjsRequireAssetReference, CjsRequireCacheAccess, CjsRequireResolveAssetReference},
......@@ -163,7 +162,7 @@ use crate::{
TURBOPACK_EXPORT_NAMESPACE, TURBOPACK_EXPORT_VALUE, TURBOPACK_EXPORTS, TURBOPACK_GLOBAL,
TURBOPACK_REQUIRE_REAL, TURBOPACK_REQUIRE_STUB, TURBOPACK_RUNTIME_FUNCTION_SHORTCUTS,
},
tree_shake::{find_turbopack_part_id_in_asserts, part_of_module, split},
tree_shake::{find_turbopack_part_id_in_asserts, part_of_module, split_module},
utils::{AstPathRange, module_value_to_well_known_object},
};
......@@ -530,9 +529,8 @@ pub async fn analyse_ecmascript_module_internal(
};
let parsed = if let Some(part) = part {
let parsed = parse(*source, ty, *transforms);
let split_data = split(source.ident(), *source, parsed);
part_of_module(split_data, part.clone())
let split_data = split_module(*module);
part_of_module(split_data, part)
} else {
module.failsafe_parse()
};
......
......@@ -100,7 +100,7 @@ impl EcmascriptAnalyzable for EcmascriptModuleLocalsModule {
) -> Result<Vc<EcmascriptModuleContentOptions>> {
let exports = self.get_exports().to_resolved().await?;
let original_module = self.await?.module;
let parsed = original_module.parse().to_resolved().await?;
let parsed = original_module.await?.parse().to_resolved().await?;
let analyze = original_module.analyze();
let analyze_result = analyze.await?;
......
......@@ -14,7 +14,7 @@ use turbopack_core::{
};
use super::{
SplitResult, chunk_item::EcmascriptModulePartChunkItem, get_part_id, part_of_module, split,
SplitResult, chunk_item::EcmascriptModulePartChunkItem, get_part_id, part_of_module,
split_module,
};
use crate::{
......@@ -43,8 +43,7 @@ pub struct EcmascriptModulePartAsset {
impl EcmascriptParsable for EcmascriptModulePartAsset {
#[turbo_tasks::function]
fn failsafe_parse(&self) -> Result<Vc<ParseResult>> {
let parsed = self.full_module.failsafe_parse();
let split_data = split(self.full_module.ident(), self.full_module.source(), parsed);
let split_data = split_module(*self.full_module);
Ok(part_of_module(split_data, self.part.clone()))
}
#[turbo_tasks::function]
......
......@@ -20,7 +20,9 @@ use self::graph::{DepGraph, ItemData, ItemId, ItemIdGroupKind, Mode, SplitModule
pub(crate) use self::graph::{
PartId, create_turbopack_part_id_assert, find_turbopack_part_id_in_asserts,
};
use crate::{EcmascriptModuleAsset, analyzer::graph::EvalContext, parse::ParseResult};
use crate::{
EcmascriptModuleAsset, EcmascriptParsable, analyzer::graph::EvalContext, parse::ParseResult,
};
pub mod asset;
pub mod chunk_item;
......@@ -469,16 +471,9 @@ impl PartialEq for SplitResult {
}
#[turbo_tasks::function]
pub(super) fn split_module(asset: Vc<EcmascriptModuleAsset>) -> Result<Vc<SplitResult>> {
Ok(split(asset.source().ident(), asset.source(), asset.parse()))
}
#[turbo_tasks::function]
pub(super) async fn split(
ident: ResolvedVc<AssetIdent>,
source: ResolvedVc<Box<dyn Source>>,
parsed: ResolvedVc<ParseResult>,
) -> Result<Vc<SplitResult>> {
pub(super) async fn split_module(asset: Vc<EcmascriptModuleAsset>) -> Result<Vc<SplitResult>> {
let parsed: ResolvedVc<ParseResult> = asset.failsafe_parse().to_resolved().await?;
let ident = asset.source().ident().to_resolved().await?;
// Do not split already split module
if !ident.await?.parts.is_empty() {
return Ok(SplitResult::Failed {
......@@ -498,6 +493,7 @@ pub(super) async fn split(
}
let parse_result = parsed.await?;
let source = asset.source().to_resolved().await?;
match &*parse_result {
ParseResult::Ok {
......
......@@ -497,44 +497,48 @@ impl EvaluateContext for WebpackLoaderContext {
directories,
build_file_paths,
} => {
// Track dependencies of the loader task
// TODO: Because these are reported _after_ the loader actually read the dependency
// there is a race condition where we may miss updates that race
// with the loader execution.
// Track all the subscriptions in parallel, since certain loaders like tailwind
// might add thousands of subscriptions.
let env_subscriptions = env_variables
.iter()
.map(|e| self.env.read(e.clone()))
.try_join();
let file_subscriptions = file_paths
.iter()
.map(|p| async move { self.cwd.join(p)?.read().await })
.try_join();
let directory_subscriptions = directories
.iter()
.map(|(dir, glob)| async move {
self.cwd
.join(dir)?
.track_glob(Glob::new(glob.clone(), GlobOptions::default()), false)
.await
})
.try_join();
try_join!(
env_subscriptions,
file_subscriptions,
directory_subscriptions
)?;
for build_path in build_file_paths {
let build_path = self.cwd.join(&build_path)?;
BuildDependencyIssue {
source: IssueSource::from_source_only(self.context_source_for_issue),
path: build_path,
// We only process these dependencies to help with tracking, so if it is disabled
// dont bother.
if turbo_tasks::turbo_tasks().is_tracking_dependencies() {
// Track dependencies of the loader task
// TODO: Because these are reported _after_ the loader actually read the
// dependency there is a race condition where we may miss
// updates that race with the loader execution.
// Track all the subscriptions in parallel, since certain loaders like tailwind
// might add thousands of subscriptions.
let env_subscriptions = env_variables
.iter()
.map(|e| self.env.read(e.clone()))
.try_join();
let file_subscriptions = file_paths
.iter()
.map(|p| async move { self.cwd.join(p)?.read().await })
.try_join();
let directory_subscriptions = directories
.iter()
.map(|(dir, glob)| async move {
self.cwd
.join(dir)?
.track_glob(Glob::new(glob.clone(), GlobOptions::default()), false)
.await
})
.try_join();
try_join!(
env_subscriptions,
file_subscriptions,
directory_subscriptions
)?;
for build_path in build_file_paths {
let build_path = self.cwd.join(&build_path)?;
BuildDependencyIssue {
source: IssueSource::from_source_only(self.context_source_for_issue),
path: build_path,
}
.resolved_cell()
.emit();
}
.resolved_cell()
.emit();
}
}
InfoMessage::EmittedError { error, severity } => {
......
......@@ -7,7 +7,6 @@ error - [code gen] /turbopack/crates/turbopack-tests/tests/snapshot/imports/json
Debug info:
- An error occurred while generating the chunk item [project]/turbopack/crates/turbopack-tests/tests/snapshot/imports/json/input/invalid.json (json)
- Execution of *EcmascriptChunkItemContent::module_factory failed
- Execution of <JsonChunkItem as EcmascriptChunkItem>::content failed
- Unable to make a module from invalid JSON: expected `,` or `}` at line 3 column 26
at nested.?
......
......@@ -71,14 +71,13 @@ use turbopack_wasm::{module_asset::WebAssemblyModuleAsset, source::WebAssemblySo
use self::transition::{Transition, TransitionOptions};
use crate::module_options::{CssOptionsContext, CustomModuleType, EcmascriptOptionsContext};
#[turbo_tasks::function]
async fn apply_module_type(
source: ResolvedVc<Box<dyn Source>>,
module_asset_context: Vc<ModuleAssetContext>,
module_type: Vc<ModuleType>,
part: Option<ModulePart>,
inner_assets: Option<ResolvedVc<InnerAssets>>,
css_import_context: Option<Vc<ImportContext>>,
css_import_context: Option<ResolvedVc<ImportContext>>,
runtime_code: bool,
) -> Result<Vc<ProcessResult>> {
let module_type = &*module_type.await?;
......@@ -206,12 +205,14 @@ async fn apply_module_type(
part,
side_effect_free_packages,
)
.await?
} else {
apply_reexport_tree_shaking(
Vc::upcast(*module),
part,
side_effect_free_packages,
)
.await?
}
}
_ => bail!(
......@@ -251,7 +252,7 @@ async fn apply_module_type(
*source,
Vc::upcast(module_asset_context),
*ty,
css_import_context,
css_import_context.map(|c| *c),
environment.as_deref().copied(),
)
.to_resolved()
......@@ -281,7 +282,6 @@ async fn apply_module_type(
.cell())
}
#[turbo_tasks::function]
async fn apply_reexport_tree_shaking(
module: Vc<Box<dyn EcmascriptChunkPlaceable>>,
part: ModulePart,
......@@ -656,19 +656,20 @@ async fn process_default_internal(
return Ok(ProcessResult::Unknown(current_source).cell());
};
Ok(apply_module_type(
*current_source,
apply_module_type(
current_source,
module_asset_context,
module_type.cell(),
part,
inner_assets.map(|v| *v),
inner_assets,
if let ReferenceType::Css(CssReferenceSubType::AtImport(import)) = reference_type {
import.map(|v| *v)
import
} else {
None
},
matches!(reference_type, ReferenceType::Runtime),
))
)
.await
}
#[turbo_tasks::function]
......
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