Skip to content

Commit 80bacd3

Browse files
committed
Auto merge of #584 - ehuss:dont-uninstall-stable, r=pietroalbini
Don't uninstall the stable toolchain. #572 added some code to uninstall existing toolchains. However, this caused the `stable` toolchain to always be uninstalled. This toolchain is used for installing tools like rustup-toolchain-install-master. Uninstalling it causes it to be redownloaded every time crater is run locally, making it difficult to use it locally since it can take about a minute for me to download. Pietro said to add a test for stable here. Unfortunately rustwide doesn't provide public access to anything other than the display impl to test this. I can make some changes to rustwide if a cleaner approach is desired.
2 parents c414d73 + 2492a1f commit 80bacd3

File tree

3 files changed

+6
-4
lines changed

3 files changed

+6
-4
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ hmac = "0.7"
6060
sha-1 = "0.8"
6161
rust_team_data = { git = "https://github.com/rust-lang/team" }
6262
systemstat = "0.1.4"
63-
rustwide = { version = "0.13.1", features = ["unstable", "unstable-toolchain-ci"] }
63+
rustwide = { version = "0.14.0", features = ["unstable", "unstable-toolchain-ci"] }
6464
percent-encoding = "2.1.0"
6565
remove_dir_all = "0.5.2"
6666
ctrlc = "3.1.3"

src/runner/mod.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,9 @@ pub fn run_ex<DB: WriteResults + Sync>(
7070
// proceed slightly faster than it would otherwise.
7171
for tc in workspace.installed_toolchains()? {
7272
// But don't uninstall it if we're going to reinstall in a couple lines.
73-
if !ex.toolchains.iter().any(|t| tc == t.source) {
73+
// And don't uninstall stable, since that is mainly used for
74+
// installing tools.
75+
if !tc.is_needed_by_rustwide() && !ex.toolchains.iter().any(|t| tc == t.source) {
7476
tc.uninstall(workspace)?;
7577
}
7678
}

0 commit comments

Comments
 (0)