@@ -3,7 +3,7 @@ use std::collections::VecDeque;
33use rspack_collections:: { IdentifierMap , IdentifierSet } ;
44use rustc_hash:: FxHashSet as HashSet ;
55
6- use super :: MakeArtifact ;
6+ use super :: BuildModuleGraphArtifact ;
77use crate :: { DependencyId , ModuleGraph , ModuleIdentifier , ModuleIssuer } ;
88
99/// Result of IssuerHelper.is_issuer.
@@ -116,7 +116,11 @@ impl FixIssuers {
116116 /// This function will
117117 /// 1. save the issuer of force_build_module to self.force_build_module_issuers.
118118 /// 2. add force_build_module and the child module whose issuer is this force_build_module to self.need_check_modules.
119- pub fn analyze_force_build_modules ( & mut self , artifact : & MakeArtifact , ids : & IdentifierSet ) {
119+ pub fn analyze_force_build_modules (
120+ & mut self ,
121+ artifact : & BuildModuleGraphArtifact ,
122+ ids : & IdentifierSet ,
123+ ) {
120124 let module_graph = artifact. get_module_graph ( ) ;
121125 for module_identifier in ids {
122126 let mgm = module_graph
@@ -157,7 +161,7 @@ impl FixIssuers {
157161 /// this function will add the dependency target module to self.need_check_modules
158162 pub fn analyze_force_build_dependencies (
159163 & mut self ,
160- artifact : & MakeArtifact ,
164+ artifact : & BuildModuleGraphArtifact ,
161165 ids : & HashSet < DependencyId > ,
162166 ) {
163167 let module_graph = artifact. get_module_graph ( ) ;
@@ -201,7 +205,7 @@ impl FixIssuers {
201205 /// 4. return the module with invalid issuer and its parents.
202206 fn apply_force_build_module_issuer (
203207 self ,
204- artifact : & mut MakeArtifact ,
208+ artifact : & mut BuildModuleGraphArtifact ,
205209 ) -> IdentifierMap < Vec < Option < ModuleIdentifier > > > {
206210 let Self {
207211 mut force_build_module_issuers,
@@ -249,7 +253,7 @@ impl FixIssuers {
249253 ///
250254 /// After this step, the issuer of all module are valid and we can use IssuerHelper in next steps.
251255 fn try_set_first_incoming (
252- artifact : & mut MakeArtifact ,
256+ artifact : & mut BuildModuleGraphArtifact ,
253257 need_update_issuer_modules : IdentifierMap < Vec < Option < ModuleIdentifier > > > ,
254258 ) -> IdentifierMap < Vec < Option < ModuleIdentifier > > > {
255259 let mut queue = VecDeque :: with_capacity ( need_update_issuer_modules. len ( ) ) ;
@@ -345,7 +349,7 @@ impl FixIssuers {
345349 /// - any module set issuer success should check if the current module affects modules in `need_clean_cycle_modules`.
346350 /// 4. return need_clean_cycle_modules but remove cycle_paths info.
347351 fn set_available_issuer (
348- artifact : & mut MakeArtifact ,
352+ artifact : & mut BuildModuleGraphArtifact ,
349353 helper : & mut IssuerHelper ,
350354 need_check_available_modules : IdentifierMap < Vec < Option < ModuleIdentifier > > > ,
351355 ) -> IdentifierMap < IdentifierSet > {
@@ -405,7 +409,7 @@ impl FixIssuers {
405409 /// - if a module can be modified to be an available issuer, then starting from the current module,
406410 /// re-update the issuers of all checked modules.
407411 fn clean_cycle_module (
408- artifact : & mut MakeArtifact ,
412+ artifact : & mut BuildModuleGraphArtifact ,
409413 helper : & mut IssuerHelper ,
410414 clean_modules : IdentifierMap < IdentifierSet > ,
411415 ) -> IdentifierMap < Vec < Option < ModuleIdentifier > > > {
@@ -519,7 +523,7 @@ impl FixIssuers {
519523 }
520524
521525 /// fix artifact module graph issuers
522- pub fn fix_artifact ( self , artifact : & mut MakeArtifact ) {
526+ pub fn fix_artifact ( self , artifact : & mut BuildModuleGraphArtifact ) {
523527 let mut need_update_issuer_modules = self . apply_force_build_module_issuer ( artifact) ;
524528
525529 let mut helper = IssuerHelper :: default ( ) ;
0 commit comments