Skip to content
This repository has been archived by the owner on Jan 1, 2022. It is now read-only.

Please support a feature to omit all help and messages #109

Open
epage opened this issue Dec 6, 2021 · 6 comments
Open

Please support a feature to omit all help and messages #109

epage opened this issue Dec 6, 2021 · 6 comments

Comments

@epage
Copy link
Owner

epage commented Dec 6, 2021

Issue by joshtriplett
Sunday Nov 18, 2018 at 10:10 GMT
Originally opened as clap-rs/clap#1384


For the purposes of reducing binary size, I'd love to have a new default feature flag for clap (that projects could then disable) that would omit generated --help and all friendly error/constraint messages, and minimize error reporting to just "Invalid arguments" or similar. That would help for embedded use cases that may want to reduce the sizes of binaries used in scripting, without regard to human invocations of those binaries.

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by CreepySkeleton
Saturday Feb 01, 2020 at 15:28 GMT


Related to #1485

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by CreepySkeleton
Saturday Feb 01, 2020 at 15:37 GMT


Closing in favor of #1365

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by Dylan-DPC
Saturday Feb 01, 2020 at 15:41 GMT


This may be a side effect of that but not directly related. Reopening

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by Rua
Thursday Jan 21, 2021 at 14:34 GMT


I would like this as well, but supported as a runtime option instead of a feature flag, so that it can be enabled or disabled on a case-by-case basis.

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by ldm0
Thursday Jan 28, 2021 at 17:25 GMT


I would like this as well, but supported as a runtime option instead of a feature flag, so that it can be enabled or disabled on a case-by-case basis.

@Rua This issue is mainly about reducing binary size. If you just wanna control the help message emission in the runtime, the right-now approach is using try_get_matches to get a result and control the output by yourself.

@epage
Copy link
Owner Author

epage commented Dec 6, 2021

Comment by pksunkara
Wednesday Jun 16, 2021 at 01:27 GMT


Postponing this for later than 3.0 because we need design on how to divided the existing help, error messages, usage etc.. into separate feature flags.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant