Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.
Sign upRecursive tool invocations should invoke the proxy, not the tool dire… #812
Conversation
This comment has been minimized.
This comment has been minimized.
michaelwoerister
commented
Nov 15, 2016
|
Nice! |
This comment has been minimized.
This comment has been minimized.
|
Pushed a test commit to try to understand what's going on on the bots. |
brson
force-pushed the
brson:proxy-fix
branch
from
8cbe1de
to
c8dec07
Nov 17, 2016
This comment has been minimized.
This comment has been minimized.
|
OK, I think I've got the test written correctly. |
This comment has been minimized.
This comment has been minimized.
|
Legit failures on windows. |
This comment has been minimized.
This comment has been minimized.
|
Well, |
brson
referenced this pull request
Nov 18, 2016
Closed
rustup-init x86_64-pc-windows-gnu reparse links created in msys2 shell corrupted #488
This comment has been minimized.
This comment has been minimized.
|
I think I'm just going to clean this up and merge the fix for unix, and figure out the windows junction problems later. |
Diggsey
referenced this pull request
Nov 19, 2016
Merged
Canonicalize the path and then strip off the `\\?\` prefix before cre… #823
This comment has been minimized.
This comment has been minimized.
|
|
brson
force-pushed the
brson:proxy-fix
branch
from
0d82b65
to
bb64297
Nov 22, 2016
This comment has been minimized.
This comment has been minimized.
|
OK, I've got a variation that works on windows now. Turned out to be 3 bugs preventing linked toolchains from working properly on windows! First, std's So there's some hacks here. |
brson
reviewed
Nov 22, 2016
| } else { | ||
| env::args_os().take(1).chain(env::args_os().skip(2)).collect() | ||
| env::args_os().skip(2).collect() |
This comment has been minimized.
This comment has been minimized.
brson
Nov 22, 2016
Author
Contributor
These were incidental changes to improve error reporting in the proxies.
brson
reviewed
Nov 22, 2016
| @@ -1,8 +1,6 @@ | |||
| use std::env; | |||
This comment has been minimized.
This comment has been minimized.
brson
force-pushed the
brson:proxy-fix
branch
from
bb64297
to
fa8a05d
Nov 22, 2016
This comment has been minimized.
This comment has been minimized.
|
Well, this doesn't pass the test suite... Edit: oh, I updated my toolchain and the test suite no longer passes because of assumptions it contained about the relative path between test exes and rustup-init.exe, so the test failures are on my end. |
brson
force-pushed the
brson:proxy-fix
branch
from
fa8a05d
to
87d9452
Nov 22, 2016
brson
force-pushed the
brson:proxy-fix
branch
from
87d9452
to
a7cba0c
Nov 22, 2016
alexcrichton
reviewed
Nov 22, 2016
|
Seems ok to me, to be honest I'm not really sure what's going on here though. If it fixes things them I'm fine merging. I guess I always figured that rustup proxies always had the highest priority in |
| } else { | ||
| false | ||
| }; | ||
| utils::is_directory(&self.path) || is_symlink |
This comment has been minimized.
This comment has been minimized.
alexcrichton
Nov 22, 2016
Member
Hm I'm somewhat dubious about this change. Perhaps the error is that the call to fs::metadata returns false for is_directory? Couldn't function just be self.path.exists()?
This comment has been minimized.
This comment has been minimized.
alexcrichton
Nov 22, 2016
Member
Er to elaborate, this is fine, but I feel like this is just jumping through too many hoops to conclude that something is a directory when all we're interested in is if a path exists or not.
This comment has been minimized.
This comment has been minimized.
Diggsey
Nov 22, 2016
•
Contributor
@alexcrichton The reason we care that it's a directory is because sometimes extra files get created (think thumbs.db or various dot files) and it's better if rustup doesn't confuse them for toolchains.
This comment has been minimized.
This comment has been minimized.
|
Failure seems bogus. |
This comment has been minimized.
This comment has been minimized.
That's what it should do, yes, and it used to, and this patch makes it do that again. |
This comment has been minimized.
This comment has been minimized.
|
The fallback is when rustup uses the nightly (fallback) cargo against a custom toolchain that doesn't contain cargo. |
brson
merged commit 4d38610
into
rust-lang:master
Nov 23, 2016
This comment has been minimized.
This comment has been minimized.
michaelwoerister
commented
Nov 23, 2016
|
|
This comment has been minimized.
This comment has been minimized.
|
Just logging this because it happened, but I don't think this is something we should change. I believe this commit broke Cargo's test suite unfortunately. Specifically when I'm... not entirely sure how to fix this, but I'll try to figure something out. |
alexcrichton
referenced this pull request
Dec 13, 2016
Closed
`cargo test` incompatible with latest rustup #3394
This comment has been minimized.
This comment has been minimized.
MoSal
commented on src/rustup/command.rs in a7cba0c
Feb 28, 2017
|
This line causes a compile failure in latest nightly. |
brson commentedNov 15, 2016
…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 #809
r? @Diggsey cc @japaric @michaelwoerister