File tree Expand file tree Collapse file tree 2 files changed +7
-11
lines changed
Expand file tree Collapse file tree 2 files changed +7
-11
lines changed Original file line number Diff line number Diff line change @@ -250,7 +250,7 @@ pub struct Compilation {
250250 // artifact for infer_async_modules_plugin
251251 pub async_modules_artifact : Arc < AtomicRefCell < AsyncModulesArtifact > > ,
252252 // artifact for collect_dependencies_diagnostics
253- pub dependencies_diagnostics_artifact : DerefOption < DependenciesDiagnosticsArtifact > ,
253+ pub dependencies_diagnostics_artifact : Arc < AtomicRefCell < DependenciesDiagnosticsArtifact > > ,
254254 // artifact for side_effects_flag_plugin
255255 pub side_effects_optimize_artifact : DerefOption < SideEffectsOptimizeArtifact > ,
256256 // artifact for module_ids
@@ -389,9 +389,9 @@ impl Compilation {
389389
390390 async_modules_artifact : Arc :: new ( AtomicRefCell :: new ( AsyncModulesArtifact :: default ( ) ) ) ,
391391 imported_by_defer_modules_artifact : Default :: default ( ) ,
392- dependencies_diagnostics_artifact : DerefOption :: new (
392+ dependencies_diagnostics_artifact : Arc :: new ( AtomicRefCell :: new (
393393 DependenciesDiagnosticsArtifact :: default ( ) ,
394- ) ,
394+ ) ) ,
395395 side_effects_optimize_artifact : DerefOption :: new ( Default :: default ( ) ) ,
396396 module_ids_artifact : Default :: default ( ) ,
397397 named_chunk_ids_artifact : Default :: default ( ) ,
Original file line number Diff line number Diff line change 11mod rebuild;
2- use std:: {
3- mem,
4- sync:: { Arc , atomic:: AtomicU32 } ,
5- } ;
2+ use std:: sync:: { Arc , atomic:: AtomicU32 } ;
63
74use futures:: future:: join_all;
85use rspack_error:: Result ;
@@ -323,18 +320,17 @@ impl Compiler {
323320 wait_for_signal ( "seal compilation" ) ;
324321 }
325322 self . build_module_graph ( ) . await ?;
326- let mut dependencies_diagnostics_artifact =
327- mem :: take ( & mut self . compilation . dependencies_diagnostics_artifact ) ;
323+ let dependencies_diagnostics_artifact =
324+ self . compilation . dependencies_diagnostics_artifact . clone ( ) ;
328325 let async_modules_artifact = self . compilation . async_modules_artifact . clone ( ) ;
329326 let diagnostics = self
330327 . compilation
331328 . collect_build_module_graph_effects (
332- & mut dependencies_diagnostics_artifact,
329+ & mut dependencies_diagnostics_artifact. borrow_mut ( ) ,
333330 & mut async_modules_artifact. borrow_mut ( ) ,
334331 )
335332 . await ?;
336333 self . compilation . extend_diagnostics ( diagnostics) ;
337- self . compilation . dependencies_diagnostics_artifact = dependencies_diagnostics_artifact;
338334 self . compilation . seal ( self . plugin_driver . clone ( ) ) . await ?;
339335 logger. time_end ( start) ;
340336
You can’t perform that action at this time.
0 commit comments