@@ -19,23 +19,32 @@ fn render_filename<P: AsRef<Path>>(path: P, basedir: Option<&str>) -> CargoResul
19
19
relpath. to_str ( ) . ok_or_else ( || internal ( "path not utf-8" ) ) . map ( |f| f. replace ( " " , "\\ " ) )
20
20
}
21
21
22
- fn add_deps_for_unit < ' a , ' b > ( deps : & mut HashSet < PathBuf > , context : & mut Context < ' a , ' b > ,
23
- unit : & Unit < ' a > , visited : & mut HashSet < Unit < ' a > > ) -> CargoResult < ( ) >
22
+ fn add_deps_for_unit < ' a , ' b > (
23
+ deps : & mut HashSet < PathBuf > ,
24
+ context : & mut Context < ' a , ' b > ,
25
+ unit : & Unit < ' a > ,
26
+ visited : & mut HashSet < Unit < ' a > > ,
27
+ )
28
+ -> CargoResult < ( ) >
24
29
{
25
30
if !visited. insert ( * unit) {
26
31
return Ok ( ( ) ) ;
27
32
}
28
33
29
- // Add dependencies from rustc dep-info output (stored in fingerprint directory)
30
- let dep_info_loc = fingerprint:: dep_info_loc ( context, unit) ;
31
- if let Some ( paths) = fingerprint:: parse_dep_info ( & dep_info_loc) ? {
32
- for path in paths {
33
- deps. insert ( path) ;
34
+ // units representing the execution of a build script don't actually
35
+ // generate a dep info file, so we just keep on going below
36
+ if !unit. profile . run_custom_build {
37
+ // Add dependencies from rustc dep-info output (stored in fingerprint directory)
38
+ let dep_info_loc = fingerprint:: dep_info_loc ( context, unit) ;
39
+ if let Some ( paths) = fingerprint:: parse_dep_info ( & dep_info_loc) ? {
40
+ for path in paths {
41
+ deps. insert ( path) ;
42
+ }
43
+ } else {
44
+ debug ! ( "can't find dep_info for {:?} {:?}" ,
45
+ unit. pkg. package_id( ) , unit. profile) ;
46
+ return Err ( internal ( "dep_info missing" ) ) ;
34
47
}
35
- } else {
36
- debug ! ( "can't find dep_info for {:?} {:?}" ,
37
- unit. pkg. package_id( ) , unit. profile) ;
38
- return Err ( internal ( "dep_info missing" ) ) ;
39
48
}
40
49
41
50
// Add rerun-if-changed dependencies
0 commit comments