Commit graph

4823 commits

Author SHA1 Message Date
Ed Page
d7f27e8732 refactor: Harden against occur/val ordering
This makes some naming more explicit and allows us to increment
occurrences before adding values (which is the logical mental order and
allows other improvements).
2021-12-27 14:50:50 -06:00
Ed Page
a0ab35d678
Merge pull request #3224 from epage/test
test: Show more detailed failures
2021-12-27 14:21:31 -06:00
Ed Page
2d1dfae318 refactor: Clarify MatchArg::all_val_groups_empty 2021-12-27 14:21:04 -06:00
Ed Page
9c6c0174d2 test: Show more detailed failures 2021-12-27 13:57:38 -06:00
Ed Page
64da127671
Merge pull request #3223 from epage/test
test: Panic, rather than exit, on error
2021-12-27 13:25:44 -06:00
Ed Page
bfc486501a test: Panic, rather than exit, on error
Working on a fix for #3217 and can't see what is failing because the
test process exits.
2021-12-27 12:56:15 -06:00
Ed Page
b842dff443
Merge pull request #3214 from justjavac/patch-1
doc: Fix link to 'Configuring the Parser'
2021-12-24 05:51:58 -06:00
迷渡
9faec11b84
docs: Fix link to 'Configuring the Parser'
Signed-off-by: 迷渡 <justjavac@gmail.com>
2021-12-24 12:41:09 +08:00
Ed Page
3499b6b4b6 docs(changelog): Fix typo 2021-12-23 16:07:29 -06:00
Ed Page
8d94739de4 chore: Release 2021-12-23 14:28:46 -06:00
Ed Page
5a670ec436
Merge pull request #3212 from epage/conflict2
fix: Don't panic on lack of conflicts
2021-12-23 14:18:24 -06:00
Ed Page
3db09f4dd4 fix: Don't panic on lack of conflicts
Fixes #3197
2021-12-23 13:38:23 -06:00
Ed Page
02f4ff2115 refactor: Allow more conflicts to be reported 2021-12-23 11:18:22 -06:00
Ed Page
f24b9f50de refactor: Make it easier to get groups 2021-12-23 11:15:11 -06:00
Ed Page
a37f2908c8 docs(derive): Looks like optional isnt supported
According to #2587
2021-12-23 10:29:34 -06:00
Ed Page
653617d0fd docs(derive): Add flatten/subcommand for variants 2021-12-23 10:27:07 -06:00
Ed Page
28801dfbde
Merge pull request #3210 from epage/docs
docs(tutorial): Encourage `App::debug_assert`
2021-12-23 09:08:50 -06:00
Ed Page
ad127fcc53
Merge pull request #3205 from epage/unless
fix: Ensure we validate required-unless
2021-12-23 08:47:23 -06:00
Ed Page
5643dddf3e docs(tutorial): Encourage App::debug_assert 2021-12-23 08:41:52 -06:00
Ed Page
efca08341a docs(tutorial): Fix derive anchor links 2021-12-23 08:23:32 -06:00
Ed Page
b6b6e1eab0
Merge pull request #3209 from justjavac/patch-1
docs: Fix anchor links
2021-12-23 08:22:11 -06:00
迷渡
c60d5dd1f0
docs: Fix anchor links 2021-12-23 10:58:14 +08:00
Ed Page
edca3c0902
Merge pull request #3208 from epage/todo
chore: Remove the TODO chaff
2021-12-22 10:44:21 -06:00
Ed Page
895e85714b chore: Remove the TODO chaff
The intent is to make stand out more the important technical debt hidden
in comments.
2021-12-22 10:15:09 -06:00
Ed Page
90d4a3ca73
Merge pull request #3207 from epage/direct
refactor: Clarify validator relationships
2021-12-22 10:10:05 -06:00
Ed Page
88c927aad3 refactor: Clarify validator relationships
We were storing data off into the struct, obscuring the direct
relationship between gathering and validating conflicts.

With this, not as much code needs to deal with mutable data
2021-12-22 09:14:39 -06:00
Ed Page
2d17f1b59f
Merge pull request #3204 from epage/debug
fix(debug): Refer to correct function
2021-12-21 20:57:06 -06:00
Ed Page
2e73be43f1 fix: Ensure we validate required-unless
Found this when digging into #3197
2021-12-21 20:41:17 -06:00
Ed Page
2d462cd0b5 fix(debug): Refer to correct function 2021-12-21 20:35:23 -06:00
Ed Page
3ae0132f8c docs(changelog): Link out for newline change 2021-12-20 08:38:55 -06:00
Ed Page
65a18247bf docs: Update toml on pre-release 2021-12-17 10:58:01 -06:00
Ed Page
a861053928
Merge pull request #3195 from bestouff/patch-1
docs: More explicit "derive" feature
2021-12-17 10:55:42 -06:00
Xavier Bestel
8654c9035c docs: Automatically update version in README.md 2021-12-17 17:09:25 +01:00
Ed Page
a61a63ac88
Merge pull request #3196 from epage/help
fix(help): Don't infer long help from subcommands
2021-12-17 09:54:02 -06:00
Xavier Bestel
e3a711ec12 docs: More explicit "derive" feature 2021-12-17 16:29:47 +01:00
Ed Page
318b7859dc fix(help): Don't infer long help from subcommands
Fixes #3193
2021-12-17 09:25:00 -06:00
Ed Page
27893cfd9a chore: Release 2021-12-16 12:19:58 -06:00
Ed Page
9da7a5c0e1
Merge pull request #3192 from epage/derive
docs(derive): Call out need for derive feature
2021-12-16 12:18:38 -06:00
Ed Page
b4fbd05196 docs(derive): Call out need for derive feature
And other derive tweaks.  I'm mixed on how far to go, including
- Linking to the derive reference
- Showing how to use each trait with both the derive and builder APIs

For now, this is an improvement.
2021-12-16 12:05:52 -06:00
Ed Page
43aa505221
Merge pull request #3190 from epage/feature
docs: Show features in docs.rs
2021-12-16 10:56:17 -06:00
Ed Page
d14255dc00 docs: Show features in docs.rs
Confirmed this works with [`argfile`](https://docs.rs/argfile/latest/argfile/)

And then running in clap
```
$ RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc --all-features
```
They now show up!
2021-12-16 10:38:31 -06:00
Ed Page
c212402466 chore: Release 2021-12-16 09:33:06 -06:00
Ed Page
b9a9a80a27
Merge pull request #3188 from epage/default
feat(derive): Don't require Display for default ArgEnum
2021-12-16 09:31:09 -06:00
ilslv
74d1c0898f
chore: Update version requirements (#3187)
Bump `termcolor` and `trybuild`
2021-12-16 09:18:54 -06:00
Ed Page
8924dd7a1e feat(derive): Don't require Display for default ArgEnum
While I'm unsure how much type specialization we should do, we
intentionally have the `arg_enum` attribute for doing special behavior
based on it, so let's take advantage of it.

Fixes #3185
2021-12-16 09:11:32 -06:00
Ed Page
dee3adbd34 fix: Loosen lifetimes on PossibleValue 2021-12-16 09:07:05 -06:00
Ed Page
fd38d247a7
Merge pull request #3180 from epage/cargo
docs(examples): Add cargo subcommand example
2021-12-15 12:19:26 -06:00
Ed Page
aa270f6aca docs(examples): Add cargo subcommand example 2021-12-15 12:07:29 -06:00
Ed Page
03cb509d6c refactor(examples): Change naming style
This is to make room for a reasonable looking cargo plugin example.

I got lazy and didn't update the tutorials.
2021-12-15 11:12:18 -06:00
Ed Page
1100f04b56 chore: Release 2021-12-15 11:02:40 -06:00