Closed
Description
It has been impressed into me several times that there are no good defaults for everyone. Instead, what if people could choose their own defaults, but in a guided way? I'm imagining something like this:
$ x.py setup
Welcome to the Rust project! What do you want to do with x.py?
a) Contribute to the standard library
b) Contribute to the compiler
c) Install Rust from source
Please choose one (a/b/c): b
Changed the following settings:
- `incremental = true`
- `debug = true`
Do you plan to modify codegen/LLVM? (y/[n]): n
# maybe some magic with $(which llvm-config) here; but won't be necessary after https://github.com/rust-lang/rust/pull/76349
To get started, try one of the following commands:
- `x.py check`
- `x.py build library/std`
- `x.py test src/test/ui`
This would be entirely opt-in, if you don't like it, just don't run the command and modify config.toml.example
as before. This would work best in conjunction with #76165, but does not require it.
Activity
jyn514 commentedon Sep 9, 2020
Oh, another thing this would make easier is #76446 - instead of messing around with RUSTC_BOOTSTRAP or other env variables, the criteria would just be 'have you run x.py setup in the past' (maybe with a switch in config.toml actually controlling the state).
thomcc commentedon Sep 9, 2020
This reminds me a lot of
./mach bootstrap
from mozilla-central (one of the things it does anyway — it also installs build dependencies which isn't relevant here), which is pretty good and what inspired my suggestion.jyn514 commentedon Sep 11, 2020
Another idea I had just now was to suggest running
x.py setup
the very first time you run x.py to make it more discoverable. This would be opt-out by running with-q
the first time to hide the warning. I expect only distro maintainers to use the-q
option since they're running x.py for the first time a lot; everyone else will only ever run it once.x.py setup
#76631x.py
#76619Rollup merge of rust-lang#76631 - jyn514:x.py-setup, r=Mark-Simulacrum
Rollup merge of rust-lang#76631 - jyn514:x.py-setup, r=Mark-Simulacrum
Rollup merge of rust-lang#76631 - jyn514:x.py-setup, r=Mark-Simulacrum