Skip to content

Add help message for missing toolchain #3939

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

Merged

Conversation

jtr860830
Copy link

@jtr860830 jtr860830 commented Jul 11, 2024

Closes #3573.

This patch adds a suggestion to run rustup install <toolchain> for missing toolchain.

Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

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

Thanks a lot for helping out! It'll be nice if you adjust our integration test accordingly as well :)

@jtr860830
Copy link
Author

Thanks a lot for helping out! It'll be nice if you adjust our integration test accordingly as well :)

OK, I'll adjust it. Thx for replying!

@rami3l
Copy link
Member

rami3l commented Jul 11, 2024

Thanks a lot for helping out! It'll be nice if you adjust our integration test accordingly as well :)

OK, I'll adjust it. Thx for replying!

@jtr860830 No worries! Just remember to squash everything into a single commit since it's a single unit of change: we use atomic commits across the repo.

The integration test you need to fix is suite::cli_exact::undefined_linked_toolchain, as indicated by the CI log.

@jtr860830 jtr860830 force-pushed the add-help-messages-for-missing-toolchain branch from 00ddad1 to cf73e77 Compare July 11, 2024 10:20
rami3l
rami3l previously approved these changes Jul 11, 2024
Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

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

LGTM, and thanks again for helping out! :)

@rami3l rami3l dismissed their stale review July 11, 2024 10:26

Concern: ignore non-official toolchain names

@rami3l
Copy link
Member

rami3l commented Jul 11, 2024

@jtr860830 Sorry, but I've changed my mind regarding this change, since it doesn't make the distinction between a typo (like bogus) and an actual toolchain that can be installed with rustup toolchain install (like nightly-x86_64-unknown-linux-gnu). Can we print out the second line only in the second case?

Hint: Use PartialToolchainDesc::from_str().

@jtr860830
Copy link
Author

@jtr860830 Sorry, but I've changed my mind regarding this change, since it doesn't make the distinction between a typo (like bogus) and an actual toolchain that can be installed with rustup toolchain install (like nightly-x86_64-unknown-linux-gnu). Can we print out the second line only in the second case?

Hint: Use PartialToolchainDesc::from_str().

I get it. I'll improve it!

@jtr860830 jtr860830 force-pushed the add-help-messages-for-missing-toolchain branch from cf73e77 to c32a1e7 Compare July 11, 2024 14:50
@jtr860830 jtr860830 force-pushed the add-help-messages-for-missing-toolchain branch from c32a1e7 to 6bcdf1f Compare July 11, 2024 16:16
@rami3l rami3l force-pushed the add-help-messages-for-missing-toolchain branch from 6bcdf1f to 99d433c Compare July 12, 2024 01:15
Copy link
Member

@rami3l rami3l left a comment

Choose a reason for hiding this comment

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

Sorry for the delay, and thanks again for your help!

@rami3l rami3l enabled auto-merge July 12, 2024 01:20
@rami3l rami3l disabled auto-merge July 12, 2024 01:28
Co-authored-by: rami3l <rami3l@outlook.com>
@rami3l rami3l force-pushed the add-help-messages-for-missing-toolchain branch from 99d433c to 28a3d79 Compare July 12, 2024 01:30
@rami3l rami3l enabled auto-merge July 12, 2024 01:30
@rami3l rami3l added this pull request to the merge queue Jul 12, 2024
Merged via the queue into rust-lang:master with commit e6bfd1f Jul 12, 2024
27 checks passed
@jtr860830
Copy link
Author

Sorry for the delay, and thanks again for your help!

This PR has taught me a lot. Thx for your help!

@jtr860830 jtr860830 deleted the add-help-messages-for-missing-toolchain branch July 12, 2024 03:45
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.

improve error message for missing toolchain
2 participants