@@ -5,6 +5,7 @@ use rolldown_common::{ImportKind, ModuleId, RawPath, ResourceId};
55use rolldown_error:: BuildError ;
66use rolldown_fs:: FileSystemExt ;
77use rolldown_resolver:: Resolver ;
8+ use rolldown_utils:: block_on_spawn_all;
89use rustc_hash:: { FxHashMap , FxHashSet } ;
910
1011use super :: normal_module_task:: NormalModuleTask ;
@@ -127,7 +128,7 @@ impl<'a, T: FileSystemExt + 'static + Default> ModuleLoader<'a, T> {
127128 pub async fn fetch_all_modules ( mut self ) -> BatchedResult < ( ) > {
128129 assert ! ( !self . input_options. input. is_empty( ) , "You must supply options.input to rolldown" ) ;
129130
130- let resolved_entries = self . resolve_entries ( ) . await ?;
131+ let resolved_entries = self . resolve_entries ( ) ?;
131132
132133 self . ctx . intermediate_modules . reserve ( resolved_entries. len ( ) + 1 /* runtime */ ) ;
133134
@@ -199,12 +200,12 @@ impl<'a, T: FileSystemExt + 'static + Default> ModuleLoader<'a, T> {
199200 }
200201
201202 #[ allow( clippy:: collection_is_never_read) ]
202- async fn resolve_entries ( & mut self ) -> BatchedResult < Vec < ( Option < String > , ResolvedRequestInfo ) > > {
203+ fn resolve_entries ( & mut self ) -> BatchedResult < Vec < ( Option < String > , ResolvedRequestInfo ) > > {
203204 let resolver = & self . resolver ;
204205 let plugin_driver = & self . plugin_driver ;
205206
206207 let resolved_ids =
207- futures :: future :: join_all ( self . input_options . input . iter ( ) . map ( |input_item| async move {
208+ block_on_spawn_all ( self . input_options . input . iter ( ) . map ( |input_item| async move {
208209 let specifier = & input_item. import ;
209210 match resolve_id ( resolver, plugin_driver, specifier, None , false ) . await {
210211 Ok ( r) => {
@@ -220,8 +221,7 @@ impl<'a, T: FileSystemExt + 'static + Default> ModuleLoader<'a, T> {
220221 }
221222 Err ( e) => Err ( e) ,
222223 }
223- } ) )
224- . await ;
224+ } ) ) ;
225225
226226 let mut errors = BatchedErrors :: default ( ) ;
227227
0 commit comments