Skip to content

Improve error message for incomplete toolchains#4819

Merged
rami3l merged 1 commit intorust-lang:mainfrom
Inconnu08:improve-missing-manifest-error
Apr 23, 2026
Merged

Improve error message for incomplete toolchains#4819
rami3l merged 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 Outdated
.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

@Inconnu08 Inconnu08 Apr 19, 2026

Choose a reason for hiding this comment

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

Edit: I tried verifying the suggested reinstall step.

In the test environment, rustup toolchain install nightly reports the toolchain as unchanged and does not repair the missing-manifest state.

However, when testing manually with a real dist server, I noticed that rustup component list --toolchain nightly actually triggers a re-sync and repairs the toolchain automatically.

So recovery currently depends on the command used, and toolchain install does not explicitly detect and repair incomplete states.

Given this, I think the current suggestion may be misleading, so I’m considering adjusting the help text to be less prescriptive and soften it.

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.

So after further testing, I re-ran the reproduction using the exact same dated toolchain (nightly-2026-01-01) to avoid channel updates.

In that case, both:

  • rustup component list --toolchain nightly-2026-01-01
  • rustup toolchain install nightly-2026-01-01

fail to recover the toolchain, and toolchain install still reports it as unchanged.

So it seems the issue is not just command inconsistency, but that toolchain install does not detect or repair an incomplete toolchain in this state.

I’ll open a follow-up issue to track this behavior, and keep this PR focused on just improving the diagnostic and softening the help text.

Copy link
Copy Markdown
Member

@rami3l rami3l Apr 22, 2026

Choose a reason for hiding this comment

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

@Inconnu08 Ah, I see. In that case it's worth going for #4825. Many thanks for the investigation :)

PS: Rethinking about it, we can indeed have a vague wording to begin with, it's better than having nothing 🙏

@Inconnu08 Inconnu08 force-pushed the improve-missing-manifest-error branch from 96cbb9e to 787f6ff Compare April 22, 2026 01:19
Comment thread tests/suite/cli_rustup.rs Outdated
Comment thread src/errors.rs Outdated
@Inconnu08 Inconnu08 force-pushed the improve-missing-manifest-error branch from 787f6ff to 376d932 Compare April 23, 2026 01:42
@rami3l
Copy link
Copy Markdown
Member

rami3l commented Apr 23, 2026

Let's merge this first and see how it goes, I guess #4825 can wait until later :)

@rami3l rami3l added this pull request to the merge queue Apr 23, 2026
Merged via the queue into rust-lang:main with commit 0cfb880 Apr 23, 2026
29 checks passed
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.

3 participants