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

Do not list unavailable targets #1931

Merged
merged 2 commits into from
Jul 3, 2019

Conversation

kinnison
Copy link
Contributor

@kinnison kinnison commented Jul 2, 2019

We were mistakenly listing targets as available when they were not, resulting in confusion when running rustup target add all.

This change ensures that we do not do that, by ensuring we use extension targets rather than the toolchain's target, when checking availability. We do not do this for components too at this time, since components are almost always the same arch as the rustc itself.

Extensions might have a target other than that of the toolchain
so this change ensures we use the extension's target not the target
of the toolchain when determining if it's available.  This will as
a result prevent `rustup target list` listing known but unavailable
targets if `rust-std` is unavailable for that target.

Signed-off-by: Daniel Silverstone <[email protected]>
Verify that targets which are not available are not listed
when we look for targets in a toolchain.

Signed-off-by: Daniel Silverstone <[email protected]>
Copy link
Member

@nrc nrc left a comment

Choose a reason for hiding this comment

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

LGTM

@kinnison
Copy link
Contributor Author

kinnison commented Jul 3, 2019

AFAICS, the failures are the dist test timing out / crashing randomly on Windows CI - something we've not yet managed to reproduce outside of CI.

@kinnison kinnison merged commit 769b99b into rust-lang:master Jul 3, 2019
@kinnison kinnison deleted the kinnison/unavailable-targets branch July 3, 2019 07:29
@bors bors mentioned this pull request Jul 3, 2019
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.

2 participants