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
cac6f25a
Commit
cac6f25a
authored
Aug 18, 2025
by
Will Binns-Smith
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[DO NOT MERGE] debugging module counts
parent
a406b7a3
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
29 additions
and
2 deletions
+29
-2
project.rs
crates/next-api/src/project.rs
+29
-2
No files found.
crates/next-api/src/project.rs
View file @
cac6f25a
...
@@ -27,8 +27,9 @@ use serde::{Deserialize, Serialize};
...
@@ -27,8 +27,9 @@ use serde::{Deserialize, Serialize};
use
tracing
::
Instrument
;
use
tracing
::
Instrument
;
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_rcstr
::{
RcStr
,
rcstr
};
use
turbo_tasks
::{
use
turbo_tasks
::{
Completion
,
Completions
,
FxIndexMap
,
IntoTraitRef
,
NonLocalValue
,
OperationValue
,
OperationVc
,
Completion
,
Completions
,
FxIndexMap
,
FxIndexSet
,
IntoTraitRef
,
NonLocalValue
,
OperationValue
,
ReadRef
,
ResolvedVc
,
State
,
TaskInput
,
TransientInstance
,
TryFlatJoinIterExt
,
Vc
,
OperationVc
,
ReadRef
,
ResolvedVc
,
State
,
TaskInput
,
TransientInstance
,
TryFlatJoinIterExt
,
TryJoinIterExt
,
Vc
,
debug
::
ValueDebugFormat
,
debug
::
ValueDebugFormat
,
fxindexmap
,
fxindexmap
,
graph
::{
AdjacencyMap
,
GraphTraversal
},
graph
::{
AdjacencyMap
,
GraphTraversal
},
...
@@ -983,6 +984,32 @@ impl Project {
...
@@ -983,6 +984,32 @@ impl Project {
turbopack_node
::
evaluate
::
scale_zero
();
turbopack_node
::
evaluate
::
scale_zero
();
}
}
let
modules
=
module_graphs_vc
.await
?
.full
.await
?
.get_graphs
()
.await
?
.iter
()
.flat_map
(|
g
|
g
.iter_nodes
())
.map
(|
n
|
n
.module
)
.collect
::
<
Vec
<
_
>>
();
let
source_files
=
modules
.iter
()
.map
(
async
|
m
|
{
let
ident
=
m
.ident
()
.await
?
;
Ok
(
ident
.path
.clone
())
})
.try_join
()
.await
?
.into_iter
()
.collect
::
<
FxIndexSet
<
_
>>
();
println!
(
"module count {:?}, source file count {:?}"
,
modules
.len
(),
source_files
.len
()
);
Ok
(
*
module_graphs_vc
)
Ok
(
*
module_graphs_vc
)
}
}
.instrument
(
tracing
::
info_span!
(
"module graph for app"
))
.instrument
(
tracing
::
info_span!
(
"module graph for app"
))
...
...
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