Skip to content

Display the full names of targets not matching the host target tuple#4885

Merged
rami3l merged 1 commit into
rust-lang:mainfrom
mrmelon54:display-target-full-names
May 29, 2026
Merged

Display the full names of targets not matching the host target tuple#4885
rami3l merged 1 commit into
rust-lang:mainfrom
mrmelon54:display-target-full-names

Conversation

@mrmelon54
Copy link
Copy Markdown
Contributor

Displays the target tuple when it doesn't match the host target tuple.

Example output:

info: downloading 7 components
                             cargo installed                       10.64 MiB (29.13 MiB/s, ETA: 0s)                                         
                            clippy installed                        4.58 MiB (27.97 MiB/s, ETA: 0s)                                         
                         rust-docs installed                       21.29 MiB (8.54 MiB/s, ETA: 0s))s)                                       
rust-std-aarch64-unknown-linux-gnu installed                       27.12 MiB (26.71 MiB/s, ETA: 0s)                                         
                          rust-std installed                       28.36 MiB (26.10 MiB/s, ETA: 0s)                                         
                             rustc installed                       76.47 MiB (30.56 MiB/s, ETA: 0s)                                         
                           rustfmt installed                        2.06 MiB                                                                info: default toolchain set to stable-x86_64-unknown-linux-gnu

Resolves #4884

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.

I just checked and the old version before the regression used to print both short name and target name (but one component per line), so this looks fine.

Actually a width of 100 chars might be okay in this case, given that aarch64-unknown-linux-gnu should be among the long ones already... Thanks again!

PS: I have a small nit here, please squash all changes into one before after addressing it we can merge it.

View changes since this review

Comment thread src/dist/manifest.rs Outdated
@rami3l
Copy link
Copy Markdown
Member

rami3l commented May 29, 2026

PPS: If there are even longer component names, then we can probably reduce the size of the progress bar itself. The width of the first column has been known since #4768 by @Cloud0310 so I guess it'd be rather easy to do afterwards.

@mrmelon54 mrmelon54 force-pushed the display-target-full-names branch 2 times, most recently from 24fc8a7 to 99b2cb9 Compare May 29, 2026 17:23
@mrmelon54
Copy link
Copy Markdown
Contributor Author

I made the requested change, formatted my code, and squashed my commits.

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.

I made the requested change, formatted my code, and squashed my commits.

@mrmelon54 Many thanks again!

I have a minor question though... What do you think will be more intuitive to the user, hiding the target tuple based on the current toolchain's host target tuple, or based on the current host's target tuple?

There is a rare case where e.g. Windows x64 machines can install i686 toolchains, and in this case the former will be i686, while the latter will be x64...

View changes since this review

Comment thread src/dist/manifestation.rs Outdated
@mrmelon54
Copy link
Copy Markdown
Contributor Author

I have a minor question though... What do you think will be more intuitive to the user, hiding the target tuple based on the current toolchain's host target tuple, or based on the current host's target tuple?

There is a rare case where e.g. Windows x64 machines can install i686 toolchains, and in this case the former will be i686, while the latter will be x64...

I thought about that too, the default toolchain might make more sense as a baseline for hiding the target tuple.

Comment thread src/dist/manifestation.rs Outdated
@mrmelon54 mrmelon54 force-pushed the display-target-full-names branch from 99b2cb9 to e0fcc58 Compare May 29, 2026 20:28
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.

@rami3l rami3l enabled auto-merge May 29, 2026 20:33
@rami3l rami3l disabled auto-merge May 29, 2026 20:35
@rami3l rami3l enabled auto-merge May 29, 2026 20:36
@rami3l rami3l added this pull request to the merge queue May 29, 2026
Merged via the queue into rust-lang:main with commit 6c8da21 May 29, 2026
29 checks passed
@mrmelon54 mrmelon54 deleted the display-target-full-names branch May 29, 2026 21:16
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.

Add target names during rust-std downloads

2 participants