rustbuild: check for final stage properly and so on #38752
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The current non-full-bootstrap build is not stopped at stage1, but rather it's faking a stage2 and making adjustments for that here and there with the
force_use_stage1
usage. This is causing major headache and for example, contributed to the partial fix of #38736 which fixed the envvar setup inlib.rs
but failed to account for the broken contract indist.rs
. I was in a hurry so I didn't actually run./x.py dist
but instead was only looking for the environment variable, so that oversight also went unnoticed. The fact that the bug even survived code review and gotr+
'd is also highly indicative of the situation right now.Let's clean this up by properly stopping at stage1 for non-full-bootstrap builds. Stage dependency is properly indicated to the
dist
rules, and default stage for top-level steps are configured from build config instead of being hardcoded to 2.With that I did a
./x.py dist
(with channel set tonightly
to observedist-analysis
) and IMO it's working as desired:bootstrap plan of
dist
:ls build/dist
:And with that the
force_use_stage1
workaround could be dropped altogether, but I'm yet to do that. Hopefully we can at least get a2017-01-02
nightly for everyone's rustup pleasure...r? @alexcrichton (Sorry for so many rustbuild PRs and bugs introduced by my forgetfulness. I'm always trying to understand everything up there but sometimes I do forget details.)