Skip to content

Commit 2a1ed47

Browse files
committed
Auto merge of #148987 - Zalathar:is-default, r=jieyouxu
bootstrap: Replace `Step::DEFAULT` and `default_condition` with `is_default_step` - Revised and expanded version of rust-lang/rust#148965 --- One of the confusing things about bootstrap's `Step::should_run` is that it combines two loosely-related but non-overlapping responsibilities: - Registering paths/aliases to decide whether a step should be run in response to paths/aliases passed as explicit command-line arguments - When the user invokes `./x test compiler`, this allows bootstrap to know what steps “compiler” should translate into - Deciding whether a step marked `DEFAULT = true` should actually run or not, when no paths/aliases are explicitly specified - When the user invokes `./x test`, this allows bootstrap to know which steps to run by default This PR therefore splits out the latter of those responsibilities into a dedicated `is_default_step` associated function, which also replaces the existing `DEFAULT` associated constant. A small number of steps were using `ShouldRun::lazy_default_condition` to specify a condition that should not be run repeatedly if possible, e.g. because it queries external tools. Those steps now perform memoization via fields in `Builder` instead. r? jieyouxu
2 parents c2f66d5 + 411ab65 commit 2a1ed47

File tree

0 file changed

+0
-0
lines changed

    0 file changed

    +0
    -0
    lines changed

    0 commit comments

    Comments
     (0)