File tree 2 files changed +5
-0
lines changed
2 files changed +5
-0
lines changed Original file line number Diff line number Diff line change @@ -88,6 +88,9 @@ pub trait Step: 'static + Clone + Debug + PartialEq + Eq + Hash {
88
88
89
89
/// Primary function to execute this rule. Can call `builder.ensure()`
90
90
/// 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.
91
94
fn run ( self , builder : & Builder < ' _ > ) -> Self :: Output ;
92
95
93
96
/// When bootstrap is passed a set of paths, this controls whether this rule
Original file line number Diff line number Diff line change @@ -683,6 +683,8 @@ impl Build {
683
683
684
684
if !self . config . dry_run ( ) {
685
685
{
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.
686
688
self . config . dry_run = DryRun :: SelfCheck ;
687
689
let builder = builder:: Builder :: new ( self ) ;
688
690
builder. execute_cli ( ) ;
You can’t perform that action at this time.
0 commit comments