Skip to content

Do not list unavailable targets - #1931

Merged
kinnison merged 2 commits into
rust-lang:masterfrom
kinnison:kinnison/unavailable-targets
Jul 3, 2019
Merged

Do not list unavailable targets#1931
kinnison merged 2 commits into
rust-lang:masterfrom
kinnison:kinnison/unavailable-targets

Conversation

@kinnison

Copy link
Copy Markdown
Contributor

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 <dsilvers@digital-scurf.org>
Verify that targets which are not available are not listed
when we look for targets in a toolchain.
Signed-off-by: Daniel Silverstone <dsilvers@digital-scurf.org>
nrc
nrc approved these changes Jul 3, 2019

@nrcnrc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

LGTM

@kinnison

Copy link
Copy Markdown
ContributorAuthor

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:masterJul 3, 2019
@kinnison
kinnison deleted the kinnison/unavailable-targets branch July 3, 2019 07:29
@borsbors mentioned this pull request Jul 3, 2019
Sign up for freeto 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

@kinnison@nrc