Commit graph

5941 commits

Author SHA1 Message Date
Ed Page
8c7fe8bb2f
Merge pull request #3986 from epage/override
fix(assert)!: Disallow self-overrides
2022-07-25 12:58:59 -05:00
Ed Page
b47a8453d7
Merge pull request #3933 from emersonford/vec-value-enum-default-value-t
feat(clap_derive): Add `default_values_t` and `default_values_os_t` for Vec field types
2022-07-25 12:54:43 -05:00
Ed Page
ec38212dcb fix(assert)!: Disallow self-overrides
This will make it easier to drop support for multiple occurrences
2022-07-25 12:46:16 -05:00
Ed Page
5a8e2046af fix(assert)!: Ensure overrides_with IDs are valid 2022-07-25 12:26:32 -05:00
Emerson Ford
04e0ed7474 feat(clap_derive): Add default_values_t and default_values_os_t 2022-07-25 10:14:04 -07:00
Ed Page
fe6c0a509e
Merge pull request #3985 from tshepang/master
docs: Remove extraneous words
2022-07-25 09:20:34 -05:00
Tshepang Mbambo
2facce8301 docs: Remove extraneous words 2022-07-25 15:47:49 +02:00
Ed Page
8e0d6b011a
Merge pull request #3983 from tshepang/master
docs: typo
2022-07-25 08:01:45 -05:00
Tshepang Mbambo
ec9dcaaf16 docs: Fix a typo 2022-07-24 16:00:59 +02:00
Ed Page
732a21b1bf test: Make version agnostic 2022-07-23 21:55:30 -05:00
Ed Page
a8881dfdba
Merge pull request #3982 from epage/ver
chore: Update version
2022-07-23 21:47:40 -05:00
Ed Page
8aa7ab3e16 chore: Update version
The main goal is to reduce the risk of people developing on the wrong
release, assuming they are using something like starship to raise the
visibility of the crate version.
2022-07-23 21:43:37 -05:00
Ed Page
ae35ff12ff
Merge pull request #3981 from epage/dep
fix!: Remove more deprecated APIs
2022-07-23 21:37:51 -05:00
Ed Page
dad2492de0 docs: Note change in derive behavior 2022-07-23 21:24:11 -05:00
Ed Page
a3356aae43 fix!: Remove more deprecated APIs 2022-07-23 21:23:06 -05:00
Ed Page
0eaec6085a
Merge pull request #3978 from epage/perf
perf: Remove some monomorphization bloat
2022-07-23 21:17:07 -05:00
Ed Page
7518332e56
Merge pull request #3979 from Lioness100/patch-1
docs: Remove extra bracket typo
2022-07-23 11:53:11 -05:00
Lioness100
304297e5c8
docs: remove extra bracket typo 2022-07-23 08:23:11 -07:00
Ed Page
8e38caadcc perf: Remove some monomorphization bloat
When checking into binary size, I noticed that the `git` example is a
lot larger than v3.  `git bisect` narrowed it down to
11076a5c70 which doesn't make sense.  I
did noticed we could remove some bloat from monomorphization.

Overall for `cargo-example, we've dropped about 47 KiB.
2022-07-22 21:02:45 -05:00
Ed Page
08e8642a8c
Merge pull request #3976 from epage/attrib
fix(derive)!: Remove value_parser/action defaulted attributes
2022-07-22 20:25:09 -05:00
Ed Page
8771f941e0
Merge pull request #3977 from epage/action
fix!: Remove deprecated ArgActions
2022-07-22 20:24:32 -05:00
Ed Page
6ecb7310a8 fix(derive)!: Remove value_parser/action defaulted attributes 2022-07-22 20:07:47 -05:00
Ed Page
50259e51d5 fix!: Remove deprecated ArgActions 2022-07-22 20:07:24 -05:00
Ed Page
122b562e6b fix!: Change default actions to Set/SetTrue
This is in prep for removing StoreValue/IncOccurrences
2022-07-22 20:00:47 -05:00
Ed Page
4b499ac024 docs(env): Fix bool example 2022-07-22 19:51:23 -05:00
Ed Page
0039ef91fa fix: Have arg! collection across flags for positionals 2022-07-22 19:51:23 -05:00
Ed Page
3356e24360 refactor: Move action defaulting to where it belongs 2022-07-22 19:46:07 -05:00
Ed Page
3ca27f0879 refactor: Remove dead code for NoAutoHelp/NoAutoVersion 2022-07-22 19:42:49 -05:00
Ed Page
f47c361cdb
Merge pull request #3975 from epage/ord
fix(help)!: Make DeriveDisplayOrder the default, removing it
2022-07-22 16:18:51 -05:00
Ed Page
24735e3a1d fix!: Pull AppSettings out of API
Part of #3021
2022-07-22 16:05:54 -05:00
Ed Page
11076a5c70 fix(help)!: Make DeriveDisplayOrder the default, removing it
Force sorting with `next_display_order(None)`

Fixes #2808
2022-07-22 15:52:03 -05:00
Ed Page
389ff4ff21 fix(help): Subcommand display order respects Command::next_display_order
Previous behavior:
- They'd be sorted by default
- They'd derive display order if `DeriveDisplayOrder` was set
  - This could be set recursively
- The initial display order value for subcommands was 0

New behavior:
- Sorted order is derived by default
- Sorting is turned on by `cmd.next_display_order(None)`
  - This is not recursive, it must be set on each level
- The display order incrementing is mixed with arguments
  - This does make it slightly more difficult to predict
2022-07-22 15:03:16 -05:00
Ed Page
ce8ebe1ccc
Merge pull request #3974 from epage/conflict
fix!: Ignore required when subcommands conflict with required
2022-07-22 14:25:12 -05:00
Ed Page
e09a3321af fix!: Ignore required when subcommands conflict with required
Fixes #3940
2022-07-22 14:10:27 -05:00
Ed Page
bd0ceb7a0a
Merge pull request #3972 from epage/arg-macro
fix!: Change `arg!` to use ArgAction
2022-07-22 13:41:17 -05:00
Ed Page
36dcb05d96 fix!: Change arg! to use ArgAction
Fixes #3795
2022-07-22 13:24:40 -05:00
Ed Page
d162b846ca
Merge pull request #3973 from epage/help-env
fix(env)!: Parse help/version like normal
2022-07-22 13:23:06 -05:00
Ed Page
b77ed545ac fix(env)!: Parse help/version like normal
Fixes #3776
2022-07-22 13:12:12 -05:00
Ed Page
bcc689df24
Merge pull request #3969 from epage/else
fix(derive): Move off of SubcommandRequiredElseHelp
2022-07-22 12:52:04 -05:00
Ed Page
8b064cfee9 fix(derive): Move off of SubcommandRequiredElseHelp
This also let us remove the deprecated attribute

Fixes #3280
2022-07-22 12:33:31 -05:00
Ed Page
50019cacdc
Merge pull request #3967 from epage/parse
fix(derive)!: Remove deprecated parse attribute
2022-07-22 12:27:43 -05:00
Ed Page
b8d769a1a4
Merge pull request #3968 from epage/suberror
fix(error)!: Merge UnrecognizedSubcommand into InvalidSubcommand
2022-07-22 12:24:27 -05:00
Ed Page
7068586246 fix(derive)!: Remove deprecated parse attribute 2022-07-22 12:14:29 -05:00
Ed Page
0d459128d7 fix(error)!: Merge UnrecognizedSubcommand into InvalidSubcommand
Fixes #3676
2022-07-22 12:12:35 -05:00
Ed Page
5a4da7e777
Merge pull request #3966 from epage/unstable
fix!: Remove `unstable-v4` feature gate
2022-07-22 11:53:12 -05:00
Ed Page
7307f22c73 fix(derive): Remove error check for old raw attributes 2022-07-22 11:41:00 -05:00
Ed Page
a842bd64a0 fix!: Use display_name rather than bin_name in version output 2022-07-22 11:40:30 -05:00
Ed Page
01a3ea425f fix!: Remove unstable-v4 feature gate 2022-07-22 11:34:06 -05:00
Ed Page
982d4ca361
Merge pull request #3965 from epage/empty
fix(error):! Merge EmptyValue into InvalidValue
2022-07-22 09:18:41 -05:00
Ed Page
16b0362807 fix(error):! Merge EmptyValue into InvalidValue
There isn't a reason to programmatically differentiate them so this
merges them simplify programamtic cases and to hopefully reduce binary
size.
2022-07-22 09:06:01 -05:00