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
af1705ad
Commit
af1705ad
authored
Feb 24, 2026
by
Matt Mastracci
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert accidental rename
parent
9eca3e33
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
15 deletions
+15
-15
mod.rs
turbopack/crates/turbopack-core/src/chunk/chunking/mod.rs
+12
-12
production.rs
...ck/crates/turbopack-core/src/chunk/chunking/production.rs
+3
-3
No files found.
turbopack/crates/turbopack-core/src/chunk/chunking/mod.rs
View file @
af1705ad
...
@@ -33,7 +33,7 @@ mod production;
...
@@ -33,7 +33,7 @@ mod production;
mod
style_production
;
mod
style_production
;
#[turbo_tasks
::
value]
#[turbo_tasks
::
value]
struct
Chunk
ed
ItemsWithInfo
{
struct
ChunkItemsWithInfo
{
#[allow(clippy
::
type_complexity)]
#[allow(clippy
::
type_complexity)]
by_type
:
SmallVec
<
by_type
:
SmallVec
<
[(
[(
...
@@ -45,8 +45,8 @@ struct ChunkedItemsWithInfo {
...
@@ -45,8 +45,8 @@ struct ChunkedItemsWithInfo {
}
}
#[turbo_tasks
::
value(transparent)]
#[turbo_tasks
::
value(transparent)]
struct
BatchChunk
ed
ItemsWithInfo
(
struct
BatchChunkItemsWithInfo
(
FxHashMap
<
ChunkItemOrBatchWithAsyncModuleInfo
,
ResolvedVc
<
Chunk
ed
ItemsWithInfo
>>
,
FxHashMap
<
ChunkItemOrBatchWithAsyncModuleInfo
,
ResolvedVc
<
ChunkItemsWithInfo
>>
,
);
);
#[derive(Clone,
PartialEq,
Eq,
TraceRawVcs,
NonLocalValue,
ValueDebugFormat,
Encode,
Decode)]
#[derive(Clone,
PartialEq,
Eq,
TraceRawVcs,
NonLocalValue,
ValueDebugFormat,
Encode,
Decode)]
...
@@ -101,7 +101,7 @@ async fn batch_size(
...
@@ -101,7 +101,7 @@ async fn batch_size(
async
fn
plain_chunk_items_with_info
(
async
fn
plain_chunk_items_with_info
(
chunk_item_or_batch
:
ChunkItemOrBatchWithAsyncModuleInfo
,
chunk_item_or_batch
:
ChunkItemOrBatchWithAsyncModuleInfo
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
)
->
Result
<
Chunk
ed
ItemsWithInfo
>
{
)
->
Result
<
ChunkItemsWithInfo
>
{
Ok
(
match
chunk_item_or_batch
{
Ok
(
match
chunk_item_or_batch
{
ChunkItemOrBatchWithAsyncModuleInfo
::
ChunkItem
(
chunk_item_with_info
)
=>
{
ChunkItemOrBatchWithAsyncModuleInfo
::
ChunkItem
(
chunk_item_with_info
)
=>
{
let
ChunkItemWithAsyncModuleInfo
{
let
ChunkItemWithAsyncModuleInfo
{
...
@@ -115,7 +115,7 @@ async fn plain_chunk_items_with_info(
...
@@ -115,7 +115,7 @@ async fn plain_chunk_items_with_info(
let
chunk_item_size
=
let
chunk_item_size
=
ty
.chunk_item_size
(
chunking_context
,
*
chunk_item
,
async_info
.map
(|
info
|
*
info
));
ty
.chunk_item_size
(
chunking_context
,
*
chunk_item
,
async_info
.map
(|
info
|
*
info
));
Chunk
ed
ItemsWithInfo
{
ChunkItemsWithInfo
{
by_type
:
smallvec!
[(
by_type
:
smallvec!
[(
ty
.to_resolved
()
.await
?
,
ty
.to_resolved
()
.await
?
,
smallvec!
[
ChunkItemOrBatchWithInfo
::
ChunkItem
{
smallvec!
[
ChunkItemOrBatchWithInfo
::
ChunkItem
{
...
@@ -141,7 +141,7 @@ async fn plain_chunk_items_with_info(
...
@@ -141,7 +141,7 @@ async fn plain_chunk_items_with_info(
})
})
.try_join
()
.try_join
()
.await
?
;
.await
?
;
Chunk
ed
ItemsWithInfo
{
ChunkItemsWithInfo
{
by_type
:
by_type
.into_iter
()
.collect
(),
by_type
:
by_type
.into_iter
()
.collect
(),
}
}
}
}
...
@@ -194,7 +194,7 @@ async fn plain_chunk_items_with_info_with_type(
...
@@ -194,7 +194,7 @@ async fn plain_chunk_items_with_info_with_type(
async
fn
chunk_items_with_info
(
async
fn
chunk_items_with_info
(
chunk_item_or_batch
:
ChunkItemOrBatchWithAsyncModuleInfo
,
chunk_item_or_batch
:
ChunkItemOrBatchWithAsyncModuleInfo
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
)
->
Result
<
Vc
<
Chunk
ed
ItemsWithInfo
>>
{
)
->
Result
<
Vc
<
ChunkItemsWithInfo
>>
{
let
chunk_items_with_info
=
let
chunk_items_with_info
=
plain_chunk_items_with_info
(
chunk_item_or_batch
,
chunking_context
)
.await
?
;
plain_chunk_items_with_info
(
chunk_item_or_batch
,
chunking_context
)
.await
?
;
Ok
(
chunk_items_with_info
.cell
())
Ok
(
chunk_items_with_info
.cell
())
...
@@ -206,7 +206,7 @@ async fn chunk_items_with_info_with_type(
...
@@ -206,7 +206,7 @@ async fn chunk_items_with_info_with_type(
ty
:
ResolvedVc
<
Box
<
dyn
ChunkType
>>
,
ty
:
ResolvedVc
<
Box
<
dyn
ChunkType
>>
,
batch_group
:
Option
<
ResolvedVc
<
ChunkItemBatchGroup
>>
,
batch_group
:
Option
<
ResolvedVc
<
ChunkItemBatchGroup
>>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
)
->
Result
<
Vc
<
Chunk
ed
ItemsWithInfo
>>
{
)
->
Result
<
Vc
<
ChunkItemsWithInfo
>>
{
let
result
=
plain_chunk_items_with_info_with_type
(
let
result
=
plain_chunk_items_with_info_with_type
(
&
chunk_item_or_batch
,
&
chunk_item_or_batch
,
ty
,
ty
,
...
@@ -214,7 +214,7 @@ async fn chunk_items_with_info_with_type(
...
@@ -214,7 +214,7 @@ async fn chunk_items_with_info_with_type(
chunking_context
,
chunking_context
,
)
)
.await
?
;
.await
?
;
Ok
(
Chunk
ed
ItemsWithInfo
{
Ok
(
ChunkItemsWithInfo
{
by_type
:
smallvec!
[
result
],
by_type
:
smallvec!
[
result
],
}
}
.cell
())
.cell
())
...
@@ -224,7 +224,7 @@ async fn chunk_items_with_info_with_type(
...
@@ -224,7 +224,7 @@ async fn chunk_items_with_info_with_type(
async
fn
batch_chunk_items_with_info
(
async
fn
batch_chunk_items_with_info
(
batch_group
:
Vc
<
ChunkItemBatchGroup
>
,
batch_group
:
Vc
<
ChunkItemBatchGroup
>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
)
->
Result
<
Vc
<
BatchChunk
ed
ItemsWithInfo
>>
{
)
->
Result
<
Vc
<
BatchChunkItemsWithInfo
>>
{
let
split_batch_group
=
batch_group
.split_by_chunk_type
()
.await
?
;
let
split_batch_group
=
batch_group
.split_by_chunk_type
()
.await
?
;
if
split_batch_group
.len
()
==
1
{
if
split_batch_group
.len
()
==
1
{
let
&
(
ty
,
batch
)
=
split_batch_group
.into_iter
()
.next
()
.unwrap
();
let
&
(
ty
,
batch
)
=
split_batch_group
.into_iter
()
.next
()
.unwrap
();
...
@@ -255,7 +255,7 @@ async fn batch_chunk_items_with_info_with_type(
...
@@ -255,7 +255,7 @@ async fn batch_chunk_items_with_info_with_type(
batch_group
:
Vc
<
ChunkItemBatchGroup
>
,
batch_group
:
Vc
<
ChunkItemBatchGroup
>
,
ty
:
Vc
<
Box
<
dyn
ChunkType
>>
,
ty
:
Vc
<
Box
<
dyn
ChunkType
>>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
chunking_context
:
Vc
<
Box
<
dyn
ChunkingContext
>>
,
)
->
Result
<
Vc
<
BatchChunk
ed
ItemsWithInfo
>>
{
)
->
Result
<
Vc
<
BatchChunkItemsWithInfo
>>
{
let
map
=
batch_group
let
map
=
batch_group
.await
?
.await
?
.items
.items
...
@@ -298,7 +298,7 @@ pub async fn make_chunks(
...
@@ -298,7 +298,7 @@ pub async fn make_chunks(
chunk_items_or_batches
=
chunk_items_or_batches
.len
(),
chunk_items_or_batches
=
chunk_items_or_batches
.len
(),
batch_groups
=
batch_groups
.len
()
batch_groups
=
batch_groups
.len
()
);
);
let
chunk_items
:
Vec
<
ReadRef
<
Chunk
ed
ItemsWithInfo
>>
=
batch_info
(
let
chunk_items
:
Vec
<
ReadRef
<
ChunkItemsWithInfo
>>
=
batch_info
(
&
batch_groups
,
&
batch_groups
,
&
chunk_items_or_batches
,
&
chunk_items_or_batches
,
|
batch_group
|
batch_chunk_items_with_info
(
batch_group
,
*
chunking_context
)
.into_future
(),
|
batch_group
|
batch_chunk_items_with_info
(
batch_group
,
*
chunking_context
)
.into_future
(),
...
...
turbopack/crates/turbopack-core/src/chunk/chunking/production.rs
View file @
af1705ad
...
@@ -40,12 +40,12 @@ pub async fn make_production_chunks(
...
@@ -40,12 +40,12 @@ pub async fn make_production_chunks(
let
merged_modules
=
module_graph
.merged_modules
()
.await
?
;
let
merged_modules
=
module_graph
.merged_modules
()
.await
?
;
#[derive(Default)]
#[derive(Default)]
struct
GroupedChunk
ed
Items
<
'l
>
{
struct
GroupedChunkItems
<
'l
>
{
chunk_items
:
Vec
<&
'l
ChunkItemOrBatchWithInfo
>
,
chunk_items
:
Vec
<&
'l
ChunkItemOrBatchWithInfo
>
,
batch_group
:
Option
<
ResolvedVc
<
ChunkItemBatchGroup
>>
,
batch_group
:
Option
<
ResolvedVc
<
ChunkItemBatchGroup
>>
,
}
}
let
mut
grouped_chunk_items
=
FxIndexMap
::
<
_
,
GroupedChunk
ed
Items
<
'_
>>
::
default
();
let
mut
grouped_chunk_items
=
FxIndexMap
::
<
_
,
GroupedChunkItems
<
'_
>>
::
default
();
enum
Prepared
{
enum
Prepared
{
ChunkItem
(
MappedReadRef
<
ModuleToChunkGroups
,
RoaringBitmapWrapper
>
),
ChunkItem
(
MappedReadRef
<
ModuleToChunkGroups
,
RoaringBitmapWrapper
>
),
...
@@ -143,7 +143,7 @@ pub async fn make_production_chunks(
...
@@ -143,7 +143,7 @@ pub async fn make_production_chunks(
.map
(
.map
(
|(
|(
key
,
key
,
GroupedChunk
ed
Items
{
GroupedChunkItems
{
chunk_items
,
chunk_items
,
batch_group
,
batch_group
,
},
},
...
...
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