We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c94753c commit 34e20caCopy full SHA for 34e20ca
turbopack/crates/turbopack-core/src/module_graph/mod.rs
@@ -325,6 +325,21 @@ impl SingleModuleGraph {
325
326
graph.shrink_to_fit();
327
328
+ #[cfg(debug_assertions)]
329
+ {
330
+ let mut duplicates = Vec::new();
331
+ let mut set = FxHashSet::default();
332
+ for &module in modules.keys() {
333
+ let ident = module.ident().to_string().await?;
334
+ if !set.insert(ident.clone()) {
335
+ duplicates.push(ident);
336
+ }
337
338
+ if !duplicates.is_empty() {
339
+ panic!("Duplicate module idents in graph: {:#?}", duplicates);
340
341
342
+
343
Ok(SingleModuleGraph {
344
graph: TracedDiGraph::new(graph),
345
number_of_modules,
0 commit comments