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

Does not respect +toolchain argument to cargo. #123

Open
adlerd opened this issue Mar 5, 2017 · 2 comments
Open

Does not respect +toolchain argument to cargo. #123

adlerd opened this issue Mar 5, 2017 · 2 comments

Comments

@adlerd
Copy link

adlerd commented Mar 5, 2017

Running cargo +nightly build builds with rustup's "nightly" toolchain.

However, xargo seems to ignore this option; when it's passed, xargo doesn't even attempt to build libcore:

# rustup default stable
# xargo +nightly build --target simple
<...>
error[E0463]: can't find crate for `core`
  |
  = note: the `simple` target may not be installed
<...>
@adlerd
Copy link
Author

adlerd commented Mar 5, 2017

Now that I think about it, cargo proper probably doesn't know about the +toolchain either; it's handled by the rustup stub. But since rustup doesn't know about xargo, but xargo knows about rustup, it seems xargo should be the one interpreting and redirecting the flag: xargo +toolchain -> rustup run toolchain xargo, which works fine.

@japaric
Copy link
Owner

japaric commented Mar 6, 2017

The thing is that Xargo does nothing (it doesn't build a sysroot) when invoked with a stable / beta toolchain. The problem here is that Xargo uses the rustc_version crate, which knows nothing about rustup, to get information (e.g. what channel is being used) about the toolchain.

To fix this we could special case the +$channel argument and use the rustc_version::version_meta_for function with the output of rustc +$channel -Vv instead of vanilla rustc_version::version_meta.

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

No branches or pull requests

2 participants