]> git.lizzy.rs Git - rust.git/commitdiff
Rollup merge of #104952 - jyn514:setup, r=Mark-Simulacrum
authorMatthias Krüger <matthias.krueger@famsik.de>
Mon, 5 Dec 2022 19:43:41 +0000 (20:43 +0100)
committerGitHub <noreply@github.com>
Mon, 5 Dec 2022 19:43:41 +0000 (20:43 +0100)
Streamline the user experience for `x.py setup`

## Don't update submodules for x setup

Before, the submodule handling was very jank and would update *between two interactive prompts*:
```
; x setup
Building rustbuild
    Finished dev [unoptimized] target(s) in 0.05s
Welcome to the Rust project! What do you want to do with x.py?
a) library: Contribute to the standard library
Please choose one (a/b/c/d/e): a
Updating submodule library/backtrace
Submodule 'library/backtrace' (https://github.com/rust-lang/backtrace-rs.git) registered for path 'library/backtrace'
error: you asked `x.py` to setup a new config file, but one already exists at `config.toml`
Build completed unsuccessfully in 0:00:02
```

That's not a great user experience because you need to wait a long time between prompts.
It would be possible to move the submodule handling either before or after the prompt, but it seems
better to just not require submodules to be checked out at all, to minimize the time spend waiting
just to create a new configuration.

## Revamp the order setup executes

- Create `config.toml` last. It's the most likely to error, and used to stop later steps from executing
- Don't print an error message + exit if the git hook already exists; that's expected

1  2 
src/bootstrap/lib.rs

Simple merge