diff --git a/turbopack/crates/turbopack-core/src/module_graph/mod.rs b/turbopack/crates/turbopack-core/src/module_graph/mod.rs index 7f49434075e2c..709128a9cb213 100644 --- a/turbopack/crates/turbopack-core/src/module_graph/mod.rs +++ b/turbopack/crates/turbopack-core/src/module_graph/mod.rs @@ -29,7 +29,7 @@ use crate::{ #[derive(Clone, Debug)] pub struct ModuleSet(pub HashSet>>); -#[turbo_tasks::value(cell = "new", eq = "manual", into = "new", local)] +#[turbo_tasks::value(cell = "new", eq = "manual", into = "new")] #[derive(Clone, Default)] pub struct SingleModuleGraph { graph: TracedDiGraph, @@ -349,13 +349,18 @@ impl SingleModuleGraphNode { } #[derive(Clone, Debug, ValueDebugFormat, Serialize, Deserialize)] -struct TracedDiGraph(DiGraph); -impl Default for TracedDiGraph { +struct TracedDiGraph(DiGraph); +impl Default for TracedDiGraph { fn default() -> Self { Self(Default::default()) } } -impl TraceRawVcs for TracedDiGraph { + +impl TraceRawVcs for TracedDiGraph +where + N: TraceRawVcs, + E: TraceRawVcs, +{ fn trace_raw_vcs(&self, trace_context: &mut TraceRawVcsContext) { for node in self.0.node_weights() { node.trace_raw_vcs(trace_context); @@ -365,13 +370,21 @@ impl TraceRawVcs for TracedDiGraph { } } } -impl Deref for TracedDiGraph { + +impl Deref for TracedDiGraph { type Target = DiGraph; fn deref(&self) -> &Self::Target { &self.0 } } +unsafe impl NonLocalValue for TracedDiGraph +where + N: NonLocalValue, + E: NonLocalValue, +{ +} + #[derive(PartialEq, Eq, Debug)] pub enum GraphTraversalAction { /// Continue visiting children