From ef12b9d41c6fea55f23474e8973abff9241216a0 Mon Sep 17 00:00:00 2001 From: Niklas Mischkulnig <4586894+mischnic@users.noreply.github.com> Date: Wed, 18 Dec 2024 16:38:54 +0100 Subject: [PATCH] wip --- .../src/chunk/module_id_strategies.rs | 30 ++++++++++--------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/turbopack/crates/turbopack-core/src/chunk/module_id_strategies.rs b/turbopack/crates/turbopack-core/src/chunk/module_id_strategies.rs index 428add2e6fff0..553c119f050b7 100644 --- a/turbopack/crates/turbopack-core/src/chunk/module_id_strategies.rs +++ b/turbopack/crates/turbopack-core/src/chunk/module_id_strategies.rs @@ -1,4 +1,4 @@ -use anyhow::Result; +use anyhow::{bail, Result}; use turbo_rcstr::RcStr; use turbo_tasks::{FxIndexMap, ResolvedVc, ValueToString, Vc}; use turbo_tasks_hash::hash_xxh3_hash64; @@ -57,19 +57,21 @@ impl ModuleIdStrategy for GlobalModuleIdStrategy { // This shouldn't happen // It means we missed something when generating the map - ModuleIssue { - ident: ident.to_resolved().await?, - title: StyledString::Text( - format!("ModuleId not found for ident: {:?}", ident_string).into(), - ) - .resolved_cell(), - description: StyledString::Text( - format!("ModuleId not found for ident: {:?}", ident_string).into(), - ) - .resolved_cell(), - } - .resolved_cell() - .emit(); + println!("ModuleId not found for ident: {:?}", ident_string); + bail!("ModuleId not found for ident: {:?}", ident_string); + // ModuleIssue { + // ident: ident.to_resolved().await?, + // title: StyledString::Text( + // format!("ModuleId not found for ident: {:?}", ident_string).into(), + // ) + // .resolved_cell(), + // description: StyledString::Text( + // format!("ModuleId not found for ident: {:?}", ident_string).into(), + // ) + // .resolved_cell(), + // } + // .resolved_cell() + // .emit(); Ok(ModuleId::String( hash_xxh3_hash64(ident.to_string().await?)