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

Thread toolchain through to error message #1616

Merged
merged 1 commit into from
Mar 5, 2019

Conversation

kinnison
Copy link
Contributor

In the component-unavailable error case, we need to report the
full toolchain rather than just the component and target name.
This threads it through and reports it in the error message.

Fixes: #1596

This is not ideal right now, but it's a starting point for discussion.

Currently the error message ends up looking something like:

error: component 'rust-std' for target 'x86_64-unknown-linux-gnu' is unavailable for download for toolchain 'nightly-x86_64-unknown-linux-gnu'

Clearly the repetition of the target name in the toolchain name isn't ideal, I've been considering
reformatting the message but didn't want to do so without some further input on what might be better.

@h-michael
Copy link
Contributor

h-michael commented Jan 21, 2019

How about download for 'nightly' channel?

@kinnison
Copy link
Contributor Author

I need to work out the right way to produce a "short" toolchain, but yes that wording migh be nicer @h-michael

@kinnison
Copy link
Contributor Author

I've managed to make it say that (and if there's a date associated, channel-date) so I'd appreciate reviews / opinions. If noone has anything negative to say in the next day or so I'll un-WIP this.

@nrc
Copy link
Member

nrc commented Jan 22, 2019

Looks good. We would want to fix the repetition. We should probably split the toolchain into channel and host (is it host or target, actually?) and only report the channel and host if it is different to the target

@kinnison
Copy link
Contributor Author

So I changed the toolchain to just be channel or channel-date but I suppose we properly need to distinguish the toolchain host if it doesn't match the host of the system running rustup. The goal would be to ensure that the toolchain statement in the error message should match what is being used with the minimal content possible.

I think this probably needs careful thought to decide what's ideal. What is here now is better, but perhaps not ideal.

@dwijnand
Copy link
Member

Removing the repetition seems to me like a nice-to-have of lesser value than resolving #1596, so I'm happy to accept this as is and trim it later/never.

@bors
Copy link
Contributor

bors commented Feb 10, 2019

☔ The latest upstream changes (presumably #1643) made this pull request unmergeable. Please resolve the merge conflicts.

In the component-unavailable error case, we need to report the
full toolchain rather than just the component and target name.
This threads it through and reports it in the error message.

Fixes: rust-lang#1596

Signed-off-by: Daniel Silverstone <[email protected]>
@kinnison kinnison force-pushed the kinnison/fix-1596 branch from 563c9d1 to e05b98b Compare March 1, 2019 21:03
@kinnison kinnison changed the title WIP: Thread toolchain through to error message Thread toolchain through to error message Mar 1, 2019
@kinnison
Copy link
Contributor Author

kinnison commented Mar 1, 2019

I've opted to rebase this onto mater and as per @dwijnand 's observation that something is better than nothing, I commend it for review and ideally merge.

I'm not sure entirely how I'd make the change which we've identified as most desirable so I suggest that we take this for now, and consider fixing up the suggestions further after simplification has proceeded somewhat.

@kinnison kinnison merged commit 37fd750 into rust-lang:master Mar 5, 2019
@kinnison kinnison deleted the kinnison/fix-1596 branch March 5, 2019 20:41
@bors bors mentioned this pull request Mar 5, 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.

5 participants