Skip to content

Commit

Permalink
feat: align module error
Browse files Browse the repository at this point in the history
  • Loading branch information
h-a-n-a committed Dec 5, 2023
1 parent 2155d7d commit d8388ff
Show file tree
Hide file tree
Showing 21 changed files with 559 additions and 587 deletions.
11 changes: 0 additions & 11 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,10 @@ impl TryFrom<&rspack_core::LoaderContext<'_, rspack_core::LoaderRunnerContext>>

additional_data_external: External::new(cx.additional_data.clone()),
context_external: External::new(cx.context.clone()),
diagnostics_external: External::new(cx.__diagnostics.clone()),
diagnostics_external: External::new({
eprintln!("Should be able to pipe diagnostic errors");
vec![]
}),
})
}
}
Expand Down
15 changes: 9 additions & 6 deletions crates/rspack_core/src/cache/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,10 @@ mod snapshot;
mod storage;
pub use local::*;
use occasion::{
BuildModuleOccasion, CodeGenerateOccasion, CreateChunkAssetsOccasion, ResolveModuleOccasion,
// BuildModuleOccasion,
CodeGenerateOccasion,
CreateChunkAssetsOccasion,
ResolveModuleOccasion,
};
use snapshot::SnapshotManager;
use storage::new_storage;
Expand All @@ -24,7 +27,7 @@ pub struct Cache {
is_idle: AtomicBool,
snapshot_manager: Arc<SnapshotManager>,
pub resolve_module_occasion: ResolveModuleOccasion,
pub build_module_occasion: BuildModuleOccasion,
// pub build_module_occasion: BuildModuleOccasion,
pub code_generate_occasion: CodeGenerateOccasion,
pub create_chunk_assets_occasion: CreateChunkAssetsOccasion,
}
Expand All @@ -39,10 +42,10 @@ impl Cache {
new_storage(&options.cache),
snapshot_manager.clone(),
),
build_module_occasion: BuildModuleOccasion::new(
new_storage(&options.cache),
snapshot_manager,
),
// build_module_occasion: BuildModuleOccasion::new(
// new_storage(&options.cache),
// snapshot_manager,
// ),
code_generate_occasion: CodeGenerateOccasion::new(new_storage(&options.cache)),
create_chunk_assets_occasion: CreateChunkAssetsOccasion::new(new_storage(&options.cache)),
}
Expand Down
Loading

0 comments on commit d8388ff

Please sign in to comment.