Skip to content

Add x.py setup or similar #76503

Closed
Closed
@jyn514

Description

@jyn514
Member

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.

cc @Lokathor, @thomcc

Activity

added
T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.
on Sep 9, 2020
jyn514

jyn514 commented on Sep 9, 2020

@jyn514
MemberAuthor

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

thomcc commented on Sep 9, 2020

@thomcc
Member

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

jyn514 commented on Sep 11, 2020

@jyn514
MemberAuthor

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.

added
A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to Rust
on Sep 13, 2020
self-assigned this
on Sep 18, 2020
added 3 commits that reference this issue on Sep 25, 2020

Rollup merge of rust-lang#76631 - jyn514:x.py-setup, r=Mark-Simulacrum

f3a1f7d

Rollup merge of rust-lang#76631 - jyn514:x.py-setup, r=Mark-Simulacrum

0700ab6

Rollup merge of rust-lang#76631 - jyn514:x.py-setup, r=Mark-Simulacrum

c39598a
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

A-contributor-roadblockArea: Makes things more difficult for new or seasoned contributors to RustC-feature-requestCategory: A feature request, i.e: not implemented / a PR.T-bootstrapRelevant to the bootstrap subteam: Rust's build system (x.py and src/bootstrap)

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

    Development

    Participants

    @thomcc@jyn514

    Issue actions

      Add `x.py setup` or similar · Issue #76503 · rust-lang/rust