Skip to content
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

Setting external subcommand type is inconsistent with args #3733

Closed
2 tasks done
epage opened this issue May 18, 2022 · 0 comments · Fixed by #3990
Closed
2 tasks done

Setting external subcommand type is inconsistent with args #3733

epage opened this issue May 18, 2022 · 0 comments · Fixed by #3990
Labels
A-builder Area: Builder API C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much M-breaking-change Meta: Implementing or merging this will introduce a breaking change.
Milestone

Comments

@epage
Copy link
Member

epage commented May 18, 2022

Please complete the following tasks

Rust Version

rustc 1.57.0 (f1edd0429 2021-11-29)

Clap Version

master

Minimal reproducible code

arg.value_parser(clap::value_parser!(OsString))

vs

cmd.allow_invalid_utf8_for_external_subcommands(true)

Steps to reproduce the bug with the above code

Build code around it

Actual Behaviour

Inconsistent

Expected Behaviour

Being able to set a ValueParser for external subcommands

Additional Context

The PartialEq requirement on commands is what held this back from being in #3732

Debug Output

No response

@epage epage added C-bug Category: Updating dependencies M-breaking-change Meta: Implementing or merging this will introduce a breaking change. A-builder Area: Builder API E-easy Call for participation: Experience needed to fix: Easy / not much labels May 18, 2022
@epage epage added this to the 4.0 milestone May 18, 2022
epage added a commit to epage/clap that referenced this issue Jul 25, 2022
This changes the default type as well to encourage preserving the full
information for shelling out.  If people need UTF-8, then they can
change the value parser.

Fixes clap-rs#3733
epage added a commit to epage/clap that referenced this issue Jul 25, 2022
This changes the default type as well to encourage preserving the full
information for shelling out.  If people need UTF-8, then they can
change the value parser.

Fixes clap-rs#3733
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-builder Area: Builder API C-bug Category: Updating dependencies E-easy Call for participation: Experience needed to fix: Easy / not much M-breaking-change Meta: Implementing or merging this will introduce a breaking change.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant