Repository navigation
feat(toolchain): improve error reporting in rustc_version(), pt. 1 - #5225
Merged
Merged
Conversation
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
3 times, most recently
from
November 17, 2026 16:49
2f0c5e4 to
a94b6b4
Compare
rami3l
marked this pull request as ready for review
November 17, 2026 17:46
djc
approved these changes
Nov 18, 2026
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
from
November 18, 2026 14:34
a94b6b4 to
345b114
Compare
This comment has been minimized.
This comment has been minimized.
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
4 times, most recently
from
November 18, 2026 14:57
adecfd7 to
2f0643e
Compare
…ion()` Co-authored-by: bogay <pojay11523@gmail.com>
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
from
November 18, 2026 15:34
2f0643e to
2a6a997
Compare
Collaborator
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
Contributor
There was a problem hiding this comment.
🟡 Changes recommended
A custom rustc wrapper’s background helper can keep stderr open after the wrapper fails, causing stderr collection to block indefinitely and bypass the ten-second timeout.
1 open issue
What changed in this PR
This PR improves rustc_version() diagnostics so rustup reports why compiler version detection failed, addressing #3607 and replacing #4741.
Changes:
- Reports command-creation errors, launch failures, and compiler stderr or exit status.
- Uses
Cow<'static, str>for version strings throughout update reporting. - Adds CLI tests for missing compilers, recursion limits, nonzero exits, and permission errors.
| File | Description |
|---|---|
tests/suite/cli_rustup.rs |
Adds verbose toolchain error-reporting tests. |
src/toolchain.rs |
Expands version diagnostics and extracts first-line reading. |
src/install.rs |
Adapts stored previous versions to Cow. |
src/dist/mod.rs |
Updates previous date/version storage for the new return type. |
src/cli/self_update.rs |
Wraps the previous rustup version in Cow::Owned. |
src/cli/common.rs |
Adapts channel update output to Cow version strings. |
Review effort: Balanced
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
2 times, most recently
from
November 18, 2026 16:59
023c1a5 to
59c58d5
Compare
rustc_version()rustc_version(), pt. 1
1 task
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
2 times, most recently
from
November 18, 2026 21:05
9800d85 to
eebcd1a
Compare
djc
approved these changes
Nov 19, 2026
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
from
November 19, 2026 09:28
eebcd1a to
9638337
Compare
…ils to init Co-authored-by: bogay <pojay11523@gmail.com>
…ils to spawn Co-authored-by: bogay <pojay11523@gmail.com>
…ils with non-zero Co-authored-by: bogay <pojay11523@gmail.com>
rami3l
force-pushed
the
feat/rustc-version-error-2
branch
from
November 19, 2026 09:31
9638337 to
041d15e
Compare
rami3l
enabled auto-merge
November 19, 2026 09:32
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Related to #3607, replaces #4741.