Ed Page
48dc66f652
fix(clap_lex): Deprecate unsound OsStrExt::split_at
2023-03-27 23:32:30 -05:00
Ed Page
56dc953617
doc(lex): Clarify safety of unsafe
2023-03-27 23:26:41 -05:00
Ed Page
e36ae19d4a
Merge pull request #4797 from epage/gruff
...
fix(error): Change from neutral 'note' to helpful 'tip'
2023-03-27 22:19:38 -05:00
Ed Page
52eab28f1d
Merge pull request #4765 from epage/anstream
...
feat(help): Allow user-provided styled text in `StyledStr`
2023-03-27 21:45:21 -05:00
Ed Page
fa60e723fc
fix(error): Give more idea why we are suggesting an arg
...
One challenge with this is finding something that generally works.
Making this work perfectly for one setting will make it inconsistent
with other settings and take up more binary size / compile time.
So in the end, I felt like just mirroring rustc (with a bit more
brevity) seemed like a decent experiment. This will be evaluated by the
feedback on release.
This is a small part of #4638
2023-03-27 20:45:27 -05:00
Ed Page
234d5f91d1
fix(error): Change from neutral 'note' to helpful 'tip'
...
This also has the advantage of aligning with `error:`
This is a small part of #4638
2023-03-27 20:45:11 -05:00
Ed Page
b6432c8ead
docs(help): Show how to style text
...
Fixes #3108
Fixes #1433
2023-03-27 19:47:16 -05:00
Ed Page
5ebcb4c3bf
feat(builder): Allow write!
on StyledStr
2023-03-27 19:46:23 -05:00
Ed Page
f19e33eb27
perf(help): Reduce binary size
2023-03-27 19:46:22 -05:00
Ed Page
9516fd928f
refactor(version): Directly convert rendered to styled
2023-03-27 19:45:41 -05:00
Ed Page
6255229a9c
refactor: Remove extra layer of AnsiDisplay
2023-03-27 19:45:41 -05:00
Ed Page
1773884715
refactor(help): Simplify writing
2023-03-27 19:45:41 -05:00
Ed Page
bdbfe6470f
refactor(help): Track style via ANSI codes
2023-03-27 19:45:41 -05:00
Ed Page
1040114162
feat(help): Respect CLICOLOR, CLICOLOR_FORCE
...
We might have respected `NO_COLOR` before via `termcolor`.
See #4722
2023-03-27 19:45:39 -05:00
Ed Page
2852653656
chore: Release
2023-03-27 19:41:39 -05:00
Ed Page
2bb4146374
chore: Release
2023-03-25 03:56:28 -05:00
Ed Page
765c2e18f5
docs: Update changelog
2023-03-25 03:56:05 -05:00
Ed Page
6696513dec
Merge pull request #4796 from epage/lex
...
fix(lex): Allow reporting errors for non-UTF8 longs
2023-03-27 19:28:48 -05:00
Ed Page
a916daad57
Merge pull request #4795 from epage/required_group
...
feat(derive): Support `#[group]` attributes
2023-03-27 18:39:09 -05:00
Ed Page
627a94f502
Merge pull request #4794 from epage/osstr
...
perf!(lex): Build faster by removing `os_str_bytes`
2023-03-27 16:22:46 -05:00
Ed Page
9712987b80
Merge pull request #4791 from epage/builder
...
refactor: Split out clap_builder for faster derive builds
2023-03-27 11:32:10 -05:00
Ed Page
615c1dc6a0
Merge pull request #4790 from epage/doc
...
doc: Clean up cfgs
2023-03-27 10:12:15 -05:00
Ed Page
57d1c39dc5
Merge pull request #4789 from mochi-sann/fix-clap_ocmplete-example-doc
...
docs(clap_complete): clap_complete example documentation updated with corresponding file names
2023-03-27 09:42:11 -05:00
mochi33i
7c6cf81476
docs(clap_complete): The file name of the command in the clap_complete example documentation was not supported, so it has been updated
2023-03-27 23:24:50 +09:00
Ed Page
ea4dada1e4
fix(lex): Allow reporting errors for non-UTF8 longs
2023-03-25 03:42:04 -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
6419a0d937
perf!(lex): Build faster by removing os_str_bytes
...
We are doing direct transmutes between `OsStr` and `[u8]`.
https://github.com/rust-lang/rust/pull/95290 would make this natively
supported but I got tired of waitin for it.
This only saves about 1/4s off of `cargo build`.
This took 2.9 KiB off of `cargo bloat --release --example git`
2023-03-25 01:59:24 -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
d9a641bcc8
docs: Consistently use console fence type
2023-03-24 21:33:49 -05:00
Ed Page
5b65ede0ae
style: Reduce unstable-v5 warnings
2023-03-24 21:32:58 -05:00
Ed Page
5d0fbb47ce
doc: Clean up cfgs
2023-03-24 21:32:58 -05:00
Ed Page
e626dd4ffc
Merge pull request #4783 from epage/perf
...
perf(derive): Reduce the amount of generated code
2023-03-24 08:23:21 -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
240e237b5f
chore: Release
2023-03-18 13:26:18 -05:00
Ed Page
60e023fb2c
docs: Update changelog
2023-03-18 13:26:11 -05:00
Ed Page
6e1376cac8
Merge pull request #4781 from epage/deny
...
chore(ci): Switch to cargo-deny
2023-03-23 16:50:40 -05:00
Ed Page
f04ad2f38c
Merge pull request #4779 from epage/reserve
...
perf: Reduce alloc calls when building
2023-03-23 15:43:33 -05:00
Ed Page
bdfc6be5a7
Merge pull request #4778 from epage/downgrade
...
Revert "chore: Update bitflags dep to 2.0"
2023-03-23 15:38:39 -05:00
Ed Page
a2f500e440
chore(ci): Switch to cargo-deny
2023-03-18 12:46:33 -05:00
Ed Page
a62fd05d53
perf: Reduce alloc calls when building
...
Inspired by #4774
2023-03-18 11:59:01 -05:00
Ed Page
769ccc5cd6
Revert "chore: Update bitflags dep to 2.0"
...
This reverts commit 6878a1911b
.
2023-03-18 11:48:04 -05:00
Ed Page
79b44d0460
chore: Release
2023-03-18 09:17:44 -05:00
Ed Page
59109b640d
docs: Update changelog
2023-03-18 09:17:33 -05:00
Ed Page
dbf1b9a8d7
Merge pull request #4777 from epage/error
...
perf(derive): Improve build times
2023-03-23 12:11:14 -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
cc1474f97c
docs(help): Remove stale reference about wrapping
...
Fixes #4772
2023-03-17 00:16:13 -05:00
Ed Page
b69cf080ce
chore: Release
2023-03-16 20:02:37 -05:00
Ed Page
4f2f7024db
docs: Update changelog
2023-03-16 20:02:30 -05:00
Ed Page
4c05dfb8a5
Merge pull request #4771 from nicholasbishop/bishop-update-bitflags
...
chore: Update bitflags dep to 2.0
2023-03-18 20:21:54 -05:00