Add different entry points for x.py #80596
Labels
A-contributor-roadblock
Area: Makes things more difficult for new contributors to rust itself
C-feature-request
Category: A feature request, i.e: not implemented / a PR.
T-bootstrap
Relevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
Summary
As shown by #78466, https://internals.rust-lang.org/t/experience-report-contributing-to-rust-lang-rust/12012, and #59864 (comment) have shown, people are still having trouble with bootstrapping even after the changes to defaults and the new explanations in the bootstrapping chapter of the dev-guide. Part of the issue is that x.py's job is inherently complicated, and that most of the commands are ambiguous once you take stages into account. It would be great to have smaller commands that are focused on specific groups of contributors, so you can choose the build steps unambiguously and give helpful errors when they don't make sense.
Proposed Solution
Have an
x.py
in many different directories that has settings for that directory. For example,library/x.py build
would be the same asx.py build library/test --stage 0
today, andlibrary/x.py doc
would be the same asx.py doc --stage 0 library/std
today. For other more complicated tools, the defaults would be different:src/tools/rustdoc/x.py doc
would be the same asx.py doc --stage 1
,compiler/x.py build
would be the same asx.py build --stage 1 library/std
.These are the entrypoints I propose:
The top-level x.py would still be the same as it is today.
For library/ especially, I think this would be a low-maintenance, high-impact way to greatly simplify the build process.
The text was updated successfully, but these errors were encountered: