Repository navigation
Conversation
2f0c5e4 to
a94b6b4
Compare
a94b6b4 to
345b114
Compare
This comment has been minimized.
This comment has been minimized.
adecfd7 to
2f0643e
Compare
…ion()` Co-authored-by: bogay <pojay11523@gmail.com>
2f0643e to
2a6a997
Compare
|
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. |
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
| match read_first_line( | ||
| child | ||
| .stderr | ||
| .expect("Child::stderr requested but not present"), | ||
| ) { |
There was a problem hiding this comment.
It looks like there is a pre-existing issue in read_first_line() even with the stdout part. I'm retracting the stderr-capturing part of the patch for now and hoping to address that properly in a later PR.
Update: Split into #5228.
…ils to init Co-authored-by: bogay <pojay11523@gmail.com>
…ils to spawn Co-authored-by: bogay <pojay11523@gmail.com>
023c1a5 to
59c58d5
Compare
rustc_version()rustc_version(), pt. 1
…ils with non-zero Co-authored-by: bogay <pojay11523@gmail.com>
dd49f5a to
9800d85
Compare

Related to #3607, replaces #4741.