Commit graph

437 commits

Author SHA1 Message Date
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
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
Ed Page
d444f46f92 chore: Release 2021-12-08 12:41:59 -06:00
Ed Page
c807f892b1 chore: Configure release process
Experimenting with treating clap-derive and clap one and the same from
the release process perspective.  The completion generators are a bit
more independent.
2021-12-07 21:36:00 -06:00
Ed Page
c99adcc6c9 docs: Add key-value derive example
This is carried over from the clap_derive examples.  Looking over the
other examples, I feel like they are covered by other examples or by the
derive reference.  We should call out deny missing docs though.
2021-12-07 19:01:55 -06:00
Ed Page
ad797e70af docs: Remove reference to clap.rs 2021-12-06 20:56:47 -06:00
Ed Page
6b3ba22368
Merge pull request #97 from epage/rename
Prepare for rename
2021-12-06 12:06:51 -06:00
Ed Page
f517c0ede1 docs: Remove author fields 2021-12-06 11:24:23 -06:00
dependabot[bot]
b531964f46
chore(deps): update os_str_bytes requirement from 5.0 to 6.0
Updates the requirements on [os_str_bytes](https://github.com/dylni/os_str_bytes) to permit the latest version.
- [Release notes](https://github.com/dylni/os_str_bytes/releases)
- [Commits](https://github.com/dylni/os_str_bytes/compare/5.0.0...6.0.0)

---
updated-dependencies:
- dependency-name: os_str_bytes
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-12-06 16:25:49 +00:00
Ed Page
befee6667b docs: Re-work examples
This creates distinct tutorial examples from complex feature examples
(more how-tos).  Both sets are getting builder / derive versions (at
least the critical ones).
2021-11-30 21:33:52 -06:00
Ed Page
b190a6a817 test: Consolidate clap tests
This reduces the need for us to have `clap` as a dependency in
`clap_derive`, preparing the way to fix #15.
2021-11-30 10:07:08 -06:00
Ed Page
2288f55cc1 test: Rely on release process for version sync
When we switch to `cargo-release`, it will validate that the auto-update
was performed.  No reason to have an extra dependency during
development.
2021-11-30 09:59:59 -06:00
Ed Page
f890bfa93b docs: Focus top-level README 2021-11-30 09:53:25 -06:00
Ed Page
e4c5d9d68d chore(ci): Verify unicode feature
In #27, we removed some default features.  When doing so, some places
weren't updated but `doc` feature covered it ... except it was only
partially updated.  This makes sure we test all the features.
2021-11-29 11:30:23 -06:00
Ed Page
6a56a98a12 docs: Include more features in rustdoc 2021-11-24 14:07:57 -06:00
Ed Page
c0f0713248 fix!: Lighten clap's default feature set
Too many times people have to disable default features.  Let's try to
have a more minimal out of box experience.

- `derive`: people are already used to adding this feature for serde
- `cargo`: not needed for derive
- `env`: most probably don't use this
- `unicode`: most CLIs are probably ASCII.  We should do a debug warn
  about this though

BREAKING CHANGE: `derive`, `cargo`, `env`, and `unicode` are no longer
on by default.
2021-11-24 10:35:29 -06:00
Ed Page
9c4194a5a1 test: Verify examples based on feature flags 2021-11-23 17:10:01 -06:00
Ed Page
bfa02fd418 test: More thoroughly test examples
This ports our example testing over to [trycmd](https://docs.rs/) so
we can:
- More thoroughly test our examples
- Provide always-up-to-date example usage

The old way of testing automatically picked up examples.  This new way
requires we have a `.md` file that uses the example in some way.

Notes:
- Moved overall example description to the `.md` file
- I added cross-linking between related examples
- `14_groups` had a redundant paragraph (twice talked about "one and
  only one"
2021-11-23 13:13:41 -06:00
Ed Page
ff476660ce test: Compile example in README 2021-11-17 21:01:56 -06:00
dependabot[bot]
7737ce6946
chore(deps): Update os_str_bytes requirement from 4.1 to 5.0
Updates the requirements on [os_str_bytes](https://github.com/dylni/os_str_bytes) to permit the latest version.
- [Release notes](https://github.com/dylni/os_str_bytes/releases)
- [Commits](https://github.com/dylni/os_str_bytes/compare/4.1.0...5.0.0)

---
updated-dependencies:
- dependency-name: os_str_bytes
  dependency-type: direct:production
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-17 21:34:23 +00:00
Ed Page
4e546dd2a1 chore: Align on boilerplate 2021-11-17 15:24:50 -06:00
Ed Page
b06f69b08d chore(ci): Reduce scope 2021-11-17 15:01:16 -06:00
Ed Page
89e1c7206b chore: Remove dead code 2021-11-17 13:56:36 -06:00
Ed Page
bfa388420b Put grouped_values_of behind a feature gate
There is enough open work on this, we should probably not have it public
yet, so putting it behind a gate.  See https://github.com/clap-rs/clap/issues/2924
2021-10-26 14:26:50 -05:00
Jake Shadle
db2a25473a Fix packaging of LICENSE-* files 2021-10-21 14:57:49 +02:00
Pavan Kumar Sunkara
585e995811 Release 3.0.0-beta.5 2021-10-17 17:01:18 +01:00
bors[bot]
b835ce9061
Merge #2817
2817: Add support for Multicall executables as subcommands with a Multicall setting r=pksunkara a=fishface60



Co-authored-by: Richard Maw <richard.maw@gmail.com>
2021-10-16 00:32:52 +00:00
Richard Maw
694329b363 fixup! Make hostname a non-derive example and rename via Cargo.toml 2021-10-12 22:38:43 +01:00
Richard Maw
b2180e9d72 fixup! Gate Multicall behind unstable feature 2021-10-12 20:35:59 +01:00
Richard Maw
a31d3b288d fixup! Revert: Make hostname a non-derive example and rename via Cargo.toml
tests/examples.rs:examples_are_functional finds examples by stripping
`.rs` off the basename
2021-10-12 20:01:59 +01:00
Richard Maw
1782f9d4ec fixup! Make hostname a non-derive example and rename via Cargo.toml 2021-10-12 19:57:32 +01:00
Ed Page
a61752a5d5 chore: Include fig in testing 2021-10-12 11:25:17 -05:00
Ed Page
dfbeb71077 fix: Gate App::replace
We are concerned about the level of polish of this feature and are
unsure enough about its future, we've decided to gate it to unblock the
v3 release.
2021-10-09 10:49:10 -05:00
bors[bot]
5afa640e3b
Merge #2834
2834: fix: Allow unicode-aware case insensitivity with ArgValue r=pksunkara a=epage



Co-authored-by: Ed Page <eopage@gmail.com>
2021-10-09 12:37:33 +00:00
Ed Page
56a6a7418e fix: Allow unicode-aware case insensitivity with ArgValue
This also opens us up to being more unicode aware in other places, like
our sorting of arguments in the help.

Fixes #2792
2021-10-09 07:21:45 -05:00
Ed Page
2bbe9123ee fix!: Generalize unicode feature
This flag was added in v3.  This will allow us to put more related
functionality behind it.

BREAKING CHANGE: `unicode_help` was renamed to `unicode`.
2021-10-09 06:27:28 -05:00
Ed Page
8546f0e348
Merge pull request #2828 from grant0417/master
feat(generate): Add fig autocomplete generator
2021-10-09 05:10:22 -05:00
grant0417
c3b8a96d65 Refactored fig generation code to crate 2021-10-07 20:54:14 -04:00
Ed Page
7b5a4c9c2d feat: Add backtraces to errors
This is gated behind the `debug` feature flag so only explicit debugging
cases pay the build time and runtime costs.

The builder API's stack traces are generally not too interesting.  Where
this really helps is with `clap_derive`.  We currently panic on
unexpected conditions which at least gives us a backtrace.  We'd like to
turn these into errors but to do so would lose those debuggin
backtraces, which is where this comes in.

This is a part of #2255
2021-10-07 10:02:34 -05:00
Ed Page
b3847b76c4 refactor: Remove vec_map dependency
Doesn't look like this dependency is buying us anything at this point,
so removing it.
2021-09-17 15:14:49 -05:00
dylni
dc65513966 Replace ArgStr with os_str_bytes::RawOsStr 2021-08-29 10:00:30 -04:00
Donough Liu
b1d364a228
Pin clap_derive version (#2706)
* Pin clap_derive version

* Pin clap version in clap_generate
2021-08-17 08:43:37 +00:00
Pavan Kumar Sunkara
52be134949 Release 3.0.0-beta.4
clap@3.0.0-beta.4
clap_derive@3.0.0-beta.4
clap_generate@3.0.0-beta.4

Generated by cargo-workspaces
2021-08-14 23:40:49 +01:00
Pavan Kumar Sunkara
73b28fb104 Release 3.0.0-beta.3
clap@3.0.0-beta.3
clap_derive@3.0.0-beta.3
clap_generate@3.0.0-beta.3

Generated by cargo-workspaces
2021-08-14 23:01:13 +01:00
Pavan Kumar Sunkara
c7985fb73e Add env feature gate 2021-08-14 01:55:05 +01:00
Pavan Kumar Sunkara
6994be4f15 Remove doc feature 2021-07-30 22:49:11 +01:00
Rémi Lauzier
48147d680b
Update dependency that need no change 2021-06-17 13:58:40 -04:00
Pavan Kumar Sunkara
cedd110f10 Solve indexmap issue on WSL in ubuntu 2021-06-16 02:27:49 +01:00
Pavan Kumar Sunkara
94ce18c399 Update badges 2021-05-25 23:19:32 +01:00