@@ -19,7 +19,6 @@ use cargo_metadata::{DependencyKind, MetadataCommand};
1919use color_eyre:: eyre:: { bail, eyre, OptionExt , Result } ;
2020use fil_actor_bundler:: Bundler ;
2121use fs_err as fs;
22- use std:: collections:: HashSet ;
2322use std:: io:: { BufRead , BufReader } ;
2423use std:: ops:: Deref ;
2524use std:: path:: { Path , PathBuf } ;
@@ -220,7 +219,7 @@ fn build_all_wasm_blobs(
220219 . iter ( )
221220 . map ( |actor| format ! ( "-p={}" , actor. package_name) ) ;
222221
223- echo ! ( "actors-custom-car" , purple, "Target: {channel} {target}" ) ;
222+ echo ! ( "actors-custom-car" , purple, "Target: channel= {channel} target= {target}" ) ;
224223
225224 let rustup = which:: which ( "rustup" ) ?;
226225
@@ -293,9 +292,9 @@ fn print_cargo_rerun_if_dependency_instructions(
293292 let cargo_lock = find_cargo_lock ( out_dir) . ok_or_eyre ( "Couldn't find Cargo.lock" ) ?;
294293 rerun_if_changed ( & cargo_lock) ;
295294
296- let workspace = cargo_lock. parent ( ) . unwrap ( ) ;
295+ let workspace_dir = cargo_lock. parent ( ) . expect ( "A file always should have a parent" ) ;
297296
298- let metadata = create_metadata_command ( workspace . join ( "Cargo.toml" ) ) . exec ( ) ?;
297+ let metadata = create_metadata_command ( workspace_dir . join ( "Cargo.toml" ) ) . exec ( ) ?;
299298
300299 let package = metadata
301300 . packages
@@ -307,7 +306,7 @@ fn print_cargo_rerun_if_dependency_instructions(
307306 let mut dependencies = Vec :: from_iter ( package. dependencies . iter ( ) ) ;
308307
309308 // Collect all packages by follow the dependencies of all packages we find.
310- let mut packages = HashSet :: new ( ) ;
309+ let mut packages = indexmap :: IndexSet :: new ( ) ;
311310 packages. insert ( DeduplicatePackage :: from ( package) ) ;
312311
313312 while let Some ( dependency) = dependencies. pop ( ) {
@@ -325,7 +324,7 @@ fn print_cargo_rerun_if_dependency_instructions(
325324 let maybe_package = metadata
326325 . packages
327326 . iter ( )
328- . filter ( |p| !p. manifest_path . starts_with ( workspace ) )
327+ . filter ( |p| !p. manifest_path . starts_with ( workspace_dir ) )
329328 . find ( |p| {
330329 // Check that the name matches and that the version matches or this is
331330 // a git or path dep. A git or path dependency can only occur once, so we don't
0 commit comments