Unverified Commit 1ead596c authored by Niklas Mischkulnig's avatar Niklas Mischkulnig Committed by GitHub

Turbopack: don't panic due to eventual consistency in module merging (#91088)

Turn into bail to handle eventual consistency more gracefully
parent 3ba53df7
......@@ -1525,16 +1525,17 @@ async fn merge_modules(
}
};
debug_assert!(
inserted.len() == contents.len(),
"Not all merged modules were inserted: {:?}",
contents
.iter()
.enumerate()
.map(async |(i, m)| Ok((inserted.contains(&i), m.0.ident().to_string().await?)))
.try_join()
.await?,
);
if cfg!(debug_assertions) && inserted.len() != contents.len() {
bail!(
"Not all merged modules were inserted: {:?}",
contents
.iter()
.enumerate()
.map(async |(i, m)| Ok((inserted.contains(&i), m.0.ident().to_string().await?)))
.try_join()
.await?,
);
}
let comments = contents
.iter_mut()
......
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