Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.

Commit 913a3b3

Browse files
committed
Don't produce nightlies missing the RLS
1 parent 348980b commit 913a3b3

File tree

2 files changed

+31
-7
lines changed

2 files changed

+31
-7
lines changed

Cargo.lock

Lines changed: 7 additions & 7 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

promote-release/src/main.rs

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@ impl Context {
134134
return println!("version hasn't changed, skipping");
135135
}
136136

137+
self.assert_all_components_present();
138+
137139
// Ok we've now determined that a release needs to be done. Let's
138140
// configure rust, sign the artifacts we just downloaded, and upload the
139141
// signatures to the CI bucket.
@@ -251,6 +253,28 @@ upload-addr = \"{}/{}\"
251253
prev_version == current_version
252254
}
253255

256+
/// An emergency fix for the current situation where the RLS isn't available
257+
/// too often. Don't produce nightlies if a missing component happens.
258+
///
259+
/// Note that we already shouldn't merge PRs in rust-lang/rust that don't
260+
/// build the rls/rustfmt
261+
fn assert_all_components_present(&self) {
262+
if self.release != "nightly" {
263+
return
264+
}
265+
let components = t!(self.dl_dir().read_dir())
266+
.map(|e| t!(e))
267+
.map(|e| e.file_name().into_string().unwrap())
268+
.filter(|s| s.contains("x86_64-unknown-linux-gnu"))
269+
.collect::<Vec<_>>();
270+
println!("components in this nightly {:?}", components);
271+
assert!(components.iter().any(|s| s.starts_with("rls-")));
272+
assert!(components.iter().any(|s| s.starts_with("rustfmt-")));
273+
assert!(components.iter().any(|s| s.starts_with("rustc-")));
274+
assert!(components.iter().any(|s| s.starts_with("rust-std-")));
275+
assert!(components.iter().any(|s| s.starts_with("cargo-")));
276+
}
277+
254278
fn download_artifacts(&mut self, rev: &str) {
255279
let dl = self.dl_dir();
256280
drop(fs::remove_dir_all(&dl));

0 commit comments

Comments
 (0)