Skip to content

Commit 84fb168

Browse files
Avoid panicking on missing fallback
This just prints a message but continues on if a fallback is missing, which can happen when we're building a partial set of builders and producing a dev-static build from it (e.g., when no Apple builder runs at all). Probably the more extensive fix is to allow the build-manifest invoker to specify the expected set of targets & hosts, but that's a far more extensive change. The main risk from this is that we accidentally start falling back to linux docs across all platforms without noticing. I'm not sure that we can do much about that though at this time.
1 parent a29f341 commit 84fb168

File tree

1 file changed

+12
-2
lines changed
  • src/tools/build-manifest/src

1 file changed

+12
-2
lines changed

src/tools/build-manifest/src/main.rs

+12-2
Original file line numberDiff line numberDiff line change
@@ -543,8 +543,18 @@ impl Builder {
543543
for (substr, fallback_target) in fallback {
544544
if target_name.contains(substr) {
545545
let t = Target::from_compressed_tar(self, &tarball_name!(fallback_target));
546-
// Fallbacks must always be available.
547-
assert!(t.available);
546+
// Fallbacks should typically be available on 'production' builds
547+
// but may not be available for try builds, which only build one target by
548+
// default. Ideally we'd gate this being a hard error on whether we're in a
549+
// production build or not, but it's not information that's readily available
550+
// here.
551+
if !t.available {
552+
eprintln!(
553+
"{:?} not available for fallback",
554+
tarball_name!(fallback_target)
555+
);
556+
continue;
557+
}
548558
return t;
549559
}
550560
}

0 commit comments

Comments
 (0)