-
Notifications
You must be signed in to change notification settings - Fork 13.7k
Description
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 as x.py build library/test --stage 0
today, and library/x.py doc
would be the same as x.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 as x.py doc --stage 1
, compiler/x.py build
would be the same as x.py build --stage 1 library/std
.
These are the entrypoints I propose:
.
├── compiler
│ ├── rustc
│ └── x.py
├── library
│ ├── std
│ └── x.py
├── Makefile
├── src
│ └── tools
│ └── rustdoc
│ └── x.py
└── x.py
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.