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

Installation profiles #1673

Merged
merged 3 commits into from Sep 11, 2019
Merged

Installation profiles #1673

merged 3 commits into from Sep 11, 2019

Conversation

nrc
Copy link
Member

@nrc nrc commented Feb 26, 2019

No description provided.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A very lightweight review, just to get started getting a feel for the change. Hope my comments are useful.

src/rustup-cli/main.rs Outdated Show resolved Hide resolved
src/rustup-cli/rustup_mode.rs Outdated Show resolved Hide resolved
src/rustup-cli/rustup_mode.rs Outdated Show resolved Hide resolved
src/rustup-cli/rustup_mode.rs Outdated Show resolved Hide resolved
src/rustup-cli/self_update.rs Outdated Show resolved Hide resolved
src/rustup-cli/setup_mode.rs Outdated Show resolved Hide resolved
src/rustup-dist/src/dist.rs Outdated Show resolved Hide resolved
src/rustup-dist/src/manifest.rs Outdated Show resolved Hide resolved
@dwijnand dwijnand mentioned this pull request Mar 4, 2019
3 tasks
@bors
Copy link
Contributor

bors commented Mar 5, 2019

☔ The latest upstream changes (presumably #1616) made this pull request unmergeable. Please resolve the merge conflicts.

@nrc
Copy link
Member Author

nrc commented May 13, 2019

Status update: this branch is updated to master of last week, review comments have been addressed, there a few tests, and most existing tests pass. cargo test --test dist is the main chunk of failing tests (I think there is a bug in the test infra because I merged components and extensions). We also need some new tests to test the profiles functionality and to run cargo fmt.

@nrc nrc changed the title WIP: Profiles Installation profiles May 19, 2019
@kinnison kinnison force-pushed the profiles branch 4 times, most recently from 987d849 to 36941f1 Compare May 26, 2019 16:19
Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to fix where we've lost error message content, and decide what to do about the other two points.

src/dist/dist.rs Outdated

// Non-required components that were required before profiles exist.
pub fn legacy_profile() -> Vec<String> {
["rust-std", "rustc", "cargo", "rust-docs"]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This does not match that the profiles in the now-released channels contain rust-mingw - what are we to do about that?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should add rust-mingw here (it should match what we're doing now by default). We might need to handle it not being present on some platforms, but I don't think that will cause big problems.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay, this means that we also need to decide what we're actually going to need to do regarding rust-mingw in the real world. Currently we fail to install any toolchain other than a mingw one because that component is only available for the mingw targets.


if update.nothing_changes() {
// TODO changes and ,manifest are empty?
eprintln!("update: {:?}", update);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to make a decision about what's going on here

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think this is just a stray TODO and println from my debugging and can be deleted

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unless we're hitting it in a test which is still failing

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Okay we're not hitting it so we can remove this. Currently the test suite passes, though I expect that we need to add some more profile-specific tests.

tests/cli-v2.rs Outdated Show resolved Hide resolved
tests/cli-v2.rs Outdated Show resolved Hide resolved
@kinnison
Copy link
Contributor

@nrc I need your input on the remaining two comments above. One of them (the rust-mingw one) is preventing me from dogfooding the branch on my Linux laptop because, of course, rust-mingw isn't available for linux. What was the intent with including that into the profiles? It's basically impossible to use this on anything other than a mingw install right now, no?

@nrc
Copy link
Member Author

nrc commented Jun 6, 2019

We discussed this in last weeks meeting (and I really should have written these notes sooner, sorry).

We need to handle rust-mingw. It is part of the current set of default components (on Windows only). The best path forward is to add it to the default profile (or should it be minimal), and add a section to the manifest for platform-specifics (probably a table where any component can list the platforms it supports (default is all)). If that table is missing rustup should treat the manifest as if there were no profiles section.

We noted that any missing component should cause update to fail (unless the user supplies --force). The above platform-specifics mechanism should be taken into account.

We also noted that we should remove the legacy profile from this PR. Instead, if there is no profiles section, then we use the 'legacy' set of components as the profile.

We need to decide on what tests we should have to ensure the profiles feature is well-tested.

I'm away this weekend, I hope to have some time for this next week.

@nrc
Copy link
Member Author

nrc commented Jun 12, 2019

So it turns out we don't need to add anything to the manifest. There is a list of components for the rust package which includes components which are temporarily unavailable, but not those which don't exist for a given target

@nrc nrc force-pushed the profiles branch 2 times, most recently from feb1222 to 13738f0 Compare June 15, 2019 05:20
@nrc
Copy link
Member Author

nrc commented Jun 17, 2019

Tests

We should test the following. Note that some of these might have tests in this PR already, or might be tested by existing tests. Each item may be one or more tests, or possibly multiple items can be tested by a single test.

The first useful task is seeing if a test is still needed. The second useful task is implementing the remaining tests.

Install

  • Select a profile => exact set of components installed

Update

  • succeeds
  • same components are there after update

Update with missing components

  • fails
  • with --force it should succeed, when component re-appears it should be installed

Install with missing components

  • succeeds
  • when component is restored, it is installed

Add component

  • component remains after an update

Remove component

  • component remains removed after an update
  • remove, then add works (I don't care whether the component is treated as explicitly or implicitly added)

Add a component to a profile

  • if user has the profile, the component is installed
  • if user has a different profile, the component is not installed
  • if user has already added the component, it does not crash, the component is no longer treated as explicitly added

show profile

  • rustup show profile shows the correct profile
  • even after adding/removing components

set profile

  • show, set, show is correct
  • check components, set, check for added/removed components

@bors
Copy link
Contributor

bors commented Jun 24, 2019

☔ The latest upstream changes (presumably #1890) made this pull request unmergeable. Please resolve the merge conflicts.

@kinnison
Copy link
Contributor

Since I merged the thing which broke the merge, I've pushed a rebase for you.

@nrc
Copy link
Member Author

nrc commented Jul 2, 2019

I ticked a few tests off based on what is already implemented in the PR. We also test 'set profile' with an invalid name.

@kinnison
Copy link
Contributor

kinnison commented Jul 2, 2019

I ticked a few tests off based on what is already implemented in the PR. We also test 'set profile' with an invalid name.

Cool. I have hope that one day soon I'll have time to add some more tests.

@bors
Copy link
Contributor

bors commented Jul 3, 2019

☔ The latest upstream changes (presumably #1931) made this pull request unmergeable. Please resolve the merge conflicts.

@nrc
Copy link
Member Author

nrc commented Sep 4, 2019

There's now a fascinating windows failure

I do not like the word 'fascinating' associated with test failures :-(

And still a bunch of message macro changes.

Sigh. Should be fixed now; I'm an idiot.

@kinnison
Copy link
Contributor

kinnison commented Sep 5, 2019

There's now a fascinating windows failure
I do not like the word 'fascinating' associated with test failures :-(

I think it was to do with the macro changes.

And still a bunch of message macro changes.
Sigh. Should be fixed now; I'm an idiot.

Yay.

Merge looks clean, I'll do a proper review next.

D.

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A few bogons, and a few nits. Otherwise this looks like a good simplification of your previous work. nice!

src/cli/download_tracker.rs Show resolved Hide resolved
src/cli/self_update.rs Outdated Show resolved Hide resolved
src/config.rs Show resolved Hide resolved
src/config.rs Show resolved Hide resolved
src/errors.rs Outdated Show resolved Hide resolved
src/utils/raw.rs Outdated Show resolved Hide resolved
tests/cli-misc.rs Show resolved Hide resolved
Signed-off-by: Nick Cameron <nrc@ncameron.org>
@nrc
Copy link
Member Author

nrc commented Sep 10, 2019

@kinnison I think all comments are addressed

Copy link
Contributor

@kinnison kinnison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good enough that I'm good to merge once it's squashed. I can do that if you're too busy.

@nrc
Copy link
Member Author

nrc commented Sep 11, 2019

This looks good enough that I'm good to merge once it's squashed. I can do that if you're too busy.

Let's let GH do it - 'squash and merge' ftw

@nrc nrc merged commit ec6d1af into rust-lang:master Sep 11, 2019
@softprops
Copy link

This is awesome! How soon can we expect a new release?

@kinnison
Copy link
Contributor

Let's let GH do it - 'squash and merge' ftw

Github does squash not fixup, so the commit message is sucky, but yay, merged! 🎉

@kinnison
Copy link
Contributor

This is awesome! How soon can we expect a new release?

We will want this to be tested for a while before we make a release with it. I don't expect for a couple of weeks at least.

@Arnavion
Copy link

I just tried it with the minimal profile on an x86_64 Linux host and it worked wonderfully. Thanks! (rustup set profile <> + wipe and reinstall toolchains. Could probably have removed the extra components like rust-docs individually instead.)

It might be useful to have a subcommand like rustup profile list and rustup profile show --name <> that lists all available profiles and shows the components in a specific profile respectively. For now, I just got them from the dist manifest:

$ curl -Ls 'https://static.rust-lang.org/dist/2019-09-12/channel-rust-nightly.toml' | grep -A5 '\[profiles\]'

[profiles]
complete = ["rustc", "cargo", "rust-std", "rust-mingw", "rust-docs", "rustfmt-preview", "clippy-preview", "rls-preview", "rust-src", "llvm-tools-preview", "lldb-preview", "rust-analysis", "miri-preview"]
default = ["rustc", "cargo", "rust-std", "rust-mingw", "rust-docs", "rustfmt-preview", "clippy-preview"]
minimal = ["rustc", "cargo", "rust-std", "rust-mingw"]

@Arnavion
Copy link

Arnavion commented Sep 18, 2019

Also, it might be useful to let the user select the profile in the interactive rustup installer. Whoops, it's already there.

@ghost
Copy link

ghost commented Oct 8, 2019

Hi. This commit broke the ability to install a specific nightly toolchain, apparently:

$ git bisect log
git bisect start
# good: [2af131cf92dfb7a7111c9979c9acd576186ba894] CHANGELOG: Fix pull URLs
git bisect good 2af131cf92dfb7a7111c9979c9acd576186ba894
# bad: [6f93cdc0059a83d5a328eadd37edb69121dd46ca] Merge pull request #2002 from jonhoo/skip-missing
git bisect bad 6f93cdc0059a83d5a328eadd37edb69121dd46ca
# bad: [0ec2dbe38e547282bdb4655dc03d06689bbacc04] Merge pull request #1988 from BeniCheni/toolchain-list-verbose
git bisect bad 0ec2dbe38e547282bdb4655dc03d06689bbacc04
# bad: [9c264a185da10b5693c1d9a13c8b1ed9acc2753d] Merge pull request #1980 from chunk0tronic/show_updates
git bisect bad 9c264a185da10b5693c1d9a13c8b1ed9acc2753d
# bad: [ec6d1afcbe0fe2f0f52fb7b856f9672ebf87b177] Installation profiles (#1673)
git bisect bad ec6d1afcbe0fe2f0f52fb7b856f9672ebf87b177
# good: [039a0a86b1434061c3501f674502e5b01d377c92] Update release date for 1.19.0
git bisect good 039a0a86b1434061c3501f674502e5b01d377c92
# first bad commit: [ec6d1afcbe0fe2f0f52fb7b856f9672ebf87b177] Installation profiles (#1673)

How it looks like when it works:

$ rustup toolchain install nightly-2019-09-05
info: syncing channel updates for 'nightly-2019-09-05-x86_64-unknown-linux-gnu'
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[372011](full:'rustup') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
static.rust-lang.org
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[372011](full:'rustup') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('static.rust-lang.org') which was not transformed('static.rust-lang.org') as follows:
143.204.101.44 static.rust-lang.org
info: latest update on 2019-09-05, rust version 1.39.0-nightly (c6e9c76c5 2019-09-04)
info: downloading component 'rustc'
  3.9 MiB /  66.1 MiB (  6 %)   0 B/s in  2s ETA: Unknown^C

(yeah I stopped it, for testing purposes)

And how it looks like when it doesn't work(exit code is 0 btw):

$ rustup toolchain install nightly-2019-09-05
info: syncing channel updates for 'nightly-2019-09-05-x86_64-unknown-linux-gnu'
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[377162](full:'rustup') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
static.rust-lang.org
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[377162](full:'rustup') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('static.rust-lang.org') which was not transformed('static.rust-lang.org') as follows:
143.204.101.44 static.rust-lang.org
info: latest update on 2019-09-05, rust version 1.39.0-nightly (c6e9c76c5 2019-09-04)

  nightly-2019-09-05-x86_64-unknown-linux-gnu unchanged - (toolchain not installed)

info: checking for self-updates
warning: tool `rustfmt` is already installed, remove it from `/home/user/.cargo/bin`, then run `rustup update` to have rustup manage this tool.
warning: tool `cargo-fmt` is already installed, remove it from `/home/user/.cargo/bin`, then run `rustup update` to have rustup manage this tool.

(the warnings are irrelevant btw, I can get rid of them with no effects on the issue)

Oh, credits for telling me which was the good version/commit go to <Faux> on freenode irc. Thanks!

@kinnison
Copy link
Contributor

kinnison commented Oct 8, 2019

I have no idea how @howaboutsynergy got that, because:

somniloquy% rustup toolchain install nightly-2019-09-05                                              
info: syncing channel updates for 'nightly-2019-09-05-x86_64-unknown-linux-gnu'
info: latest update on 2019-09-05, rust version 1.39.0-nightly (c6e9c76c5 2019-09-04)
info: downloading component 'cargo'
info: downloading component 'clippy'
info: downloading component 'rust-docs'
 11.7 MiB /  11.7 MiB (100 %)   7.4 MiB/s in  1s ETA:  0s
info: downloading component 'rust-std'
175.3 MiB / 175.3 MiB (100 %)   7.5 MiB/s in 23s ETA:  0s
info: downloading component 'rustc'
 66.1 MiB /  66.1 MiB (100 %)   7.7 MiB/s in  8s ETA:  0s
info: downloading component 'rustfmt'
info: installing component 'cargo'
info: installing component 'clippy'
info: installing component 'rust-docs'
 11.7 MiB /  11.7 MiB (100 %)   2.8 MiB/s in  3s ETA:  0s
info: installing component 'rust-std'
175.3 MiB / 175.3 MiB (100 %)  16.3 MiB/s in 11s ETA:  0s
info: installing component 'rustc'
 66.1 MiB /  66.1 MiB (100 %)   7.5 MiB/s in  8s ETA:  0s
info: installing component 'rustfmt'

  nightly-2019-09-05-x86_64-unknown-linux-gnu installed - rustc 1.39.0-nightly (c6e9c76c5 2019-09-04)

info: checking for self-updates
rustup toolchain install nightly-2019-09-05  86.77s user 2.59s system 142% cpu 1:02.84 total
somniloquy% rustup --version                                                                         
rustup 1.19.0+64 (cba68ab58 2019-10-08)
somniloquy%                                                                                          

@ghost
Copy link

ghost commented Oct 8, 2019

Well I'll be. I wonder if something else I've modified influenced it:

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/user/.rustup

installed toolchains
--------------------

nightly-2019-09-05-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
former-master-installed
master-installed (default)
master-stage1
master-stage2

active toolchain
----------------

nightly-2019-09-05-x86_64-unknown-linux-gnu (overridden by '/home/user/build/2nonpkgs/rust.stuff/tikv/rust-toolchain')
rustc 1.39.0-nightly (c6e9c76c5 2019-09-04)

Oh and if I'm outside the override dir, it's:

$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/user/.rustup

installed toolchains
--------------------

nightly-2019-09-05-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
former-master-installed
master-installed (default)
master-stage1
master-stage2

active toolchain
----------------

master-installed (default)
rustc 1.40.0-dev (f2023ac59 2019-10-02)

My ~/.cargo/config:

[target.'cfg(any(windows, unix))']
rustflags = ["-C", "target-cpu=native"
, "-Z", "treat-err-as-bug=5"  #XXX: changing this causes full recompilation!!! ie. of rustup.rs/
, "-Z", "external-macro-backtrace"
#XXX: ok `-Z treat-err-as-bug=1` is bad https://github.com/rust-lang/rust/issues/27189#issuecomment-512126528
#XXX: error: the option `Z` is only accepted on the nightly compiler
#doneFIXME: temp-commented out when using archlinux's upstream rust (aka stable) because of the above error ^
]
# src: https://users.rust-lang.org/t/auto-vectorization-in-rust/24379/4
# for -Z treat-err-as-bug=1 see: https://github.com/rust-lang/rust/issues/27189#issuecomment-509898987
# thanks to Mutabah on #rust on irc.mozilla.org irc for pointing me to issue 27189 ^


#TODO: if you put secret token here (for crates.io publishing) remember to either ensure this file isn't rsank-saved by adding it to /home/user/bin/rsank/rsank.lst OR censor the key in ~/rsank/4copytogit

~/.cargo/env is a symlink to some file with contents:

export PATH="$HOME/.cargo/bin:$PATH"

~/.cargo/rls.conf is empty 0 byte file.
~/.cargo/.package-cache is empty 0 byte file.

~/.cargo/.crates.toml

[v1]
"cargo-watch 7.2.1 (registry+https://github.com/rust-lang/crates.io-index)" = ["cargo-watch"]
"chars 0.3.3-dev (path+file:///home/user/build/2nonpkgs/rust.stuff/chars)" = ["chars"]
"clippy 0.0.212 (path+file:///home/user/build/2nonpkgs/rust.stuff/rust-clippy)" = ["cargo-clippy", "clippy-driver"]
"rustfmt-nightly 1.4.8 (path+file:///home/user/build/2nonpkgs/rust.stuff/rustfmt)" = ["cargo-fmt", "git-rustfmt", "rustfmt", "rustfmt-format-diff"]
"rustup 1.19.0 (path+file:///home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs)" = ["rustup-init"]

~/.rustup/settings.toml is a symlink to a file with contents:

default_host_triple = "x86_64-unknown-linux-gnu"
default_toolchain = "master-installed"
version = "12"

[overrides]

Also note: I can repro. with latest git master:

commit b9e968b6656dd999eb09fb6dc8e7952677dd3fc2 (HEAD -> master, origin/master, origin/HEAD)
Merge: cba68ab5 c50626e9

Date:   Tue Oct 8 12:43:26 2019 +0100

no tests failed for the bad commit:

/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs 
$ time cargo test
!! master-installed (default)
!! Executing '/home/user/.cargo/bin/cargo' in pwd='/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs' with args(1): 'test'
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: cargo[621704](full:'/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
crates.io
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: !! REENTRANT_NAME == 'gethostbyname2_r' hostname='crates.io'
cargo: cargo[621704](full:'/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('crates.io') which was not transformed('crates.io') as follows:
52.7.241.210 crates.io
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: cargo[621704](full:'/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
static.crates.io
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: !! REENTRANT_NAME == 'gethostbyname2_r' hostname='static.crates.io'
cargo: cargo[621704](full:'/home/user/.rustup/toolchains/nightly-x86_64-unknown-linux-gnu/bin/cargo') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('static.crates.io') which was not transformed('static.crates.io') as follows:
13.225.78.90 static.crates.io
  Downloaded curl v0.4.22
  Downloaded chrono v0.4.7
  Downloaded publicsuffix v1.5.2
  Downloaded curl-sys v0.4.20
  Downloaded syn v1.0.4
   Compiling cfg-if v0.1.9
   Compiling cc v1.0.40
   Compiling lazy_static v1.3.0
   Compiling pkg-config v0.3.15
   Compiling futures v0.1.28
   Compiling either v1.5.2
   Compiling proc-macro2 v1.0.1
   Compiling syn v1.0.4
   Compiling stable_deref_trait v1.1.1
   Compiling scopeguard v0.3.3
   Compiling serde v1.0.99
   Compiling bitflags v1.1.0
   Compiling openssl v0.10.24
   Compiling typenum v1.10.0
   Compiling getrandom v0.1.11
   Compiling indexmap v1.1.0
   Compiling regex-syntax v0.6.11
   Compiling encoding_rs v0.8.17
   Compiling adler32 v1.0.3
   Compiling curl v0.4.22
   Compiling opener v0.4.0
   Compiling try_from v0.3.2
   Compiling crossbeam-utils v0.6.6
   Compiling thread_local v0.3.6
   Compiling unicase v2.4.0
   Compiling owning_ref v0.4.0
   Compiling c2-chacha v0.2.2
   Compiling miniz_oxide v0.3.2
   Compiling log v0.4.8
   Compiling tokio-sync v0.1.6
   Compiling crc32fast v1.2.0
   Compiling tokio-executor v0.1.8
   Compiling crossbeam-queue v0.1.2
   Compiling lock_api v0.1.5
   Compiling openssl-sys v0.9.49
   Compiling backtrace-sys v0.1.31
   Compiling libz-sys v1.0.25
   Compiling miniz-sys v0.1.12
   Compiling curl-sys v0.4.20
   Compiling lzma-sys v0.1.15
   Compiling net2 v0.2.33
   Compiling socket2 v0.3.11
   Compiling filetime v0.2.7
   Compiling parking_lot_core v0.4.0
   Compiling hyper v0.12.33
   Compiling quote v1.0.2
   Compiling want v0.2.0
   Compiling tokio-timer v0.2.11
   Compiling tokio-current-thread v0.1.6
   Compiling bytes v0.4.12
   Compiling futures-cpupool v0.1.8
   Compiling clap v2.33.0
   Compiling mio v0.6.19
   Compiling env_proxy v0.3.1
   Compiling regex v1.2.1
   Compiling tar v0.4.26
   Compiling chrono v0.4.7
   Compiling generic-array v0.12.3
   Compiling tokio-io v0.1.12
   Compiling http v0.1.18
   Compiling tokio-buf v0.1.1
   Compiling string v0.2.1
   Compiling crossbeam-epoch v0.7.2
   Compiling flate2 v1.0.11
   Compiling backtrace v0.3.35
   Compiling git-testament-derive v0.1.7
   Compiling digest v0.8.1
   Compiling block-buffer v0.7.3
   Compiling mime v0.3.13
   Compiling xz2 v0.1.6
   Compiling sha2 v0.8.0
   Compiling http-body v0.1.0
   Compiling h2 v0.1.26
   Compiling parking_lot v0.7.1
   Compiling error-chain v0.12.1
   Compiling failure v0.1.5
   Compiling rand_core v0.5.0
   Compiling rand_chacha v0.2.1
   Compiling tokio-reactor v0.1.9
   Compiling crossbeam-deque v0.7.1
   Compiling publicsuffix v1.5.2
   Compiling git-testament v0.1.6
   Compiling serde_derive v1.0.99
   Compiling tokio-tcp v0.1.3
   Compiling tokio-threadpool v0.1.15
   Compiling native-tls v0.2.3
   Compiling tokio v0.1.22
   Compiling rand v0.7.0
   Compiling tempfile v3.1.0
   Compiling mime_guess v2.0.1
   Compiling hyper-tls v0.3.2
   Compiling serde_json v1.0.40
   Compiling serde_urlencoded v0.5.5
   Compiling toml v0.5.3
   Compiling cookie_store v0.7.0
   Compiling rs_tracing v1.0.1
   Compiling reqwest v0.9.20
   Compiling download v0.6.3 (/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs/download)
   Compiling rustup v1.19.0 (/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs)
^C  Building [===================================================>   ] 270/283
real	3m57.811s
user	10m36.633s
sys	0m19.129s

-----------
user@Z575 2019/10/08 14:15:27 -bash5.0.11 t:4 j:0 d:3 pp:158152 p:573235 ut16350
!22013 7 130  5.3.5-gdc073f193b70 #21 SMP PREEMPT Mon Oct 7 21:20:46 CEST 2019
/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs 
$ time cargo test --debug
!! master-installed (default)
!! Executing '/home/user/.cargo/bin/cargo' in pwd='/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs' with args(2): 'test --debug'
error: Found argument '--debug' which wasn't expected, or isn't valid in this context

USAGE:
    cargo test [OPTIONS] [TESTNAME] [-- <args>...]

For more information try --help

real	0m0.124s
user	0m0.099s
sys	0m0.024s
-----------
user@Z575 2019/10/08 14:15:29 -bash5.0.11 t:4 j:0 d:3 pp:158152 p:573235 ut16353
!22014 8 1  5.3.5-gdc073f193b70 #21 SMP PREEMPT Mon Oct 7 21:20:46 CEST 2019
/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs 
$ time cargo --debug test
!! master-installed (default)
!! Executing '/home/user/.cargo/bin/cargo' in pwd='/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs' with args(2): '--debug test'
error: Found argument '--debug' which wasn't expected, or isn't valid in this context

USAGE:
    cargo [OPTIONS] [SUBCOMMAND]

For more information try --help

real	0m0.119s
user	0m0.104s
sys	0m0.015s
-----------
user@Z575 2019/10/08 14:15:35 -bash5.0.11 t:4 j:0 d:3 pp:158152 p:573235 ut16358
!22015 9 1  5.3.5-gdc073f193b70 #21 SMP PREEMPT Mon Oct 7 21:20:46 CEST 2019
/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs 
$ time cargotest
-bash: cargotest: command not found

real	0m0.003s
user	0m0.001s
sys	0m0.002s
-----------
user@Z575 2019/10/08 14:15:40 -bash5.0.11 t:4 j:0 d:3 pp:158152 p:573235 ut16364
!22016 10 127  5.3.5-gdc073f193b70 #21 SMP PREEMPT Mon Oct 7 21:20:46 CEST 2019
/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs 
$ time cargo test
!! master-installed (default)
!! Executing '/home/user/.cargo/bin/cargo' in pwd='/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs' with args(1): 'test'
   Compiling rustup v1.19.0 (/home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs)
    Finished test [unoptimized + debuginfo] target(s) in 1m 21s
     Running target/debug/deps/rustup_init-f1436be2c8e061b8

running 1 test
test download_tracker::tests::download_tracker_from_seconds_test ... ok

test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/cli_exact-7642a075dd7290ed

running 18 tests
test default ... ok
test default_invalid_toolchain ... ok
test list_installed_targets ... ok
test cross_install_indicates_target ... ok
test list_overrides ... ok
test list_overrides_with_nonexistent ... ok
test list_targets ... ok
test override_again ... ok
test remove_override_none ... ok
test remove_override ... ok
test remove_override_nonexistent ... ok
test remove_override_with_path ... ok
test undefined_linked_toolchain ... ok
test update ... ok
test update_again ... ok
test update_invalid_toolchain ... ok
test update_no_manifest ... ok
test remove_override_with_path_deleted ... ok

test result: ok. 18 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/cli_inst_interactive-206f7d5a079ec5b0

running 13 tests
test set_nightly_toolchain ... test set_nightly_toolchain has been running for over 60 seconds
test blank_lines_around_stderr_log_output_install ... test blank_lines_around_stderr_log_output_install has been running for over 60 seconds
test set_nightly_toolchain_and_unset ... test set_nightly_toolchain_and_unset has been running for over 60 seconds
test blank_lines_around_stderr_log_output_update ... test blank_lines_around_stderr_log_output_update has been running for over 60 seconds
test blank_lines_around_stderr_log_output_update ... ok
test set_nightly_toolchain_and_unset ... ok
test set_nightly_toolchain ... ok
test blank_lines_around_stderr_log_output_install ... ok
test set_no_modify_path ... test set_no_modify_path has been running for over 60 seconds
test set_no_modify_path ... ok
test smoke_test ... ok
test update ... test update has been running for over 60 seconds
test update ... ok
test user_says_nope ... test user_says_nope has been running for over 60 seconds
test user_says_nope ... ok
test user_says_nope_after_advanced_install ... ok
test with_no_modify_path ... ok
test with_no_toolchain ... ok
test with_non_default_toolchain ... ok
test with_non_release_channel_non_default_toolchain ... ok

test result: ok. 13 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/cli_misc-d257ad52ef350502

running 44 tests
test completion_cargo ... ok
test completion_bad_tool ... ok
test completion_bad_shell ... ok
test completion_cargo_unsupported_shell ... ok
test add_remove_component ... ok
test completion_default ... ok
test completion_rustup ... ok
test custom_invalid_names ... ok
test custom_invalid_names_with_archive_dates ... ok
test custom_toolchain_cargo_fallback_proxy ... ok
test custom_toolchain_cargo_fallback_run ... ok
test install_stops_if_cargo_exists ... ok
test install_stops_if_rustc_exists ... ok
test install_profile ... ok
test no_colors_in_piped_error_output ... ok
test no_panic_on_default_toolchain_missing ... ok
test proxies_pass_empty_args ... ok
test rename_rls_add_old_name ... ok
test rename_rls_before ... ok
test rename_rls_after ... ok
test multi_host_smoke_test ... ok
test rename_rls_list ... ok
test rename_rls_preview_list ... ok
test rename_rls_remove ... ok
test rls_does_not_exist_in_toolchain ... ok
test rustc_with_bad_rustup_toolchain_env_var ... ok
test rls_exists_in_toolchain ... ok
test rustup_failed_path_search ... ok
test rustup_failed_path_search_toolchain ... ok
test rustup_run_install ... ok
test rustup_run_not_installed ... ok
test rustup_run_searches_path ... ok
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/user/build/2nonpkgs/rust.stuff/rustup.rs/rustup.rs/target/tests/running-test-WvgO8d/rustupLc2qqP

no active toolchain
test show_works_with_dumb_term ... ok
test smoke_test ... ok
test subcommand_required_for_override ... ok
test subcommand_required_for_self ... ok
test subcommand_required_for_target ... ok
test subcommand_required_for_toolchain ... ok
test toolchain_broken_symlink ... ok
test toolchains_are_resolved_early ... ok
test update_all_no_update_whitespace ... ok
test update_works_without_term ... ok
test update_unavailable_rustc ... ok
test with_no_prompt_install_succeeds_if_rustc_exists ... ok

test result: ok. 44 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/cli_rustup-5b1da26a5d30a11a

running 63 tests
test add_component ... test add_component has been running for over 60 seconds
test add_remove_multiple_components ... test add_remove_multiple_components has been running for over 60 seconds
test add_remove_multiple_targets ... test add_remove_multiple_targets has been running for over 60 seconds
test add_target ... test add_target has been running for over 60 seconds
test add_remove_multiple_components ... ok
test add_component ... ok
test add_target ... ok
test add_remove_multiple_targets ... ok
test bad_file_override ... ok
test add_target_explicit ... ok
test default ... ok
test close_file_override_beats_far_directory_override ... ok
test default_override ... ok
test directory_override_doesnt_need_to_exist_unless_it_is_selected ... ok
test directory_override_beats_file_override ... ok
test docs_with_path ... ok
test env_override_beats_file_override ... ok
test fallback_cargo_calls_correct_rustc ... ok
test file_override ... ok
test file_override_subdir ... ok
test file_override_with_archive ... ok
test file_override_with_target_info ... ok
test list_default_toolchain ... ok
test link ... ok
test list_installed_targets ... ok
test list_targets ... ok
test list_targets_explicit ... ok
test non_utf8_arg ... ok
test override_set_unset_with_path ... ok
test non_utf8_toolchain ... ok
test proxy_toolchain_shorthand ... ok
test plus_override_beats_file_override ... ok
test remove_component ... ok
test remove_target ... ok
test remove_target_explicit ... ok
test rustup_no_channels ... ok
test rustup_stable ... ok
test rustup_all_channels ... ok
test rustup_xz ... ok
test rustup_stable_no_change ... ok
test rustup_some_channels_up_to_date ... ok
test set_default_host_invalid_triple ... ok
test set_default_host ... ok
test set_default_host_invalid_triple_valid_partial ... ok
test show_active_toolchain ... ok
test show_home ... ok
test show_active_toolchain_none ... ok
test show_active_toolchain_with_override ... ok
test show_multiple_toolchains ... ok
test show_profile ... ok
test show_toolchain_default ... ok
test show_toolchain_env ... ok
test show_toolchain_none ... ok
test show_toolchain_override ... ignored
test show_toolchain_env_not_installed ... ok
test show_toolchain_toolchain_file_override ... ignored
test show_toolchain_toolchain_file_override_not_installed ... ignored
test show_toolchain_version_nested_file_override ... ignored
test toolchain_install_is_like_update ... ok
test toolchain_install_is_like_update_except_that_bare_install_is_an_error ... ok
test show_toolchain_override_not_installed ... ok
test toolchain_uninstall_is_like_uninstall ... ok
test toolchain_update_is_like_update ... ok
test toolchain_update_is_like_update_except_that_bare_install_is_an_error ... ok
test update_doesnt_update_non_tracking_channels ... ok
test show_multiple_targets ... ok
test show_multiple_toolchains_and_targets ... ok

test result: ok. 59 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/cli_self_upd-031e28753e7f0d7b

running 58 tests
test as_rustup_setup ... ok
test bins_are_executable ... ok
test first_install_exact ... test first_install_exact has been running for over 60 seconds
test install_adds_path_to_bash_profile ... test install_adds_path_to_bash_profile has been running for over 60 seconds
test first_install_exact ... ok
test install_adds_path_to_bash_profile ... ok
test install_but_rustc_is_installed ... ignored
test install_but_rustup_is_installed ... ignored
test install_adds_path_to_profile ... ok
test install_adds_path_to_rcfile_just_once ... ok
test install_bins_to_cargo_home ... ok
test install_but_rustup_sh_is_installed ... ok
test install_creates_cargo_home ... ok
test install_does_not_add_path_to_bash_profile_that_doesnt_exist ... ok
test install_doesnt_modify_path_if_passed_no_modify_path ... ok
test install_errors_when_rc_file_cannot_be_updated ... ok
test install_sets_up_stable ... ok
test install_sets_up_stable_unless_a_different_default_is_requested ... ok
test install_sets_up_stable_unless_there_is_already_a_default ... ok
test install_twice ... ok
test install_with_zsh_adds_path_to_zdotdir_zprofile ... ok
test install_with_zsh_adds_path_to_zprofile ... ok
test produces_env_file_on_unix ... ok
test readline_no_stdin ... ok
test reinstall_exact ... ok
test rls_proxy_set_up_after_install ... ok
test rls_proxy_set_up_after_update ... ok
test rustup_init_works_with_weird_names ... ok
test rustup_no_self_update_with_specified_toolchain ... test rustup_no_self_update_with_specified_toolchain has been running for over 60 seconds
test rustup_self_update_exact ... test rustup_self_update_exact has been running for over 60 seconds
test rustup_no_self_update_with_specified_toolchain ... ok
test rustup_self_updates ... test rustup_self_updates has been running for over 60 seconds
test rustup_self_update_exact ... ok
test rustup_self_updates_with_specified_toolchain ... test rustup_self_updates_with_specified_toolchain has been running for over 60 seconds
test rustup_self_updates ... ok
test rustup_still_works_after_update ... test rustup_still_works_after_update has been running for over 60 seconds
test uninstall_deletes_bins ... test uninstall_deletes_bins has been running for over 60 seconds
test rustup_self_updates_with_specified_toolchain ... ok
test rustup_still_works_after_update ... ok
test uninstall_deletes_cargo_home ... test uninstall_deletes_cargo_home has been running for over 60 seconds
test uninstall_deletes_bins ... ok
test uninstall_deletes_cargo_home ... ok
test uninstall_deletes_rustup_home ... ok
test uninstall_doesnt_leave_gc_file ... ok
test uninstall_doesnt_touch_rc_files_that_dont_contain_cargo_home ... ok
test uninstall_fails_if_not_installed ... ok
test uninstall_stress_test ... ignored
test uninstall_removes_path_from_bash_profile ... ok
test uninstall_removes_path_from_profile ... ok
test uninstall_self_delete_works ... ok
test uninstall_works_if_rustup_home_doesnt_exist ... ok
test uninstall_works_if_some_bins_dont_exist ... ok
test update_bad_schema ... ok
test update_bogus_version ... ok
test update_but_delete_existing_updater_first ... ok
test update_but_not_installed ... ok
test update_does_not_overwrite_rustfmt ... ok
test update_download_404 ... ok
test update_stress_test ... ignored
test update_exact ... ok
test update_installs_clippy_cargo_and ... ok
test update_no_change ... ok
test update_updates_rustup_bin ... test update_updates_rustup_bin has been running for over 60 seconds
test updater_is_deleted_after_running_rustc ... test updater_is_deleted_after_running_rustc has been running for over 60 seconds
test update_updates_rustup_bin ... ok
test updater_is_deleted_after_running_rustup ... test updater_is_deleted_after_running_rustup has been running for over 60 seconds
test updater_leaves_itself_for_later_deletion ... test updater_leaves_itself_for_later_deletion has been running for over 60 seconds
test updater_is_deleted_after_running_rustc ... ok
test updater_is_deleted_after_running_rustup ... ok
test updater_leaves_itself_for_later_deletion ... ok
test when_cargo_home_is_the_default_write_path_specially ... ok

test result: ok. 54 passed; 0 failed; 4 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/cli_v1-a3638227255fc8a0

running 27 tests
test bad_sha_on_installer ... ok
test bad_sha_on_manifest ... ok
test change_override ... ok
test default_existing_toolchain ... ok
test expected_bins_exist ... ok
test install_override_toolchain_from_version ... ok
test install_override_toolchain_from_channel ... ok
test install_toolchain_from_version ... ok
test install_toolchain_from_channel ... ok
test list_toolchains_with_none ... ok
test multiple_overrides ... ok
test install_override_toolchain_from_archive ... ok
test list_toolchains ... ok
test install_toolchain_from_archive ... ok
test no_update_on_channel_when_date_has_not_changed ... ok
test override_overrides_default ... ok
test remove_default_toolchain_err_handling ... ok
test remove_override_no_default ... ok
test remove_override_with_default ... ok
test remove_override_toolchain_err_handling ... ok
test remove_toolchain ... ok
test remove_override_with_multiple_overrides ... ok
test remove_toolchain_then_add_again ... ok
test rustc_no_default_toolchain ... ok
test run_command ... ok
test update_channel ... ok
test update_on_channel_when_date_has_changed ... ok

test result: ok. 27 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/cli_v2-199c8c92eddea0b5

running 65 tests
test add_all_targets_fail ... ok
test add_component_suggest_best_match ... ok
test add_all_targets ... ok
test add_target1 ... ok
test add_target2 ... ok
test add_target_again ... ok
test add_target_bogus ... ok
test add_target_custom_toolchain ... ok
test add_target_host ... ok
test add_target_no_toolchain ... ok
test add_target_suggest_best_match ... ok
test add_target_v1_toolchain ... ok
test bad_sha_on_manifest ... ok
test bad_sha_on_installer ... ok
test change_override ... ok
test default_existing_toolchain ... ok
test expected_bins_exist ... ok
test file_override_toolchain_err_handling ... ok
test add_remove_multiple_toolchains ... test add_remove_multiple_toolchains has been running for over 60 seconds
test install_override_toolchain_from_channel ... ok
test add_remove_multiple_toolchains ... ok
test install_override_toolchain_from_version ... ok
test install_toolchain_from_version ... ok
test install_toolchain_from_channel ... ok
test list_installed_targets ... ok
test list_targets ... ok
test list_targets_custom_toolchain ... ok
test list_targets_no_toolchain ... ok
test list_targets_v1_toolchain ... ok
test list_toolchains_with_bogus_file ... ok
test list_toolchains_with_none ... ok
test multiple_overrides ... ok
test no_update_on_channel_when_date_has_not_changed ... ok
test install_toolchain_from_archive ... ok
test install_override_toolchain_from_archive ... ok
test list_toolchains ... ok
test override_overrides_default ... ok
test plus_override_toolchain_err_handling ... ok
test remove_component_suggest_best_match ... ok
test remove_default_toolchain_err_handling ... ok
test remove_override_no_default ... ok
test remove_override_with_default ... ok
test remove_override_toolchain_err_handling ... ok
test remove_target ... ok
test remove_override_with_multiple_overrides ... ok
test remove_target_again ... ok
test remove_target_bogus ... ok
test remove_target_custom_toolchain ... ok
test remove_target_host ... ok
test remove_target_no_toolchain ... ok
test remove_target_missing_update_hash ... ok
test remove_target_not_installed ... ok
test remove_target_suggest_best_match ... ok
test remove_target_v1_toolchain ... ok
test remove_toolchain ... ok
test remove_toolchain_then_add_again ... ok
test rustc_no_default_toolchain ... ok
test run_command ... ok
test target_list_ignores_unavailable_targets ... ok
test update_channel ... ok
test update_unavailable_std ... ok
test update_unavailable_force ... ok
test update_on_channel_when_date_has_changed ... ok
test upgrade_v1_to_v2 ... ok
test upgrade_v2_to_v1 ... ok
test warn_about_and_remove_stray_hash ... ok

test result: ok. 65 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/dist-fefacf37a77a450f

running 37 tests
test add_extension_not_in_manifest ... ok
test add_extension_that_is_required_component ... ok
test add_and_remove ... ok
test add_extensions_does_not_remove_other_components ... ok
test add_and_remove_for_upgrade ... ok
test add_extensions_for_same_manifest_does_not_reinstall_other_components ... ignored
test add_extensions_for_same_manifest_when_extension_already_installed ... ignored
test add_and_remove_same_component ... ok
test bad_component_hash ... ok
test add_extensions_for_initial_install ... ok
test add_extensions_for_same_manifest ... ok
test checks_files_hashes_before_reuse ... ok
test initial_install ... ok
test mock_dist_server_smoke_test ... ok
test add_extensions_for_upgrade ... ok
test remove_extension_not_in_manifest ... ok
test remove_extension_not_installed ... ok
test remove_extension_not_in_manifest_but_is_already_installed ... ok
test remove_extension_that_is_required_component ... ok
test remove_extensions_for_initial_install ... ok
test remove_extensions_for_same_manifest_does_not_reinstall_other_components ... ignored
test remove_extensions_does_not_remove_other_components ... ok
test removed_component ... ok
test remove_extensions_for_same_manifest ... ok
test remove_extensions_for_upgrade ... ok
test initial_install_xz ... ok
test reuse_downloaded_file ... ok
test rename_component_new ... ok
test unable_to_download_component ... ok
test rename_component ... ok
test test_uninstall ... ok
test uninstall_removes_config_file ... ok
test unavailable_component ... ok
test update_makes_no_changes_for_identical_manifest ... ok
test unavailable_component_from_profile ... ok
test upgrade ... ok
test update_preserves_extensions ... ok

test result: ok. 34 passed; 0 failed; 3 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/dist_install-9f747f9b471271fb

running 9 tests
test mock_smoke_test ... ok
test component_bad_version ... ok
test basic_install ... ok
test install_to_prefix_that_does_not_exist ... ok
test package_contains ... ok
test uninstall_best_effort ... ok
test package_bad_version ... ok
test multiple_component_install ... ok
test uninstall ... ok

test result: ok. 9 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/dist_manifest-c2a7206cd45b20c4

running 5 tests
test manifest_can_contain_unknown_targets ... ok
test parse_smoke_test ... ok
test validate_components_have_corresponding_packages ... ok
test renames ... ok
test parse_round_trip ... ok

test result: ok. 5 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out

     Running target/debug/deps/dist_transactions-bd5cdcc73ca5ff4f

running 27 tests
test add_file_then_rollback ... ok
test add_file_that_exists ... ok
test add_file ... ok
test copy_dir_that_exists ... ok
test copy_dir ... ok
test copy_file ... ok
test intermediate_dir_rollback ... ignored
test copy_dir_then_rollback ... ok
test copy_file_then_rollback ... ok
test copy_file_that_exists ... ok
test modify_file_that_exists ... ok
test modify_file_that_exists_then_rollback ... ok
test modify_file_that_not_exists_then_rollback ... ok
test modify_twice_then_rollback ... ok
test modify_file_that_not_exists ... ok
test remove_dir_that_not_exists ... ok
test remove_dir ... ok
test remove_file ... ok
test remove_dir_then_rollback ... ok
test multiple_op_transaction_then_rollback ... ok
test multiple_op_transaction ... ok
test remove_file_that_not_exists ... ok
test remove_file_then_rollback ... ok
test rollback_failure_keeps_going ... ok
test write_file_that_exists ... ok
test write_file ... ok
test write_file_then_rollback ... ok

test result: ok. 26 passed; 0 failed; 1 ignored; 0 measured; 0 filtered out

   Doc-tests rustup

running 0 tests

test result: ok. 0 passed; 0 failed; 0 ignored; 0 measured; 0 filtered out


real	24m29.426s
user	43m31.653s
sys	2m27.691s

@ghost
Copy link

ghost commented Oct 8, 2019

@kinnison do you have a profile = line in ~/.rustup/settings.toml ?
I don't, also:

$ rustup show profile
No profile set

@kinnison
Copy link
Contributor

kinnison commented Oct 8, 2019

I do have a profile set. I'm surprised you don't, but perhaps if you've not installed the rustup you built you might not have one set. Mine is set to default.

@ghost
Copy link

ghost commented Oct 8, 2019

That would explain why it doesn't work for me. Thanks.

I install my rustup.rs via time cargo install $debug --verbose --force --path . && rm -v -- "${HOME}/.cargo/bin/rustup" ; cp --reflink=auto --no-target-directory -v -- "${HOME}/.cargo/bin/rustup-init" "${HOME}/.cargo/bin/rustup"

The settings.toml file existed as such since long ago. I'd expect maybe rustup would modify it as needed? But I think because it did exist, it didn't change it, and since I already had nightly and others installed without a profile, it didn't migrate them to the default profile, which is why it didn't set any profile, maybe?

@kinnison
Copy link
Contributor

kinnison commented Oct 8, 2019

Gosh that's complex. I'd change that for cargo run $debug -- --no-modify-path -y

But you're right, we probably should detect absence of profile and set it to default.

@ghost
Copy link

ghost commented Oct 8, 2019

But you're right, we probably should detect absence of profile and set it to default.

but some migration(of existing toolchains?) might be needed, because if I simply profile = "default" in settings.toml (aka run it like you said once: time cargo run --verbose -- --no-modify-path -y), then everythingsomething breaks:

$ time cargo run --verbose -- --no-modify-path -y

...
    Finished dev [unoptimized + debuginfo] target(s) in 18.69s
     Running `target/debug/rustup-init --no-modify-path -y`
warning: tool `rustfmt` is already installed, remove it from `/home/user/.cargo/bin`, then run `rustup update` to have rustup manage this tool.
warning: tool `cargo-fmt` is already installed, remove it from `/home/user/.cargo/bin`, then run `rustup update` to have rustup manage this tool.
info: profile set to 'default'
info: updating existing rustup installation

error: could not write env file: '/home/user/.cargo/env'
info: caused by: Permission denied (os error 13)

real	0m19.163s
user	0m16.781s
sys	0m2.271s
$ l /home/user/.cargo/env
lrwxrwxrwx 1 root root 45 01.09.2019 15:46 /home/user/.cargo/env -> /home/user/bin/confHOME//home/user/.cargo/env
$ l /home/user/bin/confHOME//home/user/.cargo/env
-r--r--r-- 1 user user 37 02.01.2018 22:06 /home/user/bin/confHOME//home/user/.cargo/env

(makes sense it's read only)

the breaking is this:


$ rustup toolchain install nightly-2019-09-06
info: syncing channel updates for 'nightly-2019-09-06-x86_64-unknown-linux-gnu'
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[884406](full:'rustup') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
static.rust-lang.org
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[884406](full:'rustup') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('static.rust-lang.org') which was not transformed('static.rust-lang.org') as follows:
143.204.101.44 static.rust-lang.org
info: latest update on 2019-09-06, rust version 1.39.0-nightly (618768492 2019-09-05)
error: some components unavailable for download for channel nightly-2019-09-06: 'rustfmt', 'clippy'
If you require these components, please install and use the latest successful build version,
which you can find at <https://rust-lang.github.io/rustup-components-history>.

After determining the correct date, install it with a command such as:

    rustup toolchain install nightly-2018-12-27

Then you can use the toolchain with commands such as:

    cargo +nightly-2018-12-27 build
$ rustup show
Default host: x86_64-unknown-linux-gnu
rustup home:  /home/user/.rustup

installed toolchains
--------------------

nightly-2019-09-05-x86_64-unknown-linux-gnu
nightly-x86_64-unknown-linux-gnu
former-master-installed
master-installed (default)
master-stage1
master-stage2

active toolchain
----------------

master-installed (default)
rustc 1.40.0-dev (f2023ac59 2019-10-02)

the toolschains seem fine.

Hmm... Maybe I was wrong... since the breakage is only for $ rustup toolchain install nightly-2019-09-06 compared with the 039a0a86b1434061c3501f674502e5b01d377c92 rustup commit which works without any errors, oddly enough(?).

but it works fine for this one hmm: $ rustup toolchain install nightly-2019-09-05
In other words, it only breaks for rustup toolchain install nightly-2019-09-06.

I'd change that for cargo run $debug -- --no-modify-path -y

now I see what you meant by installed, not cargo install-ed :D
So in other words, I was doing it wrong! If I were to have installed it, it would've made the default profile... and thus work!

Then there's no issue here, sorry for the noise!

The only remaining problem/difference then is this:

with rustup commit: ec6d1af
this fails:

$ rustup toolchain install nightly-2019-09-06
info: syncing channel updates for 'nightly-2019-09-06-x86_64-unknown-linux-gnu'
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[926738](full:'rustup') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
static.rust-lang.org
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[926738](full:'rustup') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('static.rust-lang.org') which was not transformed('static.rust-lang.org') as follows:
143.204.101.44 static.rust-lang.org
info: latest update on 2019-09-06, rust version 1.39.0-nightly (618768492 2019-09-05)
error: some components unavailable for download for channel nightly-2019-09-06: 'rustfmt', 'clippy'
If you require these components, please install and use the latest successful build version,
which you can find at <https://rust-lang.github.io/rustup-components-history>.

After determining the correct date, install it with a command such as:

    rustup toolchain install nightly-2018-12-27

Then you can use the toolchain with commands such as:

    cargo +nightly-2018-12-27 build

but with the prev. rustup commit aka 039a0a8
that doesn't fail:

$ rustup toolchain install nightly-2019-09-06
info: syncing channel updates for 'nightly-2019-09-06-x86_64-unknown-linux-gnu'
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[937045](full:'rustup') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
static.rust-lang.org
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[937045](full:'rustup') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('static.rust-lang.org') which was not transformed('static.rust-lang.org') as follows:
143.204.101.44 static.rust-lang.org
info: latest update on 2019-09-06, rust version 1.39.0-nightly (618768492 2019-09-05)
info: downloading component 'rustc'
 20.5 MiB /  66.3 MiB ( 31 %)   3.3 MiB/s in  7s ETA: 13s
 66.3 MiB /  66.3 MiB (100 %)   4.1 MiB/s in 20s ETA:  0s
info: downloading component 'rust-std'
175.2 MiB / 175.2 MiB (100 %)   3.8 MiB/s in 51s ETA:  0s    
info: downloading component 'cargo'
  4.7 MiB /   4.7 MiB (100 %)   2.2 MiB/s in  2s ETA:  0s
info: downloading component 'rust-docs'
 11.7 MiB /  11.7 MiB (100 %)   2.7 MiB/s in  4s ETA:  0s
info: installing component 'rustc'
 66.3 MiB /  66.3 MiB (100 %)   9.4 MiB/s in  7s ETA:  0s
info: installing component 'rust-std'
175.2 MiB / 175.2 MiB (100 %)  19.9 MiB/s in  9s ETA:  0s
info: installing component 'cargo'
info: installing component 'rust-docs'
 11.7 MiB /  11.7 MiB (100 %) 963.2 KiB/s in 16s ETA:  0s

  nightly-2019-09-06-x86_64-unknown-linux-gnu installed - rustc 1.39.0-nightly (618768492 2019-09-05)

info: checking for self-updates
warning: tool `rustfmt` is already installed, remove it from `/home/user/.cargo/bin`, then run `rustup update` to have rustup manage this tool.
warning: tool `cargo-fmt` is already installed, remove it from `/home/user/.cargo/bin`, then run `rustup update` to have rustup manage this tool.

@kinnison
Copy link
Contributor

kinnison commented Oct 8, 2019

Yep, the default profile includes rustfmt which isn't available on that nightly version. You should either set profile to minimal for CI if you don't need rustfmt etc, or you should pick a nightly with all the components you need.

@ghost
Copy link

ghost commented Oct 8, 2019

Right-O, thanks for your time&help @kinnison

@ghost
Copy link

ghost commented Oct 8, 2019

But you're right, we probably should detect absence of profile and set it to default.

+    // Returns a profile, if one exists in the settings file.
+    //
+    // Returns `Err` if the settings file could not be read or the profile is
+    // invalid. Returns `Ok(Some(...))` if there is a valid profile, and `Ok(None)`
+    // if there is no profile in the settings file. The last variant happens when
+    // a user upgrades from a version of Rustup without profiles to a version of
+    // Rustup with profiles.
+    pub fn get_profile(&self) -> Result<Option<dist::Profile>> {
+        self.settings_file.with(|s| {
+            let p = match &s.profile {
+                Some(p) => p,
+                None => return Ok(None),
+            };
+            let p = dist::Profile::from_str(p)?;
+            Ok(Some(p))
+        })
+    }

According to both the above, it means that I wouldn't be getting a profile = key/value in settings.toml if I were to have rustup update-ed, but only on first install (when it runs rustup-init ...). I haven't tested this, but if true, then the issue is still afoot, so then this remains to be done/TODO?

I'm trying to figure out why the default profile is set in this case:

$ rustup set profile
info: profile set to 'default'

but not in this case:

$ rustup show profile
No profile set

but strictly in the source code I mean.
In other words, why this m has profile set to default:

@@ -86,6 +87,7 @@ pub fn main() -> Result<()> {
         },
         ("set", Some(c)) => match c.subcommand() {
             ("default-host", Some(m)) => set_default_host_triple(&cfg, m)?,
+            ("profile", Some(m)) => set_profile(&cfg, m)?,
             (_, _) => unreachable!(),
         },
         ("completions", Some(c)) => {
+fn set_profile(cfg: &Cfg, m: &ArgMatches) -> Result<()> {
+    cfg.set_profile(&m.value_of("profile-name").unwrap())?;
+    Ok(())
+}
+

ah well this explains it:

@@ -501,6 +504,16 @@ pub fn cli() -> App<'static, 'static> {
                     SubCommand::with_name("default-host")
                         .about("The triple used to identify toolchains when not specified")
                         .arg(Arg::with_name("host_triple").required(true)),
+                )
+                .subcommand(
+                    SubCommand::with_name("profile")
+                        .about("The default components installed")
+                        .arg(
+                            Arg::with_name("profile-name")
+                                .required(true)
+                                .possible_values(Profile::names())
+                                .default_value(Profile::default_name()),
+                        ),
                 ),
         );
 

yup, it's set there as default!

I'm going to just use a noobish hack (so I don't get bit by this again) until an actual dev does do that mentioned TODO, for my knowledge is limited xD:

diff --git a/src/dist/dist.rs b/src/dist/dist.rs
index 09cfb2f9..9ea41cf6 100644
--- a/src/dist/dist.rs
+++ b/src/dist/dist.rs
@@ -765,7 +765,11 @@ fn try_update_from_dist_<'a>(
 
             let profile_components = match profile {
                 Some(profile) => m.get_profile_components(profile, &toolchain.target)?,
-                None => Vec::new(),
+                None => {
+                    eprintln!("Profile not set in ~/.rustup/settings.toml try running `rustup set profile minimal` or `default`. Assuming `minimal`.");
+                m.get_profile_components(Profile::Minimal, &toolchain.target)?
+                },
+                    //Vec::new(),
             };
 
             use crate::dist::manifest::Component;

result:

$ rustup show profile
No profile set
$ rustup toolchain install nightly-2019-09-06
info: syncing channel updates for 'nightly-2019-09-06-x86_64-unknown-linux-gnu'
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[1094471](full:'rustup') for user user(1000(eff:user(1000))) 1of2 attempting to resolve (requested)hostname:
static.rust-lang.org
glibc64:../sysdeps/posix/getaddrinfo.c:2201/getaddrinfo: rustup[1094471](full:'rustup') for user user(1000(eff:user(1000))) 2of2 successfully resolved requested hostname('static.rust-lang.org') which was not transformed('static.rust-lang.org') as follows:
143.204.101.44 static.rust-lang.org
info: latest update on 2019-09-06, rust version 1.39.0-nightly (618768492 2019-09-05)
Profile not set in ~/.rustup/settings.toml try running `rustup set profile minimal` or `default`. Assuming `minimal`.
info: downloading component 'cargo'
info: downloading component 'rust-std'
175.2 MiB / 175.2 MiB (100 %)   3.8 MiB/s in 50s ETA:  0s
info: downloading component 'rustc'
 66.3 MiB /  66.3 MiB (100 %)   3.6 MiB/s in 19s ETA:  0s
info: installing component 'cargo'
info: installing component 'rust-std'
167.6 MiB / 175.2 MiB ( 96 %)  22.0 MiB/s in  9s ETA:  0s
...

good enough for my...

@kinnison
Copy link
Contributor

kinnison commented Oct 8, 2019

If you could file an issue about the upgrade case I'd appreciate it.

@ghost
Copy link

ghost commented Oct 8, 2019

Done #2045 Thanks.

fnichol added a commit to fnichol/dotvim that referenced this pull request Oct 16, 2019
Due to some updates in the Installation Profiles PR in Rustup
(rust-lang/rustup#1673), as of Rustup 1.20.0, there is no longer a
` (default)` ending indicator on the active target when calling `rustup
target list`. Looking at the update, it's not totally clear that this
was ever completely accurate so another strategy was in order.

This change, uses the knowledge of the current active toolchain (via
`rustup show active-toolchain`) to list all installed components for
that toolchain. The `rustc` component should be installed in an active
toolchain (although this is honestly a stated assumption which could be
invalidated), so if we strip off `rustc-` from the start of the
component name, we should be left with the full target triple of the
active toolchain, hence the "default active target".

Signed-off-by: Fletcher Nichol <fnichol@nichol.ca>
AJ-Ianozi pushed a commit to AJ-Ianozi/getada-download that referenced this pull request Oct 12, 2023
* Add profile argument to rustup install

* Address some warnings

Signed-off-by: Nick Cameron <nrc@ncameron.org>

* Review changes

Signed-off-by: Nick Cameron <nrc@ncameron.org>
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.

None yet

5 participants