Commit graph

34 commits

Author SHA1 Message Date
Ed Page
c165b601ac perf: Switch to &'static str by default
Originally, clap carried a lifetime parameter.  When moving away from
that, we took the approach that dynamically generated strings are always
supported and `&'static str` was just an optimization.

The problem is the code size increase from this is dramatic.  So we're
taking the opposite approach and making dynamic formatting opt-in under
the `string` feature flag.  When deciding on an implementation, I
favored the faster one rather than the one with smaller code size since
small code size can be gotten through other means.

Before: 567.2 KiB, 15.975 µs
After: 541.1 KiB, 9.7855 µs
With `string`: 576.6 KiB, 13.016 µs
2022-09-16 16:44:39 -05:00
Roland Fredenhagen
a2cf7f1dea fix: Tests/clippy/errors bash dynamic completion 2022-09-07 20:25:06 -05:00
Ed Page
fc499ac0ec perf: Let users choose Str implementation
The binary size and performance difference is enough to make it
configurable.

Code size:
- default: 565.7 KiB
- perf: 578.5 KiB

Build time:
- default: 9.1706 us
- perf: 7.0479 us

Parse time:
- default: 12.673 us
- perf: 8.1708 us

Parse with subcommand time:
- default: 12.112 us
- perf: 7.9874 us
2022-08-22 15:47:21 -05:00
Ed Page
3390adf0d3 chore: Bump MSRV to 1.60.0
While at it, this cleans up all of the features.  For some reason, I
couldn't do `dep:clap_derive` though.
2022-08-10 21:32:06 -05:00
Ed Page
01a3ea425f fix!: Remove unstable-v4 feature gate 2022-07-22 11:34:06 -05:00
Ed Page
99d92c916c fix!: Remove yaml support 2022-07-21 12:46:47 -05:00
Ed Page
765af4198c fix!: Remove regex validation 2022-07-21 12:42:09 -05:00
Ed Page
82d70d82c4 chore: Bump MSRV from 1.56.0 to 1.56.1
Being a patch release, I'm fine doing this outside of a minor release.
This avoids us having to deal with indexmap having a higher MSRV.
2022-06-17 09:01:45 -05:00
Ed Page
7515bfeb51 fix: Allow people to opt-in to deprecations
This adds a new `Cargo.toml` feature named `deprecated` that opts
controls whether deprecation warnings show up.  This is starting off as
non-default though that may change (see below).

Benefits
- Allows a staged rollout so a smaller subset of users see new
  deprecations and can report their experience with them before everyone
  sees them.  For example, this reduces the number of people who have to
  deal with #3822.
- This allows people to defer responding to each new batch of
  deprecations and instead do it at once.  This means we should
  reconsider #3616.

The one risk is people who don't follow blog posts and guides having a
harder time upgrading to the next breaking release without the warnings
on by default.  For these users, we reserve the right to make the
`deprecated` feature `default`.  This is most likely to happen in a
minor release that is released in conjunction with the next major
release (e.g. when releasing 4.0.0, we release a 3.3.0 that enables
deprecations by default).  By using a feature, users can still disable
this if they want.

Thanks @joshtriplett for the idea
2022-06-14 10:50:05 -05:00
Ed Page
d56d8dd59e chore: Make it easy to reproduce CI docs run 2022-06-04 12:58:53 -05:00
Ed Page
686b0379ce feat(multicall): Stablize multicall
`multicall` allows you to have one binary expose itself as multiple
programs, like busybox does.  This also works well for user clap for
parsing REPLs.

Fixes #2861
2022-05-20 12:20:40 -05:00
Ed Page
4a733cd879 fix: Bump MSRV to 1.56.0
This is needed for `Bound::cloned` and fits within official MSRV policy
(2 versions back) and unofficial (6 months, see #3267)
2022-05-17 17:13:08 -05:00
Liu Dingming
1b63fbd6df feat(derive): Start unstable-v4 feature flag
This is split out of #3661 as several changes I'm working on need it.
2022-05-06 14:56:55 -05:00
Roland Fredenhagen
33949ce4de
feat(help): Show PossibleValue help in --help (#3503)
`-h` (short help) still shows the same.

This gates it behind an `unstable-v4` feature flag to avoid disrupting users who set the help without knowing where all it shows up (particularly derive users where `ArgEnum` is automatically extracting the help).

Fixes #3312
2022-03-02 09:15:28 -06:00
Ed Page
15f43f871a refactor(ci): Move ui tests to Makefile 2022-02-23 09:03:18 -06:00
Ed Page
73847b32ff chore: Upgrade boilerplate 2022-02-15 12:36:19 -06:00
Pavan Kumar Sunkara
24b86d18d0 test: Remove unnecessary feature usage in tests 2022-02-13 19:00:29 +00: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
e98253dd4a fix: Rename 'doc' feature
This is prep for potentially other 'doc' changes
2021-12-08 20:10:47 -06:00
Ed Page
ea6829b08e chore(ci): Lint small feature sets 2021-12-07 21:18:35 -06:00
Ed Page
59f9473336 chore: Make makefile easier to use 2021-12-07 08:24:13 -06:00
Ed Page
181eff5541 docs: Fix stale examples
These were broken in #17 and #38 when renaming `hidden` to `hide`.  These
weren't caught because we test with `--all-targets` which is mutually
exclusive with `--doc`.
2021-11-30 12:05:30 -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
9c4194a5a1 test: Verify examples based on feature flags 2021-11-23 17:10:01 -06:00
Ed Page
da03c2706c chore(ci): Run build/test all crates 2021-11-23 16:10:32 -06:00
Ed Page
6b5e7e28df chore(ci): Test benchmarks 2021-11-23 16:09:31 -06:00
Ed Page
daf76bcd63 refactor(ci): Offer more flexibility 2021-11-18 11:52:09 -06:00
Ed Page
ff476660ce test: Compile example in README 2021-11-17 21:01:56 -06:00
Ed Page
b06f69b08d chore(ci): Reduce scope 2021-11-17 15:01:16 -06:00
Kevin K
3ab0bf8826 chore: increase version 2016-05-09 20:50:32 -04:00
Kevin K
80baab2672 chore: updates build system 2015-07-29 15:18:05 -04:00
Kevin K
eff1ef4ff1 Fixed makefile bug 2015-03-22 22:03:28 -04:00
Kevin K
ac91f2a38e Inc'ed version after PR #21 - doc copy commands to Makefile 2015-03-19 07:55:33 -04:00
Markus Unterwaditzer
5abee664b2 Deduplicate docs 2015-03-19 00:42:06 +01:00