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

Don't prepend CARGO_HOME/bin unnecessarily #2978

Merged
merged 3 commits into from
Apr 18, 2022

Conversation

jonhoo
Copy link
Contributor

@jonhoo jonhoo commented Apr 14, 2022

The current logic forces nested invocations to execute cargo and
friends from $CARGO_HOME/bin. This makes rustup break in environments
where the appropriate rustup proxies to use happen to be installed
elsewhere (earlier on $PATH), and using the binaries in
$CARGO_HOME/bin would not work correctly.

It also ensures that Rustup won't change $PATH "just for the heck of
it", which should help reduce unnecessary re-compilations when
downstream build logic notices that $PATH changes (since it will no
longer).

Helps with #2848.

Fixes rust-lang/cargo#7431.

The current logic forces nested invocations to execute `cargo` and
friends from `$CARGO_HOME/bin`. This makes rustup break in environments
where the appropriate rustup proxies to use happen to be installed
elsewhere (earlier on `$PATH`), and using the binaries in
`$CARGO_HOME/bin` would not work correctly.

It also ensures that Rustup won't change `$PATH` "just for the heck of
it", which _should_ help reduce unnecessary re-compilations when
downstream build logic notices that `$PATH` changes (since it will no
longer).

Helps with rust-lang#2848.

Fixes rust-lang/cargo#7431.
Jon Gjengset added 2 commits April 14, 2022 16:10
On Windows for example, another path is added into the mix, but it
doesn't affect what we want to test for.
@jonhoo
Copy link
Contributor Author

jonhoo commented Apr 15, 2022

The armv7 build failure appears to be a Docker problem. Daniel's take (on Discord) was:

That can happen in the rust-lang/rust repo doesn't quite do the right things
It'll resolve after the next nightly build I think

The FreeBSD failure appears to be a time-out unrelated to this change.

@GuillaumeGomez
Copy link
Member

For the timeout issue on cirrus-ci, you can increase the build time limit like this:

task: 
  timeout_in: 120m

@kinnison kinnison merged commit 7220628 into rust-lang:master Apr 18, 2022
@jonhoo jonhoo deleted the dont-add-if-added branch May 6, 2022 17:07
tiagolobocastro added a commit to openebs/mayastor-control-plane that referenced this pull request Dec 13, 2022
Avoids a bug where rustup adds cargo bin twice:
rust-lang/rustup#2978

For all intents and purposes we should be fine to use the current path from runtime.

Signed-off-by: Tiago Castro <tiagolobocastro@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants