@@ -796,7 +796,7 @@ impl Fingerprint {
796796 // This path failed to report its `mtime`. It probably doesn't
797797 // exists, so leave ourselves as stale and bail out.
798798 Err ( e) => {
799- log :: debug!( "failed to get mtime of {:?}: {}" , output, e) ;
799+ debug ! ( "failed to get mtime of {:?}: {}" , output, e) ;
800800 return Ok ( ( ) ) ;
801801 }
802802 } ;
@@ -830,26 +830,26 @@ impl Fingerprint {
830830 // If our dependency edge only requires the rmeta file to be present
831831 // then we only need to look at that one output file, otherwise we
832832 // need to consider all output files to see if we're out of date.
833- let dep_mtime = if dep. only_requires_rmeta {
833+ let ( dep_path , dep_mtime) = if dep. only_requires_rmeta {
834834 dep_mtimes
835835 . iter ( )
836- . filter_map ( |( path, mtime) | {
837- if path. extension ( ) . and_then ( |s| s. to_str ( ) ) == Some ( "rmeta" ) {
838- Some ( mtime)
839- } else {
840- None
841- }
836+ . filter ( |( path, _mtime) | {
837+ path. extension ( ) . and_then ( |s| s. to_str ( ) ) == Some ( "rmeta" )
842838 } )
843839 . next ( )
844840 . expect ( "failed to find rmeta" )
845841 } else {
846- match dep_mtimes. values ( ) . max ( ) {
847- Some ( mtime ) => mtime ,
842+ match dep_mtimes. iter ( ) . max_by_key ( |kv| kv . 1 ) {
843+ Some ( dep_mtime ) => dep_mtime ,
848844 // If our dependencies is up to date and has no filesystem
849845 // interactions, then we can move on to the next dependency.
850846 None => continue ,
851847 }
852848 } ;
849+ debug ! (
850+ "max dep mtime for {:?} is {:?} {}" ,
851+ pkg_root, dep_path, dep_mtime
852+ ) ;
853853
854854 // If the dependency is newer than our own output then it was
855855 // recompiled previously. We transitively become stale ourselves in
@@ -861,7 +861,7 @@ impl Fingerprint {
861861 if dep_mtime > max_mtime {
862862 info ! (
863863 "dependency on `{}` is newer than we are {} > {} {:?}" ,
864- dep. pkg_id , dep_mtime, max_mtime, pkg_root
864+ dep. name , dep_mtime, max_mtime, pkg_root
865865 ) ;
866866 return Ok ( ( ) ) ;
867867 }
@@ -1410,6 +1410,7 @@ fn compare_old_fingerprint(
14101410 if mtime_on_use {
14111411 // update the mtime so other cleaners know we used it
14121412 let t = FileTime :: from_system_time ( SystemTime :: now ( ) ) ;
1413+ debug ! ( "mtime-on-use forcing {:?} to {}" , loc, t) ;
14131414 filetime:: set_file_times ( loc, t, t) ?;
14141415 }
14151416
0 commit comments