diff --git a/crates/next-api/src/module_graph.rs b/crates/next-api/src/module_graph.rs index de59891a67448..3874999c363c5 100644 --- a/crates/next-api/src/module_graph.rs +++ b/crates/next-api/src/module_graph.rs @@ -173,6 +173,20 @@ async fn get_module_graph_for_endpoint( Ok(Vc::cell(graphs)) } +#[turbo_tasks::function] +async fn get_module_graph_for_app_without_issues( + entries: Vc, +) -> Result> { + let vc = SingleModuleGraph::new_with_entries(entries); + let graph = vc.resolve_strongly_consistent().await?; + let _issues = vc.take_collectibles::>(); + // println!( + // "taking {:?}", + // _issues.iter().map(|i| i.dbg()).try_join().await? + // ); + Ok(graph) +} + #[turbo_tasks::value] pub struct NextDynamicGraph { is_single_page: bool, @@ -321,10 +335,9 @@ pub async fn get_reduced_graphs_for_endpoint( false, vec![ async move { - let vc = SingleModuleGraph::new_with_entries(project.get_all_entries()); - let vc = vc.resolve_strongly_consistent().await?; - let _ = vc.take_collectibles::>(); - vc.to_resolved().await + get_module_graph_for_app_without_issues(project.get_all_entries()) + .to_resolved() + .await } .instrument(tracing::info_span!("module graph for app")) .await?,