Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
N
next.js
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Alex
next.js
Commits
bf865e24
Commit
bf865e24
authored
Nov 10, 2025
by
Tobias Koppers
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Turbopack: remove referenced_assets field
parent
b3b97bc4
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
169 additions
and
185 deletions
+169
-185
app.rs
crates/next-api/src/app.rs
+2
-3
instrumentation.rs
crates/next-api/src/instrumentation.rs
+2
-2
middleware.rs
crates/next-api/src/middleware.rs
+2
-2
pages.rs
crates/next-api/src/pages.rs
+9
-7
app_client_references_chunks.rs
...es/next-core/src/next_app/app_client_references_chunks.rs
+0
-1
client_reference_manifest.rs
...next-core/src/next_manifests/client_reference_manifest.rs
+33
-22
chunking_context.rs
turbopack/crates/turbopack-browser/src/chunking_context.rs
+12
-6
chunk.rs
turbopack/crates/turbopack-browser/src/ecmascript/chunk.rs
+0
-1
mod.rs
turbopack/crates/turbopack-cli/src/build/mod.rs
+2
-3
chunk_group.rs
turbopack/crates/turbopack-core/src/chunk/chunk_group.rs
+1
-3
chunking_context.rs
...opack/crates/turbopack-core/src/chunk/chunking_context.rs
+14
-41
output.rs
turbopack/crates/turbopack-core/src/output.rs
+58
-32
mod.rs
turbopack/crates/turbopack-css/src/chunk/mod.rs
+3
-14
html.rs
turbopack/crates/turbopack-dev-server/src/html.rs
+1
-5
asset_graph.rs
...ack/crates/turbopack-dev-server/src/source/asset_graph.rs
+1
-5
chunk_item.rs
...crates/turbopack-ecmascript/src/async_chunk/chunk_item.rs
+0
-1
batch.rs
turbopack/crates/turbopack-ecmascript/src/chunk/batch.rs
+0
-3
mod.rs
turbopack/crates/turbopack-ecmascript/src/chunk/mod.rs
+3
-13
chunk_asset.rs
...k/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs
+0
-1
evaluate.rs
turbopack/crates/turbopack-node/src/evaluate.rs
+2
-2
lib.rs
turbopack/crates/turbopack-node/src/lib.rs
+5
-2
chunking_context.rs
turbopack/crates/turbopack-nodejs/src/chunking_context.rs
+14
-8
chunk.rs
...pack/crates/turbopack-nodejs/src/ecmascript/node/chunk.rs
+0
-1
chunk.rs
...rates/turbopack-nodejs/src/ecmascript/node/entry/chunk.rs
+0
-4
snapshot.rs
turbopack/crates/turbopack-tests/tests/snapshot.rs
+5
-3
No files found.
crates/next-api/src/app.rs
View file @
bf865e24
...
...
@@ -1816,7 +1816,7 @@ impl AppEndpoint {
.await
?
;
}
let
current_reference
d_assets
=
current_chunk_group
.referenced_asset
s
();
let
current_reference
s
=
current_chunk_group
.reference
s
();
let
chunk_group
=
current_chunk_group
.await
?
;
let
current_availability_info
=
chunk_group
.availability_info
;
let
current_chunks
=
chunk_group
.assets
;
...
...
@@ -1833,13 +1833,12 @@ impl AppEndpoint {
evaluatable_assets
,
module_graph
,
*
current_chunks
,
current_reference
d_asset
s
,
current_references
,
current_availability_info
,
)
.to_resolved
()
.await
?
,
]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
}
.cell
(),
...
...
crates/next-api/src/instrumentation.rs
View file @
bf865e24
...
...
@@ -19,7 +19,7 @@ use turbopack_core::{
GraphEntries
,
chunk_group_info
::{
ChunkGroup
,
ChunkGroupEntry
},
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsWithReferenced
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssets
References
,
OutputAssets
WithReferenced
},
reference_type
::{
EntryReferenceSubType
,
ReferenceType
},
source
::
Source
,
virtual_output
::
VirtualOutputAsset
,
...
...
@@ -133,7 +133,7 @@ impl InstrumentationEndpoint {
Vc
::
cell
(
vec!
[
module
]),
module_graph
,
OutputAssets
::
empty
(),
OutputAssets
::
empty
(),
OutputAssets
References
::
empty
(),
AvailabilityInfo
::
root
(),
)
.await
?
;
...
...
crates/next-api/src/middleware.rs
View file @
bf865e24
...
...
@@ -24,7 +24,7 @@ use turbopack_core::{
GraphEntries
,
chunk_group_info
::{
ChunkGroup
,
ChunkGroupEntry
},
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsWithReferenced
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssets
References
,
OutputAssets
WithReferenced
},
reference_type
::{
EntryReferenceSubType
,
ReferenceType
},
source
::
Source
,
virtual_output
::
VirtualOutputAsset
,
...
...
@@ -146,7 +146,7 @@ impl MiddlewareEndpoint {
Vc
::
cell
(
vec!
[
module
]),
module_graph
,
OutputAssets
::
empty
(),
OutputAssets
::
empty
(),
OutputAssets
References
::
empty
(),
AvailabilityInfo
::
root
(),
)
.await
?
;
...
...
crates/next-api/src/pages.rs
View file @
bf865e24
...
...
@@ -56,7 +56,7 @@ use turbopack_core::{
GraphEntries
,
ModuleGraph
,
SingleModuleGraph
,
VisitedModules
,
chunk_group_info
::{
ChunkGroup
,
ChunkGroupEntry
},
},
output
::{
OptionOutputAsset
,
OutputAsset
,
OutputAssets
},
output
::{
OptionOutputAsset
,
OutputAsset
,
OutputAssets
,
OutputAssetsReferences
},
reference
::
all_assets_from_entries
,
reference_type
::{
EcmaScriptModulesReferenceSubType
,
EntryReferenceSubType
,
ReferenceType
},
resolve
::{
origin
::
PlainResolveOrigin
,
parse
::
Request
,
pattern
::
Pattern
},
...
...
@@ -1048,7 +1048,7 @@ impl PageEndpoint {
Ok
(
SsrChunk
::
Edge
{
assets
:
chunk_assets
.primary_assets
()
.to_resolved
()
.await
?
,
reference
d_assets
:
chunk_assets
.referenced_asset
s
()
.to_resolved
()
.await
?
,
reference
s
:
chunk_assets
.reference
s
()
.to_resolved
()
.await
?
,
dynamic_import_entries
,
regions
:
regions
.clone
(),
}
...
...
@@ -1066,7 +1066,7 @@ impl PageEndpoint {
EvaluatableAssets
::
empty
()
.with_entry
(
*
ssr_module_evaluatable
),
ssr_module_graph
,
current_chunk_group
.primary_assets
(),
current_chunk_group
.reference
d_asset
s
(),
current_chunk_group
.references
(),
current_chunk_group
.await
?
.availability_info
,
)
.to_resolved
()
...
...
@@ -1409,7 +1409,7 @@ impl PageEndpoint {
}
SsrChunk
::
Edge
{
assets
,
reference
d_asset
s
,
references
,
dynamic_import_entries
,
ref
regions
,
}
=>
{
...
...
@@ -1429,10 +1429,12 @@ impl PageEndpoint {
fxindexset!
[]
};
let
all_assets
=
assets
.concatenate
(
*
referenced_assets
);
let
referenced_assets
=
references
.all_assets
();
let
all_assets
=
assets
.concatenate
(
referenced_assets
);
let
assets_ref
=
assets
.await
?
;
server_assets
.extend
(
referenced_assets
.await
?
.iter
()
.copied
());
server_assets
.extend
(
referenced_assets
.await
?
.i
nto_i
ter
()
.copied
());
// TODO(sokra): accessing the 1st asset is a bit hacky, we should find a better
// way to get the main entry asset
...
...
@@ -1772,7 +1774,7 @@ pub enum SsrChunk {
},
Edge
{
assets
:
ResolvedVc
<
OutputAssets
>
,
reference
d_assets
:
ResolvedVc
<
OutputAsset
s
>
,
reference
s
:
ResolvedVc
<
OutputAssetsReference
s
>
,
dynamic_import_entries
:
ResolvedVc
<
DynamicImportedChunks
>
,
regions
:
Option
<
Vec
<
RcStr
>>
,
},
...
...
crates/next-core/src/next_app/app_client_references_chunks.rs
View file @
bf865e24
...
...
@@ -160,7 +160,6 @@ pub async fn get_app_client_references_chunks(
let
mut
current_client_chunk_group
=
ChunkGroupResult
{
assets
:
ResolvedVc
::
cell
(
vec!
[]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
availability_info
:
client_availability_info
,
}
...
...
crates/next-core/src/next_manifests/client_reference_manifest.rs
View file @
bf865e24
...
...
@@ -14,7 +14,9 @@ use turbopack_core::{
asset
::{
Asset
,
AssetContent
},
chunk
::{
ChunkingContext
,
ModuleChunkItemIdExt
,
ModuleId
as
TurbopackModuleId
},
module_graph
::
async_module_info
::
AsyncModulesInfo
,
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsReference
,
OutputAssetsWithReferenced
},
output
::{
OutputAsset
,
OutputAssetsReference
,
OutputAssetsReferences
,
OutputAssetsWithReferenced
,
},
};
use
turbopack_ecmascript
::
utils
::
StringifyJs
;
...
...
@@ -109,9 +111,13 @@ pub struct ClientReferenceManifest {
impl
OutputAssetsReference
for
ClientReferenceManifest
{
#[turbo_tasks
::
function]
async
fn
references
(
self
:
Vc
<
Self
>
)
->
Result
<
Vc
<
OutputAssetsWithReferenced
>>
{
Ok
(
OutputAssetsWithReferenced
::
from_assets
(
*
build_manifest
(
self
)
.await
?
.references
,
))
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[
ResolvedVc
::
upcast
(
build_manifest
(
self
)
.await
?
.references
,
)]),
}
.cell
())
}
}
...
...
@@ -140,7 +146,7 @@ impl Asset for ClientReferenceManifest {
#[turbo_tasks
::
value(shared)]
struct
ClientReferenceManifestResult
{
content
:
ResolvedVc
<
AssetContent
>
,
references
:
ResolvedVc
<
OutputAssets
>
,
references
:
ResolvedVc
<
OutputAssets
References
>
,
}
#[turbo_tasks
::
function]
...
...
@@ -166,7 +172,7 @@ async fn build_manifest(
);
async
move
{
let
mut
entry_manifest
:
SerializedClientReferenceManifest
=
Default
::
default
();
let
mut
references
=
FxIndexSet
::
default
();
let
mut
references
=
Vec
::
new
();
let
chunk_suffix_path
=
next_config
.chunk_suffix_path
()
.owned
()
.await
?
;
let
prefix_path
=
next_config
.computed_asset_prefix
()
.owned
()
.await
?
;
let
suffix_path
=
chunk_suffix_path
.unwrap_or_default
();
...
...
@@ -259,14 +265,17 @@ async fn build_manifest(
let
(
client_chunks_paths
,
client_is_async
)
=
if
let
Some
(
client_assets
)
=
client_component_client_chunks
.get
(
&
app_client_reference_ty
)
{
let
client_chunks
=
client_assets
.primary_assets
()
.await
?
;
let
client_referenced_assets
=
client_assets
.referenced_assets
()
.await
?
;
references
.extend
(
client_chunks
.iter
());
references
.extend
(
client_referenced_assets
.iter
());
let
client_chunks_paths
=
cached_chunk_paths
(
&
mut
client_chunk_path_cache
,
client_chunks
.iter
()
.copied
())
.await
?
;
let
client_chunks
=
client_assets
.primary_assets
()
.to_resolved
()
.await
?
;
references
.push
(
ResolvedVc
::
upcast
(
client_chunks
));
references
.push
(
ResolvedVc
::
upcast
(
client_assets
.references
()
.to_resolved
()
.await
?
,
));
let
client_chunks_paths
=
cached_chunk_paths
(
&
mut
client_chunk_path_cache
,
client_chunks
.await
?
.into_iter
()
.copied
(),
)
.await
?
;
let
chunk_paths
=
client_chunks_paths
.filter_map
(|(
_
,
chunk_path
)|
{
...
...
@@ -312,14 +321,16 @@ async fn build_manifest(
}
else
if
let
Some
(
ssr_assets
)
=
client_component_ssr_chunks
.get
(
&
app_client_reference_ty
)
{
let
ssr_chunks
=
ssr_assets
.primary_assets
()
.await
?
;
let
ssr_referenced_assets
=
ssr_assets
.referenced_assets
()
.await
?
;
references
.extend
(
ssr_chunks
.iter
());
references
.extend
(
ssr_referenced_assets
.iter
());
let
ssr_chunks_paths
=
cached_chunk_paths
(
&
mut
ssr_chunk_path_cache
,
ssr_chunks
.iter
()
.copied
())
.await
?
;
let
ssr_chunks
=
ssr_assets
.primary_assets
()
.to_resolved
()
.await
?
;
let
ssr_referenced_assets
=
ssr_assets
.references
()
.to_resolved
()
.await
?
;
references
.push
(
ResolvedVc
::
upcast
(
ssr_chunks
));
references
.push
(
ResolvedVc
::
upcast
(
ssr_referenced_assets
));
let
ssr_chunks_paths
=
cached_chunk_paths
(
&
mut
ssr_chunk_path_cache
,
ssr_chunks
.await
?
.into_iter
()
.copied
(),
)
.await
?
;
let
chunk_paths
=
ssr_chunks_paths
.filter_map
(|(
_
,
chunk_path
)|
{
node_root_ref
...
...
turbopack/crates/turbopack-browser/src/chunking_context.rs
View file @
bf865e24
...
...
@@ -26,7 +26,7 @@ use turbopack_core::{
chunk_group_info
::
ChunkGroup
,
export_usage
::{
ExportUsageInfo
,
ModuleExportUsage
},
},
output
::{
OutputAsset
,
OutputAssets
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsReferences
},
};
use
turbopack_ecmascript
::{
async_chunk
::
module
::
AsyncLoaderModule
,
...
...
@@ -675,7 +675,7 @@ impl ChunkingContext for BrowserChunkingContext {
let
MakeChunkGroupResult
{
chunks
,
referenced_output_assets
,
references
,
mut
references
,
availability_info
,
}
=
make_chunk_group
(
entries
,
...
...
@@ -691,6 +691,10 @@ impl ChunkingContext for BrowserChunkingContext {
.try_join
()
.await
?
;
let
referenced_output_assets
:
ResolvedVc
<
OutputAssets
>
=
ResolvedVc
::
cell
(
referenced_output_assets
);
references
.push
(
ResolvedVc
::
upcast
(
referenced_output_assets
));
if
this
.enable_hot_module_replacement
{
let
mut
ident
=
ident
;
if
let
Some
(
input_availability_info_ident
)
=
input_availability_info
.ident
()
.await
?
...
...
@@ -712,7 +716,6 @@ impl ChunkingContext for BrowserChunkingContext {
Ok
(
ChunkGroupResult
{
assets
:
ResolvedVc
::
cell
(
assets
),
referenced_assets
:
ResolvedVc
::
cell
(
referenced_output_assets
),
references
:
ResolvedVc
::
cell
(
references
),
availability_info
,
}
...
...
@@ -741,7 +744,7 @@ impl ChunkingContext for BrowserChunkingContext {
let
MakeChunkGroupResult
{
chunks
,
referenced_output_assets
,
references
,
mut
references
,
availability_info
,
}
=
make_chunk_group
(
entries
,
...
...
@@ -757,6 +760,10 @@ impl ChunkingContext for BrowserChunkingContext {
.try_join
()
.await
?
;
let
referenced_output_assets
:
ResolvedVc
<
OutputAssets
>
=
ResolvedVc
::
cell
(
referenced_output_assets
);
references
.push
(
ResolvedVc
::
upcast
(
referenced_output_assets
));
let
other_assets
=
Vc
::
cell
(
assets
.clone
());
let
entries
=
Vc
::
cell
(
...
...
@@ -795,7 +802,6 @@ impl ChunkingContext for BrowserChunkingContext {
Ok
(
ChunkGroupResult
{
assets
:
ResolvedVc
::
cell
(
assets
),
referenced_assets
:
ResolvedVc
::
cell
(
referenced_output_assets
),
references
:
ResolvedVc
::
cell
(
references
),
availability_info
,
}
...
...
@@ -812,7 +818,7 @@ impl ChunkingContext for BrowserChunkingContext {
_evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
_module_graph
:
Vc
<
ModuleGraph
>
,
_extra_chunks
:
Vc
<
OutputAssets
>
,
_extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
_extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
_availability_info
:
AvailabilityInfo
,
)
->
Result
<
Vc
<
EntryChunkGroupResult
>>
{
bail!
(
"Browser chunking context does not support entry chunk groups"
)
...
...
turbopack/crates/turbopack-browser/src/ecmascript/chunk.rs
View file @
bf865e24
...
...
@@ -117,7 +117,6 @@ impl OutputAssetsReference for EcmascriptBrowserChunk {
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
assets
),
referenced_assets
:
chunk_references
.referenced_assets
,
references
:
chunk_references
.references
,
}
.cell
())
...
...
turbopack/crates/turbopack-cli/src/build/mod.rs
View file @
bf865e24
...
...
@@ -36,7 +36,7 @@ use turbopack_core::{
chunk_group_info
::{
ChunkGroup
,
ChunkGroupEntry
},
export_usage
::
compute_export_usage_info
,
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsWithReferenced
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssets
References
,
OutputAssets
WithReferenced
},
reference_type
::{
EntryReferenceSubType
,
ReferenceType
},
resolve
::{
origin
::{
PlainResolveOrigin
,
ResolveOriginExt
},
...
...
@@ -464,13 +464,12 @@ async fn build_internal(
EvaluatableAssets
::
one
(
*
ecmascript
),
module_graph
,
OutputAssets
::
empty
(),
OutputAssets
::
empty
(),
OutputAssets
References
::
empty
(),
AvailabilityInfo
::
root
(),
)
.await
?
.asset
,
]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
}
.cell
(),
...
...
turbopack/crates/turbopack-core/src/chunk/chunk_group.rs
View file @
bf865e24
...
...
@@ -26,8 +26,7 @@ use crate::{
module_batches
::{
BatchingConfig
,
ModuleBatchesGraphEdge
},
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsReference
,
OutputAssetsReferences
,
OutputAssetsWithReferenced
,
OutputAsset
,
OutputAssetsReference
,
OutputAssetsReferences
,
OutputAssetsWithReferenced
,
},
reference
::
ModuleReference
,
traced_asset
::
TracedAsset
,
...
...
@@ -185,7 +184,6 @@ pub async fn references_to_output_assets(
.collect
::
<
Vec
<
_
>>
();
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
output_assets
),
referenced_assets
:
OutputAssets
::
empty_resolved
(),
references
:
OutputAssetsReferences
::
empty_resolved
(),
}
.cell
())
...
...
turbopack/crates/turbopack-core/src/chunk/chunking_context.rs
View file @
bf865e24
...
...
@@ -93,7 +93,6 @@ pub enum ChunkGroupType {
#[derive(Clone)]
pub
struct
ChunkGroupResult
{
pub
assets
:
ResolvedVc
<
OutputAssets
>
,
pub
referenced_assets
:
ResolvedVc
<
OutputAssets
>
,
pub
references
:
ResolvedVc
<
OutputAssetsReferences
>
,
pub
availability_info
:
AvailabilityInfo
,
}
...
...
@@ -102,7 +101,6 @@ impl ChunkGroupResult {
pub
fn
empty
()
->
Vc
<
Self
>
{
ChunkGroupResult
{
assets
:
ResolvedVc
::
cell
(
vec!
[]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
availability_info
:
AvailabilityInfo
::
root
(),
}
...
...
@@ -112,7 +110,6 @@ impl ChunkGroupResult {
pub
fn
empty_resolved
()
->
ResolvedVc
<
Self
>
{
ChunkGroupResult
{
assets
:
ResolvedVc
::
cell
(
vec!
[]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
availability_info
:
AvailabilityInfo
::
root
(),
}
...
...
@@ -126,7 +123,6 @@ impl ChunkGroupResult {
pub
async
fn
output_assets_with_referenced
(
&
self
)
->
Result
<
Vc
<
OutputAssetsWithReferenced
>>
{
Ok
(
OutputAssetsWithReferenced
{
assets
:
self
.assets
,
referenced_assets
:
self
.referenced_assets
,
references
:
self
.references
,
}
.cell
())
...
...
@@ -137,11 +133,6 @@ impl ChunkGroupResult {
let
next
=
next
.await
?
;
Ok
(
ChunkGroupResult
{
assets
:
self
.assets
.concatenate
(
*
next
.assets
)
.to_resolved
()
.await
?
,
referenced_assets
:
self
.referenced_assets
.concatenate
(
*
next
.referenced_assets
)
.to_resolved
()
.await
?
,
references
:
self
.references
.concatenate
(
*
next
.references
)
...
...
@@ -159,7 +150,6 @@ impl ChunkGroupResult {
self
.assets
.await
?
.into_iter
()
.chain
(
self
.referenced_assets.await
?
.into_iter
())
.copied
()
.map
(
ExpandOutputAssetsInput
::
Asset
)
.chain
(
...
...
@@ -183,25 +173,8 @@ impl ChunkGroupResult {
}
#[turbo_tasks
::
function]
pub
async
fn
referenced_assets
(
&
self
)
->
Result
<
Vc
<
OutputAssets
>>
{
Ok
(
Vc
::
cell
(
expand_output_assets
(
self
.referenced_assets
.await
?
.into_iter
()
.copied
()
.map
(
ExpandOutputAssetsInput
::
Asset
)
.chain
(
self
.references
.await
?
.into_iter
()
.copied
()
.map
(
ExpandOutputAssetsInput
::
Reference
),
),
false
,
)
.await
?
,
))
pub
fn
references
(
&
self
)
->
Vc
<
OutputAssetsReferences
>
{
*
self
.references
}
}
...
...
@@ -412,7 +385,7 @@ pub trait ChunkingContext {
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
availability_info
:
AvailabilityInfo
,
)
->
Result
<
Vc
<
EntryChunkGroupResult
>>
;
...
...
@@ -477,7 +450,7 @@ pub trait ChunkingContextExt {
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
availability_info
:
AvailabilityInfo
,
)
->
Vc
<
Box
<
dyn
OutputAsset
>>
where
...
...
@@ -489,7 +462,7 @@ pub trait ChunkingContextExt {
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
)
->
Vc
<
EntryChunkGroupResult
>
where
Self
:
Send
;
...
...
@@ -500,7 +473,7 @@ pub trait ChunkingContextExt {
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
)
->
Vc
<
Box
<
dyn
OutputAsset
>>
where
Self
:
Send
;
...
...
@@ -569,7 +542,7 @@ impl<T: ChunkingContext + Send + Upcast<Box<dyn ChunkingContext>>> ChunkingConte
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
availability_info
:
AvailabilityInfo
,
)
->
Vc
<
Box
<
dyn
OutputAsset
>>
{
entry_chunk_group_asset
(
...
...
@@ -578,7 +551,7 @@ impl<T: ChunkingContext + Send + Upcast<Box<dyn ChunkingContext>>> ChunkingConte
evaluatable_assets
,
module_graph
,
extra_chunks
,
extra_reference
d_asset
s
,
extra_references
,
availability_info
,
)
}
...
...
@@ -589,14 +562,14 @@ impl<T: ChunkingContext + Send + Upcast<Box<dyn ChunkingContext>>> ChunkingConte
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
)
->
Vc
<
EntryChunkGroupResult
>
{
self
.entry_chunk_group
(
path
,
evaluatable_assets
,
module_graph
,
extra_chunks
,
extra_reference
d_asset
s
,
extra_references
,
AvailabilityInfo
::
root
(),
)
}
...
...
@@ -607,7 +580,7 @@ impl<T: ChunkingContext + Send + Upcast<Box<dyn ChunkingContext>>> ChunkingConte
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
)
->
Vc
<
Box
<
dyn
OutputAsset
>>
{
entry_chunk_group_asset
(
Vc
::
upcast_non_strict
(
self
),
...
...
@@ -615,7 +588,7 @@ impl<T: ChunkingContext + Send + Upcast<Box<dyn ChunkingContext>>> ChunkingConte
evaluatable_assets
,
module_graph
,
extra_chunks
,
extra_reference
d_asset
s
,
extra_references
,
AvailabilityInfo
::
root
(),
)
}
...
...
@@ -715,7 +688,7 @@ async fn entry_chunk_group_asset(
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
Vc
<
OutputAssetsReference
s
>
,
availability_info
:
AvailabilityInfo
,
)
->
Result
<
Vc
<
Box
<
dyn
OutputAsset
>>>
{
Ok
(
*
chunking_context
...
...
@@ -724,7 +697,7 @@ async fn entry_chunk_group_asset(
evaluatable_assets
,
module_graph
,
extra_chunks
,
extra_reference
d_asset
s
,
extra_references
,
availability_info
,
)
.await
?
...
...
turbopack/crates/turbopack-core/src/output.rs
View file @
bf865e24
...
...
@@ -2,7 +2,7 @@ use anyhow::Result;
use
either
::
Either
;
use
turbo_rcstr
::
RcStr
;
use
turbo_tasks
::{
FxIndexSet
,
ResolvedVc
,
ValueToString
,
Vc
,
FxIndexSet
,
ResolvedVc
,
TryJoinIterExt
,
ValueToString
,
Vc
,
graph
::{
AdjacencyMap
,
GraphTraversal
},
};
use
turbo_tasks_fs
::
FileSystemPath
;
...
...
@@ -19,7 +19,6 @@ pub trait OutputAssetsReference {
fn
references
(
self
:
Vc
<
Self
>
)
->
Vc
<
OutputAssetsWithReferenced
>
{
OutputAssetsWithReferenced
{
assets
:
OutputAssets
::
empty_resolved
(),
referenced_assets
:
OutputAssets
::
empty_resolved
(),
references
:
OutputAssetsReferences
::
empty_resolved
(),
}
.cell
()
...
...
@@ -59,6 +58,24 @@ impl OutputAssetsReferences {
references
.extend
(
other
.await
?
.iter
()
.copied
());
Ok
(
Vc
::
cell
(
references
.into_iter
()
.collect
()))
}
/// Returns only direct referenced assets and does not include assets referenced indirectly by
/// them.
#[turbo_tasks
::
function]
pub
async
fn
all_assets
(
&
self
)
->
Result
<
Vc
<
OutputAssets
>>
{
let
mut
assets
:
FxIndexSet
<
_
>
=
FxIndexSet
::
default
();
for
reference
in
&
self
.
0
{
assets
.extend
(
reference
.references
()
.all_assets
()
.await
?
.into_iter
()
.copied
(),
);
}
Ok
(
Vc
::
cell
(
assets
.into_iter
()
.collect
()))
}
}
impl
OutputAssetsReferences
{
pub
fn
empty
()
->
Vc
<
Self
>
{
...
...
@@ -70,6 +87,30 @@ impl OutputAssetsReferences {
}
}
#[turbo_tasks
::
value_impl]
impl
OutputAssetsReference
for
OutputAssetsReferences
{
#[turbo_tasks
::
function]
async
fn
references
(
self
:
Vc
<
Self
>
)
->
Result
<
Vc
<
OutputAssetsWithReferenced
>>
{
let
refs_references
=
self
.await
?
.into_iter
()
.map
(
async
|
&
reference
|
reference
.references
()
.await
)
.try_join
()
.await
?
;
let
mut
assets
=
Vec
::
new
();
let
mut
references
=
Vec
::
new
();
for
r
in
refs_references
{
assets
.extend
(
r
.assets.await
?
.iter
()
.copied
());
references
.extend
(
r
.references.await
?
.iter
()
.copied
());
}
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
assets
),
references
:
ResolvedVc
::
cell
(
references
),
}
.cell
())
}
}
#[turbo_tasks
::
value(transparent)]
pub
struct
OutputAssets
(
Vec
<
ResolvedVc
<
Box
<
dyn
OutputAsset
>>>
);
...
...
@@ -102,6 +143,18 @@ impl OutputAssets {
}
}
#[turbo_tasks
::
value_impl]
impl
OutputAssetsReference
for
OutputAssets
{
#[turbo_tasks
::
function]
fn
references
(
self
:
ResolvedVc
<
Self
>
)
->
Vc
<
OutputAssetsWithReferenced
>
{
OutputAssetsWithReferenced
{
assets
:
self
,
references
:
OutputAssetsReferences
::
empty_resolved
(),
}
.cell
()
}
}
#[turbo_tasks
::
value(transparent)]
pub
struct
ExpandedOutputAssets
(
Vec
<
ResolvedVc
<
Box
<
dyn
OutputAsset
>>>
);
...
...
@@ -114,8 +167,6 @@ pub struct OutputAssetsSet(FxIndexSet<ResolvedVc<Box<dyn OutputAsset>>>);
pub
struct
OutputAssetsWithReferenced
{
/// Primary output assets. These are e. g. the chunks needed for a chunk group.
pub
assets
:
ResolvedVc
<
OutputAssets
>
,
/// Secondary output assets that are referenced by the primary assets.
pub
referenced_assets
:
ResolvedVc
<
OutputAssets
>
,
/// Secondary output assets that are referenced by the primary assets. These are unresolved
/// `OutputAssetsReference`s and need to be expanded to get the actual assets. These are e. g.
/// async loaders that reference other chunk groups.
...
...
@@ -131,7 +182,6 @@ impl OutputAssetsWithReferenced {
self
.assets
.await
?
.into_iter
()
.chain
(
self
.referenced_assets.await
?
.into_iter
())
.map
(|
&
asset
|
ExpandOutputAssetsInput
::
Asset
(
asset
))
.chain
(
self
.references
...
...
@@ -151,7 +201,6 @@ impl OutputAssetsWithReferenced {
pub
fn
from_assets
(
assets
:
ResolvedVc
<
OutputAssets
>
)
->
Vc
<
Self
>
{
OutputAssetsWithReferenced
{
assets
,
referenced_assets
:
OutputAssets
::
empty_resolved
(),
references
:
OutputAssetsReferences
::
empty_resolved
(),
}
.cell
()
...
...
@@ -165,11 +214,6 @@ impl OutputAssetsWithReferenced {
.concatenate
(
*
other
.await
?
.assets
)
.to_resolved
()
.await
?
,
referenced_assets
:
self
.referenced_assets
.concatenate
(
*
other
.await
?
.referenced_assets
)
.to_resolved
()
.await
?
,
references
:
self
.references
.concatenate
(
*
other
.await
?
.references
)
...
...
@@ -199,28 +243,11 @@ impl OutputAssetsWithReferenced {
*
self
.assets
}
/// Returns only secondary referenced asset entries. Doesn't
expand OutputAssets. Doesn't
return
/// Returns only secondary referenced asset entries. Doesn't return
/// primary assets.
#[turbo_tasks
::
function]
pub
async
fn
referenced_assets
(
&
self
)
->
Result
<
Vc
<
OutputAssets
>>
{
Ok
(
Vc
::
cell
(
expand_output_assets
(
self
.referenced_assets
.await
?
.into_iter
()
.copied
()
.map
(
ExpandOutputAssetsInput
::
Asset
)
.chain
(
self
.references
.await
?
.into_iter
()
.copied
()
.map
(
ExpandOutputAssetsInput
::
Reference
),
),
false
,
)
.await
?
,
))
pub
fn
references
(
&
self
)
->
Vc
<
OutputAssetsReferences
>
{
*
self
.references
}
}
...
...
@@ -242,7 +269,6 @@ async fn get_referenced_assets(
.assets
.await
?
.into_iter
()
.chain
(
refs
.referenced_assets.await
?
.into_iter
())
.map
(|
&
asset
|
ExpandOutputAssetsInput
::
Asset
(
asset
))
.chain
(
refs
.references
...
...
turbopack/crates/turbopack-css/src/chunk/mod.rs
View file @
bf865e24
...
...
@@ -273,12 +273,7 @@ impl OutputAssetsReference for CssChunk {
}
else
{
None
};
Ok
((
refs
.assets.await
?
,
single_css_chunk
,
refs
.referenced_assets.await
?
,
refs
.references.await
?
,
))
Ok
((
refs
.assets.await
?
,
single_css_chunk
,
refs
.references.await
?
))
})
.try_join
()
.await
?
;
...
...
@@ -298,7 +293,7 @@ impl OutputAssetsReference for CssChunk {
assets
:
ResolvedVc
::
cell
(
references
.iter
()
.flat_map
(|(
assets
,
single_css_chunk
,
_
,
_
)|
{
.flat_map
(|(
assets
,
single_css_chunk
,
_
)|
{
assets
.iter
()
.copied
()
...
...
@@ -307,16 +302,10 @@ impl OutputAssetsReference for CssChunk {
.chain
(
source_map
.into_iter
())
.collect
(),
),
referenced_assets
:
ResolvedVc
::
cell
(
references
.iter
()
.flat_map
(|(
_
,
_
,
referenced_assets
,
_
)|
referenced_assets
.iter
()
.copied
())
.collect
(),
),
references
:
ResolvedVc
::
cell
(
references
.iter
()
.flat_map
(|(
_
,
_
,
_
,
references
)|
references
.iter
()
.copied
())
.flat_map
(|(
_
,
_
,
references
)|
references
.iter
()
.copied
())
.collect
(),
),
}
...
...
turbopack/crates/turbopack-dev-server/src/html.rs
View file @
bf865e24
...
...
@@ -178,7 +178,6 @@ impl DevHtmlAsset {
Ok
((
asset_with_referenced
.assets.await
?
,
asset_with_referenced
.referenced_assets.await
?
,
asset_with_referenced
.references.await
?
,
))
})
...
...
@@ -186,17 +185,14 @@ impl DevHtmlAsset {
.await
?
;
let
mut
all_assets
=
Vec
::
new
();
let
mut
all_referenced_assets
=
Vec
::
new
();
let
mut
all_references
=
Vec
::
new
();
for
(
asset
,
reference
d_asset
,
reference
)
in
all_chunk_groups
{
for
(
asset
,
reference
)
in
all_chunk_groups
{
all_assets
.extend
(
asset
);
all_referenced_assets
.extend
(
referenced_asset
);
all_references
.extend
(
reference
);
}
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
all_assets
),
referenced_assets
:
ResolvedVc
::
cell
(
all_referenced_assets
),
references
:
ResolvedVc
::
cell
(
all_references
),
}
.cell
())
...
...
turbopack/crates/turbopack-dev-server/src/source/asset_graph.rs
View file @
bf865e24
...
...
@@ -155,11 +155,7 @@ async fn expand(
for
&
reference
in
refs
.references.await
?
.iter
()
{
queue
.push_back
(
reference
);
}
let
ref_assets
=
refs
.assets
.await
?
.into_iter
()
.chain
(
refs
.referenced_assets.await
?
.into_iter
());
let
ref_assets
=
refs
.assets.await
?
;
for
&
asset
in
ref_assets
{
if
assets_set
.insert
(
asset
)
{
let
path
=
asset
.path
()
.await
?
;
...
...
turbopack/crates/turbopack-ecmascript/src/async_chunk/chunk_item.rs
View file @
bf865e24
...
...
@@ -49,7 +49,6 @@ impl AsyncLoaderChunkItem {
{
return
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
vec!
[]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
}
.cell
());
...
...
turbopack/crates/turbopack-ecmascript/src/chunk/batch.rs
View file @
bf865e24
...
...
@@ -71,18 +71,15 @@ impl EcmascriptChunkBatchWithAsyncInfo {
#[turbo_tasks
::
function]
pub
async
fn
references
(
&
self
)
->
Result
<
Vc
<
OutputAssetsWithReferenced
>>
{
let
mut
output_assets
=
Vec
::
new
();
let
mut
referenced_output_assets
=
Vec
::
new
();
let
mut
references
=
Vec
::
new
();
// We expect most references to be empty, and avoiding try_join to avoid allocating the Vec
for
item
in
&
self
.chunk_items
{
let
r
=
item
.chunk_item
.references
()
.await
?
;
output_assets
.extend
(
r
.assets.await
?
);
referenced_output_assets
.extend
(
r
.referenced_assets.await
?
);
references
.extend
(
r
.references.await
?
);
}
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
output_assets
),
referenced_assets
:
ResolvedVc
::
cell
(
referenced_output_assets
),
references
:
ResolvedVc
::
cell
(
references
),
}
.cell
())
...
...
turbopack/crates/turbopack-ecmascript/src/chunk/mod.rs
View file @
bf865e24
...
...
@@ -76,11 +76,7 @@ impl OutputAssetsReference for EcmascriptChunk {
.iter
()
.map
(
async
|
with_info
|
{
let
r
=
with_info
.references
()
.await
?
;
Ok
((
r
.assets.await
?
,
r
.referenced_assets.await
?
,
r
.references.await
?
,
))
Ok
((
r
.assets.await
?
,
r
.references.await
?
))
})
.try_join
()
.await
?
;
...
...
@@ -88,19 +84,13 @@ impl OutputAssetsReference for EcmascriptChunk {
assets
:
ResolvedVc
::
cell
(
references
.iter
()
.flat_map
(|(
assets
,
_
,
_
)|
assets
.into_iter
()
.copied
())
.collect
(),
),
referenced_assets
:
ResolvedVc
::
cell
(
references
.iter
()
.flat_map
(|(
_
,
referenced_assets
,
_
)|
referenced_assets
.into_iter
()
.copied
())
.flat_map
(|(
assets
,
_
)|
assets
.into_iter
()
.copied
())
.collect
(),
),
references
:
ResolvedVc
::
cell
(
references
.iter
()
.flat_map
(|(
_
,
_
,
references
)|
references
.into_iter
()
.copied
())
.flat_map
(|(
_
,
references
)|
references
.into_iter
()
.copied
())
.collect
(),
),
}
...
...
turbopack/crates/turbopack-ecmascript/src/manifest/chunk_asset.rs
View file @
bf865e24
...
...
@@ -82,7 +82,6 @@ impl ManifestAsyncModule {
{
return
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
vec!
[]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
}
.cell
());
...
...
turbopack/crates/turbopack-node/src/evaluate.rs
View file @
bf865e24
...
...
@@ -25,7 +25,7 @@ use turbopack_core::{
},
module
::
Module
,
module_graph
::{
GraphEntries
,
ModuleGraph
,
chunk_group_info
::
ChunkGroupEntry
},
output
::{
OutputAsset
,
OutputAssets
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsReferences
},
reference_type
::{
InnerAssets
,
ReferenceType
},
source
::
Source
,
virtual_source
::
VirtualSource
,
...
...
@@ -94,7 +94,7 @@ async fn emit_evaluate_pool_assets_operation(
Vc
::
cell
(
entries
.clone
()),
*
module_graph
,
OutputAssets
::
empty
(),
OutputAssets
::
empty
(),
OutputAssets
References
::
empty
(),
);
let
output_root
=
chunking_context
.output_root
()
.owned
()
.await
?
;
...
...
turbopack/crates/turbopack-node/src/lib.rs
View file @
bf865e24
...
...
@@ -16,7 +16,10 @@ use turbopack_core::{
chunk
::{
ChunkingContext
,
ChunkingContextExt
,
EvaluatableAsset
,
EvaluatableAssets
},
module
::
Module
,
module_graph
::{
ModuleGraph
,
chunk_group_info
::
ChunkGroupEntry
},
output
::{
ExpandOutputAssetsInput
,
OutputAsset
,
OutputAssets
,
expand_output_assets
},
output
::{
ExpandOutputAssetsInput
,
OutputAsset
,
OutputAssets
,
OutputAssetsReferences
,
expand_output_assets
,
},
source_map
::
GenerateSourceMap
,
virtual_output
::
VirtualOutputAsset
,
};
...
...
@@ -192,7 +195,7 @@ pub async fn get_intermediate_asset(
false
,
),
OutputAssets
::
empty
(),
OutputAssets
::
empty
(),
OutputAssets
References
::
empty
(),
))
}
...
...
turbopack/crates/turbopack-nodejs/src/chunking_context.rs
View file @
bf865e24
...
...
@@ -21,7 +21,7 @@ use turbopack_core::{
chunk_group_info
::
ChunkGroup
,
export_usage
::{
ExportUsageInfo
,
ModuleExportUsage
},
},
output
::{
OutputAsset
,
OutputAssets
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsReferences
},
};
use
turbopack_ecmascript
::{
async_chunk
::
module
::
AsyncLoaderModule
,
...
...
@@ -439,7 +439,7 @@ impl ChunkingContext for NodeJsChunkingContext {
let
MakeChunkGroupResult
{
chunks
,
referenced_output_assets
,
references
,
mut
references
,
availability_info
,
}
=
make_chunk_group
(
modules
,
...
...
@@ -449,6 +449,10 @@ impl ChunkingContext for NodeJsChunkingContext {
)
.await
?
;
let
referenced_output_assets
:
ResolvedVc
<
OutputAssets
>
=
ResolvedVc
::
cell
(
referenced_output_assets
);
references
.push
(
ResolvedVc
::
upcast
(
referenced_output_assets
));
let
assets
=
chunks
.iter
()
.map
(|
chunk
|
self
.generate_chunk
(
**
chunk
)
.to_resolved
())
...
...
@@ -457,7 +461,6 @@ impl ChunkingContext for NodeJsChunkingContext {
Ok
(
ChunkGroupResult
{
assets
:
ResolvedVc
::
cell
(
assets
),
referenced_assets
:
ResolvedVc
::
cell
(
referenced_output_assets
),
references
:
ResolvedVc
::
cell
(
references
),
availability_info
,
}
...
...
@@ -474,7 +477,7 @@ impl ChunkingContext for NodeJsChunkingContext {
evaluatable_assets
:
Vc
<
EvaluatableAssets
>
,
module_graph
:
Vc
<
ModuleGraph
>
,
extra_chunks
:
Vc
<
OutputAssets
>
,
extra_reference
d_assets
:
Vc
<
OutputAsset
s
>
,
extra_reference
s
:
ResolvedVc
<
OutputAssetsReference
s
>
,
availability_info
:
AvailabilityInfo
,
)
->
Result
<
Vc
<
EntryChunkGroupResult
>>
{
let
span
=
tracing
::
info_span!
(
...
...
@@ -490,8 +493,8 @@ impl ChunkingContext for NodeJsChunkingContext {
let
MakeChunkGroupResult
{
chunks
,
mut
referenced_output_assets
,
references
,
referenced_output_assets
,
mut
references
,
availability_info
,
}
=
make_chunk_group
(
entries
,
...
...
@@ -509,7 +512,11 @@ impl ChunkingContext for NodeJsChunkingContext {
.await
?
;
other_chunks
.extend
(
extra_chunks
.iter
()
.copied
());
referenced_output_assets
.extend
(
extra_referenced_assets
.await
?
.iter
()
.copied
());
let
referenced_output_assets
:
ResolvedVc
<
OutputAssets
>
=
ResolvedVc
::
cell
(
referenced_output_assets
);
references
.push
(
ResolvedVc
::
upcast
(
referenced_output_assets
));
references
.push
(
ResolvedVc
::
upcast
(
extra_references
));
let
Some
(
module
)
=
ResolvedVc
::
try_sidecast
(
*
evaluatable_assets_ref
.last
()
.unwrap
())
else
{
...
...
@@ -522,7 +529,6 @@ impl ChunkingContext for NodeJsChunkingContext {
Vc
::
cell
(
other_chunks
),
evaluatable_assets
,
*
module
,
Vc
::
cell
(
referenced_output_assets
),
Vc
::
cell
(
references
),
module_graph
,
*
self
,
...
...
turbopack/crates/turbopack-nodejs/src/ecmascript/node/chunk.rs
View file @
bf865e24
...
...
@@ -96,7 +96,6 @@ impl OutputAssetsReference for EcmascriptBuildNodeChunk {
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
assets
),
referenced_assets
:
chunk_references
.referenced_assets
,
references
:
chunk_references
.references
,
}
.cell
())
...
...
turbopack/crates/turbopack-nodejs/src/ecmascript/node/entry/chunk.rs
View file @
bf865e24
...
...
@@ -29,7 +29,6 @@ pub(crate) struct EcmascriptBuildNodeEntryChunk {
other_chunks
:
ResolvedVc
<
OutputAssets
>
,
evaluatable_assets
:
ResolvedVc
<
EvaluatableAssets
>
,
exported_module
:
ResolvedVc
<
Box
<
dyn
EcmascriptChunkPlaceable
>>
,
referenced_output_assets
:
ResolvedVc
<
OutputAssets
>
,
references
:
ResolvedVc
<
OutputAssetsReferences
>
,
module_graph
:
ResolvedVc
<
ModuleGraph
>
,
chunking_context
:
ResolvedVc
<
NodeJsChunkingContext
>
,
...
...
@@ -44,7 +43,6 @@ impl EcmascriptBuildNodeEntryChunk {
other_chunks
:
ResolvedVc
<
OutputAssets
>
,
evaluatable_assets
:
ResolvedVc
<
EvaluatableAssets
>
,
exported_module
:
ResolvedVc
<
Box
<
dyn
EcmascriptChunkPlaceable
>>
,
referenced_output_assets
:
ResolvedVc
<
OutputAssets
>
,
references
:
ResolvedVc
<
OutputAssetsReferences
>
,
module_graph
:
ResolvedVc
<
ModuleGraph
>
,
chunking_context
:
ResolvedVc
<
NodeJsChunkingContext
>
,
...
...
@@ -54,7 +52,6 @@ impl EcmascriptBuildNodeEntryChunk {
other_chunks
,
evaluatable_assets
,
exported_module
,
referenced_output_assets
,
references
,
module_graph
,
chunking_context
,
...
...
@@ -192,7 +189,6 @@ impl OutputAssetsReference for EcmascriptBuildNodeEntryChunk {
Ok
(
OutputAssetsWithReferenced
{
assets
:
ResolvedVc
::
cell
(
assets
),
referenced_assets
:
this
.referenced_output_assets
,
references
:
this
.references
,
}
.cell
())
...
...
turbopack/crates/turbopack-tests/tests/snapshot.rs
View file @
bf865e24
...
...
@@ -50,7 +50,10 @@ use turbopack_core::{
chunk_group_info
::{
ChunkGroup
,
ChunkGroupEntry
},
export_usage
::
compute_export_usage_info
,
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsReference
,
OutputAssetsWithReferenced
},
output
::{
OutputAsset
,
OutputAssets
,
OutputAssetsReference
,
OutputAssetsReferences
,
OutputAssetsWithReferenced
,
},
reference_type
::{
EntryReferenceSubType
,
ReferenceType
},
source
::
Source
,
};
...
...
@@ -536,13 +539,12 @@ async fn run_test_operation(resource: RcStr) -> Result<Vc<FileSystemPath>> {
evaluatable_assets
,
module_graph
,
OutputAssets
::
empty
(),
OutputAssets
::
empty
(),
OutputAssets
References
::
empty
(),
AvailabilityInfo
::
root
(),
)
.await
?
.asset
,
]),
referenced_assets
:
ResolvedVc
::
cell
(
vec!
[]),
references
:
ResolvedVc
::
cell
(
vec!
[]),
}
.cell
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment