about summary refs log tree commit diff
path: root/src/bootstrap/setup.rs
AgeCommit message (Collapse)AuthorLines
2022-03-11Remove redundant slicing of whole ranges in `bootstrap`pierwill-5/+5
2022-03-07Don't depend on python for RUST_BOOTSTRAP_CONFIGJoshua Nelson-11/+9
2022-02-07Rollup merge of #93487 - yerke:yerke/fix-link-toolchain-in-setup, ↵Mara Bos-2/+39
r=Mark-Simulacrum Fix linking stage1 toolchain in `./x.py setup` Closes [92319](https://github.com/rust-lang/rust/issues/92319) Fix linking stage1 toolchain in `./x.py setup`. I guess this can be considered a follow up to https://github.com/rust-lang/rust/pull/89212 by `````@Sl1mb0.````` We create 2 directories and 1 file that are required by rustup to [link a custom toolchain from path](https://github.com/rust-lang/rustup/blob/5225e87a5d974ab5f1626bcb2a7b43f76ab883f0/src/toolchain.rs#L479-L497). cc `````@jyn514````` and `````@Mark-Simulacrum````` as they were active in https://github.com/rust-lang/rust/issues/89206
2022-02-07Rollup merge of #88313 - jyn514:pre-push, r=Mark-SimulacrumMara Bos-6/+6
Make the pre-commit script pre-push instead This should make it substantially less annoying, and hopefully more people will find it useful. In particular, it will no longer run tidy each time you run `git commit --amend` or rebase a branch. This also warns if you have the old script in pre-commit; see the HACK comment for details. r? ````@Mark-Simulacrum```` cc ````@caass````
2022-02-05fix linking stage1 toolchain in setupYerkebulan Tulibergenov-2/+39
2021-09-26Link stage1 build to toolchain automaticallyTimothy Maloney-0/+80
Fixed types Add checks for rustup and if toolchain is linked Fortified rustup/directory checks; made other suggested changes Added check for output status Remove output of rustup from console Made suggested change Deleted confusing comment Fixed compiler error; removed extra declaration Refactored to smaller components; made suggested changes Automate toolchain linking for stage 1 builds
2021-08-24Make the pre-commit script pre-push insteadJoshua Nelson-6/+6
This should make it substantially less annoying, and hopefully more people will find it useful. In particular, it will no longer run tidy each time you run `git commit --amend` or rebase a branch. This also warns if you have the old script in pre-commit; see the HACK comment for details.
2021-04-05Add config file for tools enabling stage1 downloads by defaultJoshua Nelson-3/+17
Otherwise no one will be able to find the setting.
2020-12-31bootstrap: clippy fixesMatthias Krüger-2/+2
addresses: clippy::or_fun_call clippy::single_char_add_str clippy::comparison_to_empty clippy::or_fun_call
2020-12-08don't wrap code block in Ok() (clipppy::unit_arg)Matthias Krüger-2/+3
2020-11-07Rollup merge of #78514 - jyn514:setup-number, r=Mark-SimulacrumYuki Okushi-6/+9
Allow using 1/2/3/4 for `x.py setup` options This undocumented feature allows you to typo 'a' as '1'. r? ```@Mark-Simulacrum``` cc ```@Lokathor```
2020-10-29Create config.toml in the current directory, not the top-level directoryJoshua Nelson-1/+1
See https://github.com/rust-lang/rust/issues/78509 for discussion.
2020-10-28Allow using 1/2/3/4 for `x.py setup` optionsJoshua Nelson-6/+9
This undocumented feature allows you to typo 'a' as '1'.
2020-10-20Rollup merge of #77778 - jyn514:git-hook, r=mark-simulacrumYuki Okushi-3/+11
[x.py setup] Allow setting up git hooks from other worktrees Closes https://github.com/rust-lang/rust/issues/77684 r? @caass
2020-10-14x.py setup: Avoid infinite loop if stdin is /dev/nullIan Jackson-0/+4
EOF is not an error; it just causes read_line to produce "". Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py setup: Fix handling of wrong interactive inputIan Jackson-1/+1
We need a fresh input buffer each time, or we reuse the previous data (since `read_line` appends). Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py: setup: Offer keywords in interactive promptIan Jackson-2/+2
We understand these profile names because we use .to_str(). Mention them in the question. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14x.py: setup: Refactor to centralise list of profilesIan Jackson-14/+50
Put all()'s otuput in the order we want to print things in, and add a comment about why they are in this order. Provide purpose() and all_for_help(). Use these things everywhere. Move all the abbrev character ("a", "b", etc.) processing into interactive_path. No functional change. Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
2020-10-14Rollup merge of #77786 - jyn514:rustdoc, r=Mark-SimulacrumYuki Okushi-2/+2
Mention rustdoc in `x.py setup` This lets new contributors know which option they should pick; previously it wasn't clear 'compiler' also included rustdoc. Unresolved questions: should this say 'compiler and tools' instead? I don't know of any tools that are modified in-tree other than rustdoc, though. r? @Mark-Simulacrum
2020-10-11Mostly print statements to see where things areWinnie Xiao-3/+4
More print statementsstatements lol Solved the basic case of eliminating check_version ifk_version if subcommand = setup Finished v1 checking out old bootstrap.py checked out old irrelevant files fixed tidy Moved VERSION from bin/main.rs to lib.rs Fixed semicolon return issue x.py fmt
2020-10-10Mention rustdoc in `x.py setup`Joshua Nelson-2/+2
This also allows 'rustdoc' as a string for the compiler profile.
2020-10-10Allow setting up git hooks from other worktreesJoshua Nelson-3/+11
2020-10-07Rollup merge of #77400 - alarsyo:xpy-setup-suggestions, r=jyn514Dylan DPC-29/+63
Fix suggestions for x.py setup #76631 introduced a new `setup` command to x.py By default the command prompts for a profile to use: ``` 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) Contribute to the compiler, and also modify LLVM or codegen d) Install Rust from source ``` and then displays command suggestions, depending on which profile was chosen. However [the mapping between chosen profile](https://github.com/rust-lang/rust/blob/9cba260df0f1c67ea3690035cd5611a7465a1560/src/bootstrap/setup.rs#L75-L85) and [suggestion](https://github.com/rust-lang/rust/blob/9cba260df0f1c67ea3690035cd5611a7465a1560/src/bootstrap/setup.rs#L42-L47) isn't exact, leading to suggestions not being shown if the user presses `c` or `d`. (because "c" is translated to "llvm" and "d" to "maintainer", but suggestions trigger for "codegen" and "user" respectively) A more thorough refactor would stop using "strings-as-type" to make sure this kind of error doesn't happen, but it may be overkill for that kind of "script" program? Tagging the setup command author: @jyn514
2020-10-06Auto merge of #76356 - caass:hooks, r=jyn514bors-0/+47
Add a command to install a git hook to automatically run `x.py test tidy --bless` Some folks (such as myself) would probably find a lot of convenience in a pre-commit hook that automatically runs tidy before committing, to avoid burning CI time learning that your commit wasn't tidy. I'm absolutely positive I have missed some stuff. I basically just got this to where you can run `./x.py run install-git-hook` and then clicked the commit button. Please let me know what else you'd like me to add before this can be merged! [rustc-dev-guide companion PR](https://github.com/rust-lang/rustc-dev-guide/pull/848)
2020-10-06Use String type for Profile parse errorAntoine Martin-9/+4
2020-10-06Show available profiles on errorAntoine Martin-0/+4
2020-10-06Use Profile enum for x.py setupAntoine Martin-29/+64
2020-10-06Fix suggestions for x.py setupAntoine Martin-2/+2
2020-10-05Make changes based on @jyn514's commentsCassandra Fridkin-9/+16
2020-10-05Add install_git_hook_maybe to setup.rsCassandra Fridkin-0/+40
2020-10-04Rename bootstrap/defaults/{config.toml.PROFILE => config.PROFILE.toml}Thom Chiovoloni-2/+2
2020-09-24Add `x.py setup`Joshua Nelson-0/+88
- Suggest `x.py setup` if config.toml doesn't exist yet (twice, once before and once after the build) - Prompt for a profile if not given on the command line - Print the configuration file that will be used - Print helpful starting commands after setup - Link to the dev-guide after finishing - Note that distro maintainers will see the changelog warning