Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: process dependencies task remove resolve_options #6377

Merged
merged 1 commit into from
Apr 26, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions crates/rspack_core/src/compiler/make/repair/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -219,13 +219,11 @@ impl Task<MakeTaskContext> for BuildResultTask {
module.set_build_info(build_result.build_info);
module.set_build_meta(build_result.build_meta);

let resolve_options = module.get_resolve_options();
module_graph.add_module(module);

Ok(vec![Box::new(ProcessDependenciesTask {
dependencies: all_dependencies,
original_module_identifier: module_identifier,
resolve_options,
})])
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,13 @@ use super::{factorize::FactorizeTask, MakeTaskContext};
use crate::{
utils::task_loop::{Task, TaskResult, TaskType},
ContextDependency, DependencyId, DependencyType, ErrorSpan, Module, ModuleIdentifier,
ModuleProfile, NormalModuleSource, Resolve,
ModuleProfile, NormalModuleSource,
};

#[derive(Debug)]
pub struct ProcessDependenciesTask {
pub original_module_identifier: ModuleIdentifier,
pub dependencies: Vec<DependencyId>,
pub resolve_options: Option<Box<Resolve>>,
}

impl Task<MakeTaskContext> for ProcessDependenciesTask {
Expand All @@ -23,7 +22,6 @@ impl Task<MakeTaskContext> for ProcessDependenciesTask {
let Self {
original_module_identifier,
dependencies,
resolve_options,
} = *self;
let mut sorted_dependencies = HashMap::default();
let module_graph =
Expand Down Expand Up @@ -114,7 +112,7 @@ impl Task<MakeTaskContext> for ProcessDependenciesTask {
dependency,
dependencies,
is_entry: false,
resolve_options: resolve_options.clone(),
resolve_options: module.get_resolve_options(),
resolver_factory: context.resolver_factory.clone(),
loader_resolver_factory: context.loader_resolver_factory.clone(),
options: context.compiler_options.clone(),
Expand Down
Loading