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

Fixing janky line breaks in self_updater.rs #2336

Closed
wants to merge 39 commits into from

Conversation

VladKou
Copy link
Contributor

@VladKou VladKou commented May 17, 2020

Fixes #2343 #2334 - janky line breaks in the %USERPROFILE% path help string.

New line breaks:

image

Fixing janky line breaks in the self-updater path help string, as reported in rust-lang#2334
Fixing janky line breaks in the %USERPROFILE% path help string, as reported in rust-lang#2334
@kinnison
Copy link
Contributor

I'm fine with this rearrangement but you need to clean up your commits into a single neat commit please, I won't merge it in its current state.

tesuji and others added 24 commits May 20, 2020 12:35
    Updating crates.io index
    Updating aho-corasick v0.7.6 -> v0.7.10
    Removing anyhow v1.0.26
    Updating async-compression v0.2.0 -> v0.3.2
    Updating atty v0.2.13 -> v0.2.14
      Adding autocfg v1.0.0
    Updating backtrace v0.3.40 -> v0.3.46
    Updating backtrace-sys v0.1.32 -> v0.1.36
    Updating block-padding v0.1.4 -> v0.1.5
    Updating bumpalo v2.6.0 -> v3.2.1
    Updating byteorder v1.3.2 -> v1.3.4
    Updating bytes v0.5.2 -> v0.5.4
    Removing c2-chacha v0.2.3
    Updating cc v1.0.46 -> v1.0.52
    Updating chrono v0.4.9 -> v0.4.11
    Updating core-foundation v0.6.4 -> v0.7.0
    Updating core-foundation-sys v0.6.2 -> v0.7.0
    Updating curl v0.4.25 -> v0.4.28
    Updating curl-sys v0.4.23 -> v0.4.30+curl-7.69.1
    Updating dtoa v0.4.4 -> v0.4.5
    Updating encoding_rs v0.8.20 -> v0.8.22
    Updating failure v0.1.6 -> v0.1.7
    Updating failure_derive v0.1.6 -> v0.1.7
    Updating filetime v0.2.7 -> v0.2.9
    Updating flate2 v1.0.12 -> v1.0.14
    Updating futures-channel v0.3.1 -> v0.3.4
    Updating futures-core v0.3.1 -> v0.3.4
    Updating futures-io v0.3.1 -> v0.3.4
    Updating futures-sink v0.3.1 -> v0.3.4
    Updating futures-task v0.3.1 -> v0.3.4
    Updating futures-util v0.3.1 -> v0.3.4
    Updating getrandom v0.1.12 -> v0.1.14
    Updating h2 v0.2.1 -> v0.2.4
    Removing heck v0.3.1
      Adding hermit-abi v0.1.11
    Updating hex v0.4.0 -> v0.4.2
    Updating home v0.5.1 -> v0.5.3
    Updating http v0.2.0 -> v0.2.1
    Updating http-body v0.3.0 -> v0.3.1
    Updating hyper v0.13.0 -> v0.13.5
    Updating hyper-tls v0.4.0 -> v0.4.1
    Updating indexmap v1.3.0 -> v1.3.2
    Updating itoa v0.4.4 -> v0.4.5
    Updating js-sys v0.3.33 -> v0.3.37
    Updating libc v0.2.67 -> v0.2.69
    Updating memchr v2.2.1 -> v2.3.3
    Updating mime v0.3.14 -> v0.3.16
    Updating mime_guess v2.0.1 -> v2.0.3
    Updating miniz_oxide v0.3.3 -> v0.3.6
    Updating native-tls v0.2.3 -> v0.2.4
    Updating num-integer v0.1.41 -> v0.1.42
    Updating num-iter v0.1.39 -> v0.1.40
    Updating num-traits v0.2.8 -> v0.2.11
    Updating num_cpus v1.10.1 -> v1.13.0
    Updating openssl v0.10.25 -> v0.10.29
    Updating openssl-src v111.6.0+1.1.1d -> v111.9.0+1.1.1g
    Updating openssl-sys v0.9.52 -> v0.9.55
    Updating pgp v0.4.0 -> v0.4.1
    Updating pin-project v0.4.6 -> v0.4.9
    Updating pin-project-internal v0.4.6 -> v0.4.9
    Updating pin-project-lite v0.1.1 -> v0.1.4
    Updating pin-utils v0.1.0-alpha.4 -> v0.1.0
    Updating pkg-config v0.3.16 -> v0.3.17
    Updating pulldown-cmark v0.6.0 -> v0.6.1
    Updating quote v1.0.2 -> v1.0.3
    Updating rand_chacha v0.2.1 -> v0.2.2
    Updating regex v1.3.1 -> v1.3.7
    Updating regex-syntax v0.6.12 -> v0.6.17
    Updating reqwest v0.10.0 -> v0.10.4
    Updating ryu v1.0.2 -> v1.0.4
    Updating same-file v1.0.5 -> v1.0.6
    Updating schannel v0.1.16 -> v0.1.18
    Updating scopeguard v1.0.0 -> v1.1.0
    Updating security-framework v0.3.1 -> v0.4.3
    Updating security-framework-sys v0.3.1 -> v0.4.3
    Updating serde v1.0.101 -> v1.0.106
    Updating serde_derive v1.0.104 -> v1.0.106
    Updating serde_json v1.0.41 -> v1.0.51
    Updating sha-1 v0.8.1 -> v0.8.2
    Updating sha2 v0.8.0 -> v0.8.1
    Updating smallvec v1.0.0 -> v1.4.0
    Updating socket2 v0.3.11 -> v0.3.12
    Removing sourcefile v0.1.4
    Updating strsim v0.9.2 -> v0.9.3
    Updating subtle v2.2.1 -> v2.2.2
    Updating synstructure v0.12.1 -> v0.12.3
    Updating thread_local v0.3.6 -> v1.0.1
    Updating threadpool v1.7.1 -> v1.8.0
    Updating time v0.1.42 -> v0.1.43
    Updating tokio v0.2.4 -> v0.2.19
    Updating tokio-util v0.2.0 -> v0.3.1
    Updating toml v0.5.3 -> v0.5.6
    Updating typenum v1.11.2 -> v1.12.0
    Updating unicase v2.5.1 -> v2.6.0
    Updating unicode-normalization v0.1.11 -> v0.1.12
    Removing unicode-segmentation v1.6.0
    Updating unicode-width v0.1.6 -> v0.1.7
    Updating url v2.1.0 -> v2.1.1
    Updating vcpkg v0.2.7 -> v0.2.8
    Updating walkdir v2.2.9 -> v2.3.1
    Updating wasi v0.7.0 -> v0.9.0+wasi-snapshot-preview1
    Updating wasm-bindgen v0.2.56 -> v0.2.60
    Updating wasm-bindgen-backend v0.2.56 -> v0.2.60
    Updating wasm-bindgen-futures v0.4.6 -> v0.4.10
    Updating wasm-bindgen-macro v0.2.56 -> v0.2.60
    Updating wasm-bindgen-macro-support v0.2.56 -> v0.2.60
    Updating wasm-bindgen-shared v0.2.56 -> v0.2.60
    Removing wasm-bindgen-webidl v0.2.56
    Updating web-sys v0.3.33 -> v0.3.37
    Removing weedle v0.10.0
    Updating winapi-util v0.1.2 -> v0.1.5

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Before this PR, the help message is:

```
Cargo's bin directory, located at:

        {cargo_home_bin}

This can be modified with the CARGO_HOME environment variable.
```

above **WILL** potentially mislead the user to set `CARGO_HOME` to `{cargo_home_bin}`, which is wrong.

This PR clearify the concept of `the Cargo home directory`, to separate from `Cargo's bin directory`, in fact, it's 2 different concepts and folders.
Currently when updating and skipping nightlies due to missing required
components only one such missing component is shown. Users might consider
removing the requirement for the component and updating to the specific
nightly that was missing it, only to find out that there is another, newly
discovered missing component.

With this change all required and missing components are shown when a
nightly is skipped, so users might be able to quickly identify which
nightly version, if any, has an acceptable set of missing components.

Signed-off-by: Alejandro Martinez Ruiz <amr@redhat.com>
Reverts the shebang change in 6b4283f and adds a shellcheck directive
to suppress warnings about POSIX validity and prevent further drift.

The POSIX standard is not, despite its name, a reliable guide to what
features are actually standard, even for POSIX shells. rustup-init.sh
uses `local`, a non-POSIX extension supported by all POSIX shells known
in common use. Thus, it is fine to run it with #!/bin/sh instead.

The Debian Almquist shell is not the only POSIX shell but it is very
common, so is a useful proxy for whether the script actually runs for
non-bash shells.
To begin the work of supporting snaps of rustup, we need to
first ensure we can build the snaps in the first place.

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Direct access to the S3 bucket will eventually be removed.
check_help_for can fail as soon as the first sign of not meeting the check happens.
These don't really matter but might as well have a newer toolchain if folks are trying stuff.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
kinnison and others added 10 commits May 20, 2020 12:35
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Before this commit the "Welcome to Rust!" text was:

```
This path will then be added to your PATH environment variable by
modifying the profile files located at:

  /Users/alexander/.profile
/Users/alexander/.zprofile
```

Notice the second line of the code block is not indented.
This is because the `Text` is passed to us as a single
`&str` (which contains newlines). We need to split the
text and call `LineWrapper.write_indent()` for each line.
…lchain

Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Co-authored-by: Daniel Silverstone <dsilvers@digital-scurf.org>
Co-authored-by: Daniel Silverstone <dsilvers@digital-scurf.org>
@VladKou
Copy link
Contributor Author

VladKou commented May 20, 2020

Coming from the p4 world, squishing commits in git's being a bit of a nightmare.

Should I close this PR, wipe out my local branch, and try again?

@workingjubilee
Copy link
Contributor

workingjubilee commented May 20, 2020

You can do that, but
I would suggest you pop off the merge commit you did and use git rebase -i HEAD~5
this will drop you into a text editor to run an interactive rebase on the last ~5 commits and squash the ones you want to squash. then you can git push --force and maybe git pull origin master --rebase to get back up to current.

@kinnison
Copy link
Contributor

If you are unable to get it to work (it's a skill you'll want going forward, and I know how confusing it can be at first) then let me know and I'll rebase it for you.

@VladKou
Copy link
Contributor Author

VladKou commented May 23, 2020

Yes, git's a valuable skill, and I'll give it some time today to figure this out. I appreciate your patience.

@kinnison
Copy link
Contributor

kinnison commented Jul 6, 2020

This work needs rebasing again, and the commit sequence cleaning up. We just released 1.22.0 and it'd be nice to get this fixed by 1.23.0

@kinnison kinnison added this to the 1.23.0 milestone Jul 6, 2020
@rbtcollins
Copy link
Contributor

I've done a rebase, as far as I can tell only the last commit was the actual content; the branch is #2420

@kinnison
Copy link
Contributor

I think it was more that the first few commits were the real content, the rest was a merge commit mess.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Poor line breaks on Windows