Commit graph

4826 commits

Author SHA1 Message Date
rhysd
bc12ef168a feat: Include argument ID in UTF-8 assertion messages
so that users can understand which argument was going wrong.
2021-12-11 15:35:51 +09:00
Vitaly Shukela
f9d926550a
docs: Fix numbers of list entries in FAQ.md 2021-12-11 02:34:49 +03:00
Ed Page
c3f8c8938f chore: Release 2021-12-10 15:25:23 -06:00
Ed Page
74349cfcaa
Merge pull request #3144 from epage/test
fix(derive): Allow aliased Option with ArgEnum
2021-12-10 11:06:53 -06:00
Ed Page
703238f155 test(derive): Check all derives
There will always be some kind of corner case not covered as code
evolves but this expands the test to all of the basics.
2021-12-10 10:52:30 -06:00
Ed Page
43d3ac37a6 fix(derive): Allow aliased Option with ArgEnum 2021-12-10 10:41:55 -06:00
Ed Page
71a564de88 test(derive): Don't parse the actual command line 2021-12-10 10:36:45 -06:00
Pavan Kumar Sunkara
0eda43d0f6
Merge pull request #3142 from spire-ffoston/fix-result-type-alias-derive-impl
Fix unqualified result types causing compilation failures with derive implementations
2021-12-10 16:26:16 +00:00
Ed Page
cfbea9b12f docs: Note argfile's existence
Fixes #1693
2021-12-10 10:03:39 -06:00
Frankie Foston
1285c0f885 fix: unqualified result types causing compilation failures with derive implementations 2021-12-10 14:13:26 +00:00
Ed Page
ada95d6f3d chore: Release 2021-12-09 19:39:08 -06:00
Ed Page
4ab51976a3 chore: Release 2021-12-09 19:38:37 -06:00
Ed Page
ca48e22827
Merge pull request #3140 from epage/panic
Improve error reporting for bad arg/group/subcommand names
2021-12-09 19:35:17 -06:00
Ed Page
a4d2920cfa docs(readme): Raise visibility of wild 2021-12-09 18:57:16 -06:00
Ed Page
756f825521 fix: Point to public method on ArgMatches panic
This will make it faster for someone to figure out what is going on
without dropping down to `RUST_BACKTRRACE=1` by giving them the arg
*and* telling them which function *they* called was involved.
2021-12-09 18:51:28 -06:00
Ed Page
264dc37e50 fix: Report if mixing subcommands and args
This is especially helpful for people transitioning off of `is_present`
being used for subcommands.

Fixes #3139
2021-12-09 18:49:51 -06:00
Ed Page
313b5e3c80
Merge pull request #3138 from epage/disp
refactor: Clarify explicit display order wins
2021-12-09 18:30:31 -06:00
Ed Page
d38452c953 refactor: Clarify explicit display order wins
Now that we use options, we can rely on that, instead of sentinels, for
detecting a default and overriding only a default.

Noticed this as part of looking at #1807.
2021-12-09 16:24:49 -06:00
Ed Page
ae2b315f6a docs: Fix changelog link
Fixes #3137
2021-12-09 14:23:28 -06:00
Ed Page
cf93d7c75a docs: Fix example output
How did #3112 get merged?
2021-12-09 10:26:01 -06:00
Ed Page
587e58d178
Merge pull request #3111 from epage/from
Deprecate Setting FromStr along with YAML
2021-12-09 09:48:09 -06:00
Pavan Kumar Sunkara
e0c2de9abf
Merge pull request #3112 from epage/override
docs(derive): Show how to override special types
2021-12-09 15:40:31 +00:00
Ed Page
8a30b01bc1 refactor(yaml): Freeze FromStr 2021-12-09 09:36:00 -06:00
Ed Page
7731ca2d21 docs(derive): Show how to override special types
Fixes #3107
2021-12-09 09:32:33 -06:00
Ed Page
f16bdcc821 fix!: Limit Setting FromStrs to YAML
These exist pretty much just for YAML (#3087).  If anyone else is
building on these, it has a limited shelf-life anyways because of #2717.

BREAKING CHANGE: `FromStr` for settings requires the `yaml` feature.
2021-12-09 09:03:54 -06:00
Ed Page
3dec7df14f chore: Release 2021-12-09 07:00:33 -06:00
Pavan Kumar Sunkara
5a3ace8de4
Merge pull request #3109 from epage/deprecate
docs: Update deprecation messages
2021-12-09 12:57:59 +00:00
Ed Page
9d7becca68 docs: Update deprecation messages
- Some still referenced the clapng issue number
- Some YAML ones were missed in the formatting clean up
- I never updated the usage ones with the formatting clean up
2021-12-09 06:47:37 -06:00
Ed Page
4c807a0632 docs(faq): Update structopt status 2021-12-09 06:39:34 -06:00
Pavan Kumar Sunkara
91b5b395f5
Merge pull request #3105 from colinwahl/pack-exclusive-setting
Use ArgSettings to store Arg::exclusive
2021-12-09 08:22:43 +00:00
Colin Wahl
0b2a04c572 fix: Fix typo 2021-12-08 22:50:18 -08:00
Colin Wahl
f396b28419 chore: Pack exclusive setting into ArgSettings 2021-12-08 22:48:17 -08:00
Ed Page
1f465b57e3
Merge pull request #3104 from epage/unstable
test: Actually allow unstable examples to be tested
2021-12-08 21:21:12 -06:00
Ed Page
3b5c5c7879
Merge pull request #3101 from epage/features
docs: Auto-tag feature flags
2021-12-08 21:14:15 -06:00
Ed Page
130a1dc0e2 test: Actually allow unstable examples to be tested 2021-12-08 21:06:51 -06:00
Ed Page
f83ead6a8b docs(change): Update link 2021-12-08 21:03:27 -06:00
Ed Page
ee2d70f8ef docs(change): Fix formatting 2021-12-08 21:01:41 -06:00
Ed Page
d42cfee912 docs: Auto-tag feature flags
Fixes #3095
2021-12-08 20:37:53 -06:00
Ed Page
dbd127fad9 chore(ci): Stop using all features
We might enable some nightly-only features
2021-12-08 20:37:53 -06:00
Ed Page
ffa5630de5 docs: Enable lib doc in more cases
Before, we limited it to the `doc` feature because of how extensive the
README was.  It has since scaled back, so we can be more selective with
what features enable it.
2021-12-08 20:37:50 -06:00
Ed Page
e98253dd4a fix: Rename 'doc' feature
This is prep for potentially other 'doc' changes
2021-12-08 20:10:47 -06:00
Ed Page
afac7b5d4e
Merge pull request #3098 from epage/examples
docs: Include examples on docs.rs
2021-12-08 20:09:57 -06:00
Ed Page
febf7c637e docs(derive): Note using fully-qualified path 2021-12-08 19:58:41 -06:00
Ed Page
367879ac2a docs: Fix reference to feature flags 2021-12-08 19:25:48 -06:00
Ed Page
da2f70d056 chore(gh): Plan for a new label 2021-12-08 19:19:31 -06:00
Ed Page
ece6c4b681
Merge pull request #3099 from epage/derive
docs: Call out features used in root examples
2021-12-08 19:18:30 -06:00
Ed Page
32b5520ff1 docs: Call out features used in root examples
mitsuhiko immediately jumped into the examples and got tripped up by the
lack of documentation on feature flags needed.

I limited this to just the root ones because the rest are in a more
proper tutorial that steps through it all.
2021-12-08 16:46:49 -06:00
Ed Page
a779f2c806
Merge pull request #3097 from epage/play
fix: Expose all features in playground
2021-12-08 16:18:51 -06:00
Ed Page
1191c3fb10 docs: Include examples on docs.rs
See https://twitter.com/wcrichton/status/1456112165744615426 or TWIR
415.

I'm mixed about the risk of using an unstable feature for our docs
though this seems like it'd be a big help.
2021-12-08 16:16:50 -06:00
Ed Page
92bb758e87 fix: Expose all features in playground
Looks like this is undocumented, see https://github.com/integer32llc/rust-playground/issues/192

Fixes #3065
2021-12-08 16:06:06 -06:00