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,8 +1525,8 @@ async fn merge_modules( ...@@ -1525,8 +1525,8 @@ async fn merge_modules(
} }
}; };
debug_assert!( if cfg!(debug_assertions) && inserted.len() != contents.len() {
inserted.len() == contents.len(), bail!(
"Not all merged modules were inserted: {:?}", "Not all merged modules were inserted: {:?}",
contents contents
.iter() .iter()
...@@ -1535,6 +1535,7 @@ async fn merge_modules( ...@@ -1535,6 +1535,7 @@ async fn merge_modules(
.try_join() .try_join()
.await?, .await?,
); );
}
let comments = contents let comments = contents
.iter_mut() .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