Skip to content

Commit b08c8cb

Browse files
authored
Rollup merge of #101952 - Mark-Simulacrum:missing-fallback, r=ehuss
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. cc `@ehuss` since IIRC you participated in adding this system This comes up when building a test nightly from a try build, e.g., #101855 (comment). For now I'm going to manually cherry pick this onto that PR for testing purposes.
2 parents 9062b78 + 84fb168 commit b08c8cb

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)