Skip to content

Improve error message for incomplete toolchains#4819

Open
Inconnu08 wants to merge 1 commit intorust-lang:mainfrom
Inconnu08:improve-missing-manifest-error
Open

Improve error message for incomplete toolchains#4819
Inconnu08 wants to merge 1 commit intorust-lang:mainfrom
Inconnu08:improve-missing-manifest-error

Conversation

@Inconnu08
Copy link
Copy Markdown
Contributor

Improve the error message shown when rustup encounters a toolchain that is missing its manifest.

Interrupted installations can leave a partially installed toolchain behind. Rustup already improves the recovery experience when reinstalling such toolchains (#4725), but users can still encounter a confusing "Missing manifest" error when interacting with the incomplete toolchain before retrying installation.

  • Added a test that removes the manifest file from an installed toolchain and verifies the improved error message

Related to #4724
Builds on the interrupted-install UX improvements from #4725

Copy link
Copy Markdown
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 for working on this!

View changes since this review

Comment thread tests/suite/cli_rustup.rs
.with_stderr(str![[r#"
error: toolchain 'nightly-[HOST_TRIPLE]' appears to be incomplete
help: this may happen if the toolchain installation was interrupted
help: run `rustup toolchain install nightly-[HOST_TRIPLE]` to reinstall
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.

Suggest adding an extra step to see if the suggestion really works.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

I just tried adding an extra step to verify the suggested reinstall command, but it exposed that rustup toolchain install nightly currently reports the toolchain as unchanged and does not repair the missing-manifest state.

Since that seems like a separate behavioral issue, I’ve kept this PR focused on improving the diagnostic message.

I’ll open a follow-up issue to track this recovery behavior.

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