Skip to content

Commit 881fa5b

Browse files
authored
Rollup merge of #124899 - RalfJung:bootstrap-dry, r=onur-ozkan
bootstrap: add comments for the automatic dry run
2 parents 69122f1 + 87c09fe commit 881fa5b

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

Diff for: src/bootstrap/src/core/builder.rs

+3
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash {
8888

8989
/// Primary function to execute this rule. Can call `builder.ensure()`
9090
/// with other steps to run those.
91+
///
92+
/// This gets called twice during a normal `./x.py` execution: first
93+
/// with `dry_run() == true`, and then for real.
9194
fn run(self, builder: &Builder<'_>) -> Self::Output;
9295

9396
/// When bootstrap is passed a set of paths, this controls whether this rule

Diff for: src/bootstrap/src/lib.rs

+2
Original file line numberDiff line numberDiff line change
@@ -683,6 +683,8 @@ impl Build {
683683

684684
if !self.config.dry_run() {
685685
{
686+
// We first do a dry-run. This is a sanity-check to ensure that
687+
// steps don't do anything expensive in the dry-run.
686688
self.config.dry_run = DryRun::SelfCheck;
687689
let builder = builder::Builder::new(self);
688690
builder.execute_cli();

0 commit comments

Comments
 (0)