Skip to content

Use clap dynamic completion for +toolchain - #5033

Merged
rami3l merged 3 commits into
rust-lang:mainfrom
Cloud0310:clap-completion
Aug 25, 2026
Merged

Use clap dynamic completion for +toolchain#5033
rami3l merged 3 commits into
rust-lang:mainfrom
Cloud0310:clap-completion

Conversation

@Cloud0310

@Cloud0310 Cloud0310 commented Aug 24, 2026

Copy link
Copy Markdown
Contributor

Related to #2268.

Verified manually (see #5033 (comment)).

Comment thread src/bin/rustup-init.rs Outdated
Comment thread src/cli/rustup_mode.rs Outdated
Comment thread src/cli/rustup_mode.rs Outdated
Comment thread tests/suite/cli_misc.rs
Comment thread src/cli/rustup_mode.rs Outdated
Comment thread src/cli/rustup_mode.rs Outdated
@rami3l
rami3l force-pushed the clap-completion branch 2 times, most recently from 4829036 to 61462d2 Compare August 25, 2026 08:49
@rami3l
rami3l marked this pull request as draft August 25, 2026 10:18
@Cloud0310
Cloud0310 requested a review from rami3l August 25, 2026 13:05
@rami3l
rami3l marked this pull request as ready for review August 25, 2026 13:07

@rami3l rami3l left a comment

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.

Great work!

I have one remaining concern and I guess we can merge this real quick once that is resolved.

View changes since this review

Comment thread src/cli/rustup_mode.rs Outdated
Comment thread src/cli/rustup_mode.rs
Co-authored-by: rami3l <rami3l@outlook.com>

@rami3l rami3l left a comment

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.

@Cloud0310 I think we can leave the rest (what to change in rustup completions, what to change in the docs etc.) to future PRs.

Let's merge this first and unblock @FranciscoTGouveia!

View changes since this review

@rami3l
rami3l enabled auto-merge August 25, 2026 15:15
@rami3l
rami3l added this pull request to the merge queue Aug 25, 2026
@Cloud0310

Copy link
Copy Markdown
Contributor Author

@Cloud0310 I think we can leave the rest (what to change in rustup completions, what to change in the docs etc.) to future PRs.

Let's merge this first and unblock @FranciscoTGouveia!

View changes since this review

Yes, but I guess the reasonable choice on Windows dynamic completion is to opt in finally, for unix I guess it's okay for defaulting to use dynamic completion by default. And this should be documented as well. Till' Windows has a solution for their poor pipe performance under pwsh (this is even slower then loading from the disk), guess defaulting to dynamic shouldn't be a valid option.

@rami3l

rami3l commented Aug 25, 2026

Copy link
Copy Markdown
Member

@Cloud0310 Sure. OTOH cargo's support for dynamic completions is also unstable so I think there is no rush in resolving this...

@Cloud0310 Cloud0310 closed this Aug 25, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a manual request Aug 25, 2026
@Cloud0310
Cloud0310 deleted the clap-completion branch August 25, 2026 15:43
@Cloud0310
Cloud0310 restored the clap-completion branch August 25, 2026 16:08
@Cloud0310 Cloud0310 reopened this Aug 25, 2026
@rami3l
rami3l enabled auto-merge August 25, 2026 16:08
@Cloud0310

Copy link
Copy Markdown
Contributor Author

Sorry for the misclick.

@rami3l
rami3l added this pull request to the merge queue Aug 25, 2026
@rami3l

rami3l commented Aug 25, 2026

Copy link
Copy Markdown
Member

Sorry for the misclick.

@Cloud0310 No worries! I've re-enqueued the PR, it should be good now.

Merged via the queue into rust-lang:main with commit 9b191c4 Aug 25, 2026
62 checks passed
@rami3l
rami3l deleted the clap-completion branch August 25, 2026 17:01
@rami3l rami3l changed the title Use clap dynamic parsing to fix toolchain completion Use clap dynamic toolchain completion for +toolchain Aug 26, 2026
@rami3l rami3l changed the title Use clap dynamic toolchain completion for +toolchain Use clap dynamic completion for +toolchain Aug 26, 2026
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.

2 participants