-
-
Notifications
You must be signed in to change notification settings - Fork 1k
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
Stablize App::replace
Tracking Issue
#2836
Comments
We should link implementation also, right? |
Works for me. |
Another issue with this feature as the use case is documented here |
Due to the lack of interest on this tracking issue, I'm considering removing this unstable feature. Any concerns people want to raise? |
Would you happen to have ideas on how to solve the mentioned issues? Maybe by restricting |
But the problem in #2011 is with subcommands and I thought they were the primary motivation for this. There is also the item brought up about being invisible in I also feel like there has been little interest expressed in this that it makes me wonder if the feature is worth it in the first place. |
Yeah, that's what I meant. The current API replaces any and all input. Maybe we can restrict it to only replace subcommands by doing asserts. That, way we can use the replace config to solve the above-mentioned issues.
People might not be talking about it because they don't have anything to complain. That's something we might have different opinions about. I would recommend keeping it. |
Except for the fact that its unstable which carries its own level of risk, including it being removed. Features carry a cost and we need to balance that cost against the impact they have on end-users. Right now, command aliases can be emulated by duplicating the commands. This is also done in our "default subcommand" example (see the git examples). People requested that workflow to be streamlined but with us having a workaround, the cost seemed hardly justified. I feel like this might be another one of those scenarios. |
This has been implemented for 3 years without much traction for finishing it up. The subcommand use case can be worked around by creating `Command`s that just include the relevant logic, very similar to the default subcommand examples in `git` / `git-derive`. Using this for flags is covered by clap-rs#4793. Without `unstable-replace` being enabled, this still cut 5 KiB from `cargo bloat --release --example git`. Closes clap-rs#2836 Closes clap-rs#2011
Original request: #1603
Original PR: #1697
Feature flag:
unstable-replace
Known issues:
App::replace
is used #2011--help
The text was updated successfully, but these errors were encountered: