Commit graph

7618 commits

Author SHA1 Message Date
Ed Page
06bff1c955 test(parser): Check subcommands conflict with positionals 2024-01-11 08:48:23 -06:00
Ed Page
70da3a8608 test(parser): Reduce size of test 2024-01-11 08:46:47 -06:00
Ed Page
11fd6ca269 test(parser): Clarify test name 2024-01-11 08:45:40 -06:00
Ed Page
811acc45c1 test(parser): Group subcommandc conflict tests 2024-01-11 08:45:03 -06:00
Ed Page
514f28bc92 chore: Release 2024-01-08 10:39:47 -06:00
Ed Page
1440456d3d docs: Update changelog 2024-01-08 10:39:30 -06:00
Ed Page
d6479ff7dd
Merge pull request #5290 from epage/or
fix: Allow position-sensitive flags
2024-01-08 10:31:30 -06:00
Ed Page
02f82146ad docs(cookbook): Clarify intent of fake flags 2024-01-08 10:14:37 -06:00
Ed Page
c603f34574
Merge pull request #5275 from epage/ci
chore(ci): Speed up critical path of CI
2024-01-08 10:04:46 -06:00
Ed Page
641b42b2e8 chore(ci): Speed up critical path of CI
We've decided to try using some of our funding to speed up CI.
kbknapp has experience with buildjet in the past which allows us to keep
our Actions and switch out our runners.

As we are charged for `num_cores * time`, increasing core counts could
decrease time, both helping us and keeping costs down.
I chose 8 cores (an upgrade over `ubuntu-latest`s 2 cores) as kbknapp
knew someone who benchmarked things for Rust/Python and found that a
good fit.

I only switched a subset of jobs over to buildjet to focus on jobs where
most of the time is spent on highly parallelizable operations.
Buildjet dropped our Linux test jobs from 8-9min to 2-3min.
The checks and UI-test jobs only improved by 30s-1min each, so I left
them out.
We can iterate as we go.
2024-01-08 09:58:56 -06:00
Ed Page
3eaf1af052 fix(help): Correctly show help for fake flags 2024-01-08 09:58:42 -06:00
Ed Page
d63106b9f6 docs(cookbook): Allow repeated operators 2024-01-08 09:50:40 -06:00
Ed Page
148e102ac3 fix(builder): Allow custom flag definitions
The goal is to allow getting the position of repeated flags for #5287
2024-01-08 09:49:43 -06:00
Ed Page
d53d881e33 docs(cookbook): Demonstrate bad 'find' behavior 2024-01-08 09:48:34 -06:00
Ed Page
2ab48b295c chore: Release 2024-01-04 13:11:49 -06:00
Ed Page
7a06a8cd61 docs: Update changelog 2024-01-04 13:11:17 -06:00
Ed Page
cca190efed docs: Correct link to StructOpt migration guide 2024-01-04 13:11:17 -06:00
Ed Page
5c31f453c1
Merge pull request #5281 from Manishearth/safety-docs
Correct safety docs
2024-01-02 19:59:06 -06:00
Manish Goregaokar
ddae7e6f41 Correct safety docs 2024-01-02 17:22:34 -08:00
Ed Page
48d28aa689 chore: Release 2024-01-02 15:00:09 -06:00
Ed Page
748ce18cc2 docs: Update changelog 2024-01-02 15:00:00 -06:00
Ed Page
adbe6ec4cb
Merge pull request #5278 from henry-hsieh/fix-nosort
Skip nosort option below bash 4.4
2024-01-02 14:59:11 -06:00
Henry Hsieh
2b48858ba8 fix: Skip nosort option below bash 4.4 2024-01-02 21:14:20 +08:00
Ed Page
777b744102
Merge pull request #5277 from clap-rs/renovate/actions-setup-python-5.x
chore(deps): update actions/setup-python action to v5
2024-01-01 20:33:58 -06:00
renovate[bot]
924b2524d0
chore(deps): update compatible (dev) (#5276)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-01-01 01:44:12 +00:00
renovate[bot]
b8cc5087e9
chore(deps): update actions/setup-python action to v5 2024-01-01 01:30:29 +00:00
Ed Page
6d601e6f31 chore: Release 2023-12-28 12:07:48 -06:00
Ed Page
048e7f0fbc docs: Update changelog 2023-12-28 12:07:33 -06:00
Ed Page
53f5b82098
Merge pull request #5267 from vermiculus/sa/avoid-pv-expansion-in-help
perf: avoid retrieving possible_values unless they're used
2023-12-28 12:05:34 -06:00
Sean Allred
05cd057978
perf: Avoid retrieving possible_values unless used
In some sophisticated situations, these may be expensive to calculate.
One example might be a '--branch' option accepting any single Git
branch that exists on the remote -- in such a case, the remote would
need to be queried for all possible_values. The cost is ultimately
unavoidable at runtime since this validation has to happen eventually,
but there's no need to pay it when generating help text if
`is_hide_possible_values_set`.

To keep '-h' fast, avoid collecting `possible_values` during '-h'
unless we're actually going to use the values in display.

This optimization is repeated for the manpage renderer.

This is trivially based on the short-circuiting logic at [1], which at
least supports the idea that actually consuming the iterator is not
generally-guaranteed behavior when `hide_possible_values` is set.

Note on the 'expensive' mod: This keeps all the possible_values tests
in one file but allows the entire set of tests to be controlled by the
'strings' feature (which is required to be able to use String rather
than str for each possible value).

[1]: clap_builder/src/builder/command.rs:long_help_exists_
2023-12-28 10:06:35 -06:00
Ed Page
29208083b0 test: Update snapshots 2023-12-27 12:09:15 -06:00
Ed Page
28763ebb6d chore: Release 2023-12-27 11:58:25 -06:00
Ed Page
ace7bb5b45 docs(complete): Update changelog 2023-12-27 11:58:12 -06:00
Ed Page
76beca4d4d docs(complete): Polish API reference for dynamic 2023-12-27 11:57:38 -06:00
Ed Page
3630e582d3
Merge pull request #5273 from epage/docsrs
docs: Include more content on docs.rs
2023-12-27 11:47:04 -06:00
Ed Page
3724b9e2e4 docs: Include more content on docs.rs 2023-12-27 11:30:42 -06:00
Ed Page
d092896d61 chore: Release 2023-12-04 12:17:32 -06:00
Ed Page
c76a713f8b chore: Update lockfile 2023-12-04 12:17:20 -06:00
Ed Page
b99d17bb0b docs: Update changelog 2023-12-04 12:16:15 -06:00
Ed Page
b47f8da4d8
Merge pull request #5247 from epage/group
feat: Add Command::mut_group
2023-12-04 12:15:32 -06:00
Ed Page
2e7c9d11a8
Merge pull request #5194 from c19/patch-1
proc-macro2 bump to 1.0.69 to fix unknown feature proc_macro_span_shrink
2023-12-04 12:07:56 -06:00
Ed Page
37917be0b7 feat: Add Command::mut_group
Fixes #5038
2023-12-04 12:03:05 -06:00
Ed Page
cf7a0272cc chore: Update from '_rust/main' 2023-12-04 11:05:47 -06:00
Ed Page
8c836eaa9d
Merge pull request #10 from epage/renovate/migrate-config
chore(config): migrate renovate config
2023-12-04 10:10:34 -06:00
renovate[bot]
598c624498 chore(config): migrate config .github/renovate.json5 2023-12-03 09:19:35 +00:00
Ed Page
c0a1814d3c chore: Release 2023-11-27 21:20:50 -06:00
Ed Page
c83e681e20 docs: Update changelog 2023-11-27 21:20:34 -06:00
Ed Page
91bcac4ca9
Merge pull request #5230 from epage/migrate
docs: Link out to the changelog at the relevant tag
2023-11-27 21:19:51 -06:00
Ed Page
030d87505d docs: Link out to the changelog at the relevant tag
This was inspired by #4254
2023-11-27 16:54:58 -06:00
Ed Page
b661a9de04
Merge pull request #5229 from epage/derive
docs(derive): Link to tutorial sections for attributes
2023-11-27 16:31:35 -06:00