-
Notifications
You must be signed in to change notification settings - Fork 894
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
Cargo uses "its rustc" rather than the one mandated by the rustup toolchain
#809
Comments
I think this is a result of #707, making the proxies prepend to PATH, the toolchain path and CARGO_HOME, instead of appending CARGO_HOME then the toolchain path, which was trying to fix #475, making rustup work when CARGO_HOME is not set. The bug is that by prepending the toolchain path in front of CARGO_HOME, subsequent toolchain invocations are calling the (wrong) toolchain directly, instead of going through the rustup wrapper. The solution here I think is to change the prepend order, CARGO_HOME first, then the toolchain directory. |
As a workaround, one can copy a nightly Cargo executable into the |
…ctly The way the proxy was setting up the PATH variable contained two bugs: first, that it allowed the toolchain path to precede the value of CARGO_HOME/bin; but second that it didn't add CARGO_HOME/bin to the path at all. The result was that when e.g. cargo execs rustc, it was directly execing the toolchain rustc. Now it execs the proxy, assuming that CARGO_HOME/bin is set up correctly, and guaranteeing not to run the toolchain tool directly. Fixes rust-lang#809
…ctly The way the proxy was setting up the PATH variable contained two bugs: first, that it allowed the toolchain path to precede the value of CARGO_HOME/bin; but second that it didn't add CARGO_HOME/bin to the path at all. The result was that when e.g. cargo execs rustc, it was directly execing the toolchain rustc. Now it execs the proxy, assuming that CARGO_HOME/bin is set up correctly, and guaranteeing not to run the toolchain tool directly. Fixes rust-lang#809
just a different symptom of the same issue:
leaving this here so others with similar issues can find this issue |
…ctly The way the proxy was setting up the PATH variable contained two bugs: first, that it allowed the toolchain path to precede the value of CARGO_HOME/bin; but second that it didn't add CARGO_HOME/bin to the path at all. The result was that when e.g. cargo execs rustc, it was directly execing the toolchain rustc. Now it execs the proxy, assuming that CARGO_HOME/bin is set up correctly, and guaranteeing not to run the toolchain tool directly. Fixes rust-lang#809
…ctly The way the proxy was setting up the PATH variable contained two bugs: first, that it allowed the toolchain path to precede the value of CARGO_HOME/bin; but second that it didn't add CARGO_HOME/bin to the path at all. The result was that when e.g. cargo execs rustc, it was directly execing the toolchain rustc. Now it execs the proxy, assuming that CARGO_HOME/bin is set up correctly, and guaranteeing not to run the toolchain tool directly. Fixes rust-lang#809
…ctly The way the proxy was setting up the PATH variable contained two bugs: first, that it allowed the toolchain path to precede the value of CARGO_HOME/bin; but second that it didn't add CARGO_HOME/bin to the path at all. The result was that when e.g. cargo execs rustc, it was directly execing the toolchain rustc. Now it execs the proxy, assuming that CARGO_HOME/bin is set up correctly, and guaranteeing not to run the toolchain tool directly. Fixes rust-lang#809
…ctly The way the proxy was setting up the PATH variable contained two bugs: first, that it allowed the toolchain path to precede the value of CARGO_HOME/bin; but second that it didn't add CARGO_HOME/bin to the path at all. The result was that when e.g. cargo execs rustc, it was directly execing the toolchain rustc. Now it execs the proxy, assuming that CARGO_HOME/bin is set up correctly, and guaranteeing not to run the toolchain tool directly. Fixes rust-lang#809
@brson Could we get a new rustup release that contains this fix? A few rustc devs have hit this bug while testing their rustc changes. (Some of us use |
…ctly The way the proxy was setting up the PATH variable contained two bugs: first, that it allowed the toolchain path to precede the value of CARGO_HOME/bin; but second that it didn't add CARGO_HOME/bin to the path at all. The result was that when e.g. cargo execs rustc, it was directly execing the toolchain rustc. Now it execs the proxy, assuming that CARGO_HOME/bin is set up correctly, and guaranteeing not to run the toolchain tool directly. Fixes rust-lang#809
There's this text in the README:
And rustup does what it says: It uses e.g. stable Cargo if the custom toolchain doesn't include a Cargo but that Cargo uses e.g. stable rustc rather than the rustc in the custom toolchain.
I think this is a regression because I remember this used to "work". As in Cargo used the custom toolchain rustc.
STR
Sorry this is a little convoluted but avoids having to bootstrap a new rustc to show tho bug:
cc @brson
The text was updated successfully, but these errors were encountered: