Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Streamline the user experience for x.py setup #104952

Merged
merged 3 commits into from
Dec 6, 2022
Merged

Commits on Nov 26, 2022

  1. 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.
    jyn514 committed Nov 26, 2022
    Configuration menu
    Copy the full SHA
    71fd3ab View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    86251da View commit details
    Browse the repository at this point in the history
  3. 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
    jyn514 committed Nov 26, 2022
    Configuration menu
    Copy the full SHA
    b771d90 View commit details
    Browse the repository at this point in the history