Unverified Commit 13d5750a authored by Will Binns-Smith's avatar Will Binns-Smith Committed by GitHub

Relocate `SingleModuleGraph` to `turbopack-core` (#74571)

While many use case-specific graphs belong in Next.js, this primitive
should be kept in Turbopack as it will be used for other core usecases
like chunking.

Test Plan: CI
parent 51e091d5
...@@ -8834,6 +8834,7 @@ dependencies = [ ...@@ -8834,6 +8834,7 @@ dependencies = [
"lazy_static", "lazy_static",
"once_cell", "once_cell",
"patricia_tree", "patricia_tree",
"petgraph",
"ref-cast", "ref-cast",
"regex", "regex",
"rstest", "rstest",
......
...@@ -10,9 +10,7 @@ use turbo_tasks::{ ...@@ -10,9 +10,7 @@ use turbo_tasks::{
debug::ValueDebugFormat, trace::TraceRawVcs, NonLocalValue, ResolvedVc, TryFlatJoinIterExt, Vc, debug::ValueDebugFormat, trace::TraceRawVcs, NonLocalValue, ResolvedVc, TryFlatJoinIterExt, Vc,
}; };
use turbopack::css::CssModuleAsset; use turbopack::css::CssModuleAsset;
use turbopack_core::module::Module; use turbopack_core::{module::Module, module_graph::SingleModuleGraph};
use crate::module_graph::SingleModuleGraph;
#[derive( #[derive(
Clone, Serialize, Deserialize, Eq, PartialEq, TraceRawVcs, ValueDebugFormat, NonLocalValue, Clone, Serialize, Deserialize, Eq, PartialEq, TraceRawVcs, ValueDebugFormat, NonLocalValue,
......
...@@ -34,10 +34,11 @@ use turbopack_core::{ ...@@ -34,10 +34,11 @@ use turbopack_core::{
ChunkingContext, ModuleId, ChunkingContext, ModuleId,
}, },
module::Module, module::Module,
module_graph::SingleModuleGraph,
output::OutputAssets, output::OutputAssets,
}; };
use crate::module_graph::{DynamicImportEntriesWithImporter, SingleModuleGraph}; use crate::module_graph::DynamicImportEntriesWithImporter;
pub(crate) enum NextDynamicChunkAvailability<'a> { pub(crate) enum NextDynamicChunkAvailability<'a> {
/// In App Router, the client references /// In App Router, the client references
......
This diff is collapsed.
...@@ -30,6 +30,7 @@ use turbopack_core::{ ...@@ -30,6 +30,7 @@ use turbopack_core::{
context::AssetContext, context::AssetContext,
file_source::FileSource, file_source::FileSource,
module::Module, module::Module,
module_graph::SingleModuleGraph,
output::OutputAsset, output::OutputAsset,
reference_type::{EcmaScriptModulesReferenceSubType, ReferenceType}, reference_type::{EcmaScriptModulesReferenceSubType, ReferenceType},
resolve::ModulePart, resolve::ModulePart,
...@@ -41,8 +42,6 @@ use turbopack_ecmascript::{ ...@@ -41,8 +42,6 @@ use turbopack_ecmascript::{
tree_shake::asset::EcmascriptModulePartAsset, EcmascriptParsable, tree_shake::asset::EcmascriptModulePartAsset, EcmascriptParsable,
}; };
use crate::module_graph::SingleModuleGraph;
#[turbo_tasks::value] #[turbo_tasks::value]
pub(crate) struct ServerActionsManifest { pub(crate) struct ServerActionsManifest {
pub loader: ResolvedVc<Box<dyn EvaluatableAsset>>, pub loader: ResolvedVc<Box<dyn EvaluatableAsset>>,
......
...@@ -22,6 +22,7 @@ indexmap = { workspace = true } ...@@ -22,6 +22,7 @@ indexmap = { workspace = true }
lazy_static = { workspace = true } lazy_static = { workspace = true }
once_cell = { workspace = true } once_cell = { workspace = true }
patricia_tree = "0.5.5" patricia_tree = "0.5.5"
petgraph = { workspace = true }
ref-cast = "1.0.20" ref-cast = "1.0.20"
regex = { workspace = true } regex = { workspace = true }
serde = { workspace = true, features = ["rc"] } serde = { workspace = true, features = ["rc"] }
......
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
#![feature(assert_matches)] #![feature(assert_matches)]
#![feature(arbitrary_self_types)] #![feature(arbitrary_self_types)]
#![feature(arbitrary_self_types_pointers)] #![feature(arbitrary_self_types_pointers)]
#![feature(impl_trait_in_assoc_type)]
#![feature(iter_intersperse)] #![feature(iter_intersperse)]
pub mod asset; pub mod asset;
...@@ -21,6 +22,7 @@ pub mod ident; ...@@ -21,6 +22,7 @@ pub mod ident;
pub mod introspect; pub mod introspect;
pub mod issue; pub mod issue;
pub mod module; pub mod module;
pub mod module_graph;
pub mod output; pub mod output;
pub mod package_json; pub mod package_json;
pub mod proxied_asset; pub mod proxied_asset;
......
This diff is collapsed.
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