Skip to content

feat(custom-toolchains): targets and components are now reported for custom toolchains #4347

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged

Conversation

FranciscoTGouveia
Copy link
Contributor

Continuation of #4333.

Instead of throwing an error, rustup target list and rustup component list now display the installed targets and components, respectively, for custom toolchains.

Similar to the previous PR, this assumes that there may not be a manifest file for custom toolchains. As a result, there is a minor inconsistency: using target/component list without the --installed flag always yields the same result as using it with the flag.

Thank you in advance for your time and input!

@rami3l rami3l self-assigned this May 27, 2025
Copy link
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.

LGTM modulo the comments, nice job!

PS: When addressing review comments, please squash relevant changes back to the respective original commit :)

…tom toolchains

As we cannot assume the existence of a manifest for custom toolchains,
we can only report the installed components/targets.
Thus, running `rustup target list` or `rustup target list --installed`,
will yield the same result.

The `list_items()` function was also refactored so that both custom and
distributable toolchains can make use of it.
@FranciscoTGouveia FranciscoTGouveia force-pushed the report-targets-custom-toolchains branch from 825052c to 577abcf Compare May 28, 2025 10:59
…targets

Since we can now list the available targets for a custom toolchain, this
test needed to be updated. This is consistent with the new migration to
the `.expect()` API's that were showcased in rust-lang#4343.
@rami3l rami3l force-pushed the report-targets-custom-toolchains branch from 577abcf to 2dd4a29 Compare May 28, 2025 14:27
@rami3l rami3l enabled auto-merge May 28, 2025 14:29
@rami3l rami3l added this pull request to the merge queue May 28, 2025
Merged via the queue into rust-lang:master with commit 2f72d0f May 28, 2025
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