Ed Page
9bfa5a338c
chore: Release
2023-10-24 13:25:07 -05:00
Ed Page
dfebb54423
style: Make clippy happy
2023-10-12 08:32:59 -05:00
Ed Page
3cd571e654
chore: Release
2023-08-31 13:19:11 -05:00
Ed Page
087224a486
perf: Drop a dep for faster builds
...
`OnceLock` became available as of 1.70 which is older than our new MSRV.
We can easily get away without `Lazy` variants.
2023-08-31 12:54:45 -05:00
Ed Page
2e49645418
chore: Release
2023-08-24 11:08:02 -05:00
Ed Page
fcda411e5e
chore: Release
2023-07-14 12:01:56 -05:00
Ed Page
3025ff859f
fix(derive): Don't fail on variant field attributes
...
Well, thats annoying how easy it is to get this wrong but tests can only
help with regressions; it would be hard to prevent future failures.
Fixes #5007
2023-07-14 11:16:45 -05:00
Ed Page
ffbe6e9936
docs(derive): Ensure magic attributes are searchable
2023-06-23 13:20:21 -05:00
Ed Page
475e254d25
chore: Release
2023-06-05 13:56:50 -05:00
Ed Page
103ae5cf62
fix(derive): Don't warn when people bring types into scope
...
Fixes #4951
2023-06-05 12:55:06 -05:00
Ed Page
e7729d1282
fix(derive): Mark all impls as automatically derived
...
Unsure what all it does. I removed our `allow`s and we still get lints,
so unsure if its only some that it applies to it.
Inspired by #4951
2023-06-05 12:31:55 -05:00
Ed Page
50f0e6bffb
chore: Release
2023-06-01 21:10:46 -05:00
klensy
df5d90101a
perf(derive): Reduce amount of generated code
2023-06-02 13:59:38 +03:00
Ed Page
9c3dc187cb
chore: Release
2023-05-19 11:55:42 -05:00
Yuri Astrakhan
d0302c5556
chore: Inline simple non-mixed format args
2023-05-04 15:58:04 -04:00
Ed Page
173f1ede0a
Merge pull request #4881 from nyurik/dedup-derive
...
chore: Dedup clap derive get fields
2023-05-04 08:27:29 -05:00
Yuri Astrakhan
003b45325a
chore: Dedup clap derive get fields
2023-05-03 23:09:30 -04:00
Yuri Astrakhan
797c23c415
chore: Inline format args using clippy fix
...
This command cleaned up all the format args,
making code significantly shorter and more readable.
```
cargo clippy --workspace --fix -- -A clippy::all -W clippy::uninlined_format_args
```
2023-05-03 21:49:11 -04:00
Ed Page
8fc65e28b6
chore: Release
2023-03-28 02:19:08 -05:00
Ed Page
2852653656
chore: Release
2023-03-27 19:41:39 -05:00
Kurtis Nusbaum
5430df7a0f
feat(derive): Support #[group]
attributes
...
This adds the ability derive additional options for the group creation.
Fixes #4574
2023-03-25 03:25:38 -05:00
Ed Page
4e1a565b8a
refactor: Split out clap_builder for faster derive builds
...
For now, we are still treating `clap` as the user facing API for both
builder and derive, making this an internal change as we don't expect
this to negatively impact builder build times all that much. We can
re-evaluate at a later time and consider having distinct top-level
crates for builder and derive.
Looking at `--timings` on my machine
- `clap` only took 0.04s to build and it happened in
parallel to `clap_builder` codegen
- this saved 1.7s for derive build times, with `clap_builder` building
in parallel to `syn` and `clap_builder` and `clap_derive` finishing
around the same time.
This was discussed some at https://rust-lang.zulipchat.com/#narrow/stream/220302-wg-cli/topic/clap.20build.20times.20and.20.60clap_derive.60.3A.20a.20crazy.20idea
2023-03-24 21:50:02 -05:00
Ed Page
7e7a45ac19
perf(derive): Reduce the amount of generated code
...
Its a small win, dropping the number of copies and reducing the
overhead from `quote` but enough of these could make a difference
2023-03-18 14:51:13 -05:00
Ed Page
79b44d0460
chore: Release
2023-03-18 09:17:44 -05:00
Ed Page
062622fe2d
chore(derive): Update syn
2023-03-18 08:50:41 -05:00
Ed Page
e030426819
refactor(derive): Remove proc-macro-error dependency
...
Made things simpler that we were always aborting before.
2023-03-18 07:08:22 -05:00
Ed Page
e78bba0ec5
chore: Release
2023-03-16 10:42:06 -05:00
Ed Page
6c0600a031
chore: Fully specify dependencies
2023-03-16 06:07:08 -05:00
Ed Page
f931de694a
chore: Release
2023-02-27 12:13:11 -06:00
Mingwei Samuel
fa76f6f78d
fix: Remove strict linting from generated code
...
fix https://github.com/clap-rs/clap/issues/4733
2023-02-27 21:29:47 -08:00
Ed Page
5f247f5181
chore: Release
2023-02-27 07:55:14 -06:00
Roman Krasiuk
5bab68a16f
fix: Allow clippy::almost_swapped
2023-02-27 19:42:44 +02:00
Roman Krasiuk
872135b64f
fix: Allow clippy::almost_swapped
2023-02-27 19:35:01 +02:00
Ed Page
889ca7a537
chore: Bump versions for 4.1
2023-01-13 09:24:37 -06:00
Thayne McCombs
65f9e0d747
refactor(derive): Clean up unnecessary noop parsing
...
My guess is this was left over from switching to using the type based
API. The generated code for extracting values from `ArgMatches` had some
code that didn't actually do anything, like mapping over the identity
function, and wrapping a value in an `Ok` only to immediately use "?" on
it.
2023-01-11 01:38:36 -07:00
Ed Page
e576c65dee
style: Make clippy happy
2023-01-10 09:08:12 -06:00
Ed Page
084991f70a
Merge pull request #4600 from tmccombs/groups-derive
...
Add support for deriving grouped options for Vec<Vec<T>>
2023-01-10 08:43:36 -06:00
Ed Page
50f033e6bc
fix(derive): Allow users to override arg_required_else_help on sub-sub commands
2023-01-09 21:08:56 -06:00
Ed Page
af71ada3f4
fix(derive): Allow update_from
when explicit requireds used
...
Fixes #4617
2023-01-09 20:52:46 -06:00
Ed Page
fa02111092
chore: Switch to workspace inheritance
2023-01-09 12:35:54 -06:00
Ed Page
f25fe5b3e0
chore: Bump MSRV to 1.64.0
2023-01-09 12:29:41 -06:00
Thayne McCombs
73df3d1a1e
chore: Put Vec<Vec<_>> behave for derive behind unstable-v5 flag
2023-01-08 00:28:01 -07:00
Thayne McCombs
eaa9273f91
feat: Add support for deriving grouped options for Vec<Vec<T>>
...
Relates-To: #2924
2023-01-07 23:36:45 -07:00
Tom Forbes
1b32087418
Fix typo in clap-derive error message
...
I assume "litersl" should be "literals"?
2023-01-02 01:39:14 +00:00
Ed Page
bc457b179f
chore: Release
2022-11-07 10:00:35 -06:00
Ed Page
c37ab6c205
fix(derive): Allow 'long_help' to force populating from doc comment
...
Fixes #4441
2022-11-07 09:41:52 -06:00
Ed Page
c1a9da9124
refactor(derive): Decouple extracting and formatting of doc comments
2022-11-07 09:17:04 -06:00
Ed Page
214f6b8966
refactor(derive): Clarify bool arg
2022-11-07 08:31:37 -06:00
Ed Page
73be1fef99
refactor(derive): Remove dead code
2022-11-07 08:08:06 -06:00
Ed Page
5ee9e0fe76
refactor(derive): Decouple doc comment parsing from methods
2022-11-07 08:06:10 -06:00