Skip to content

Commit

Permalink
Rollup merge of rust-lang#113551 - jyn514:dry-run-exclude, r=ozkanonur
Browse files Browse the repository at this point in the history
bootstrap: Don't print "Skipping" twice

Bootstrap executes itself twice: once with DryRun::SelfCheck and DryRun::Disabled. Change it not to print the "Skipping" message if SelfCheck is enabled.

See https://github.com/rust-lang/rust/actions/runs/5503931599/jobs/10029625567?pr=113514#step:24:772.
  • Loading branch information
matthiaskrgr authored Jul 10, 2023
2 parents 3413ace + 8c91c8f commit 40b1c5b
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/bootstrap/builder.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ use std::process::Command;
use std::time::{Duration, Instant};

use crate::cache::{Cache, Interned, INTERNER};
use crate::config::{SplitDebuginfo, TargetSelection};
use crate::config::{DryRun, SplitDebuginfo, TargetSelection};
use crate::doc;
use crate::flags::{Color, Subcommand};
use crate::install;
Expand Down Expand Up @@ -281,11 +281,15 @@ impl StepDescription {

fn is_excluded(&self, builder: &Builder<'_>, pathset: &PathSet) -> bool {
if builder.config.exclude.iter().any(|e| pathset.has(&e, builder.kind)) {
println!("Skipping {:?} because it is excluded", pathset);
if !matches!(builder.config.dry_run, DryRun::SelfCheck) {
println!("Skipping {:?} because it is excluded", pathset);
}
return true;
}

if !builder.config.exclude.is_empty() {
if !builder.config.exclude.is_empty()
&& !matches!(builder.config.dry_run, DryRun::SelfCheck)
{
builder.verbose(&format!(
"{:?} not skipped for {:?} -- not in {:?}",
pathset, self.name, builder.config.exclude
Expand Down

0 comments on commit 40b1c5b

Please sign in to comment.