Commit graph

18 commits

Author SHA1 Message Date
Ed Page
e9cbed34cd fix(parser): Don't panic on invalid UTF-8 values
Fixes #4473
2022-11-11 12:26:04 -06:00
Ed Page
45d26e0013 test(parser): Show UTF8 bug 2022-11-11 12:22:30 -06:00
Ed Page
43e961d24f style: Address clippy 2022-08-11 16:07:58 -05:00
Ed Page
76bff6f34e fix!: Remove rest of deprecated APIs
Fixes #4009
2022-08-01 15:21:33 -05:00
Ed Page
5f20fe1930 docs: Shift focus from takes_value to actions 2022-07-26 14:50:51 -05:00
Ed Page
8ea1e2d4d3 fix!: Use value parsers for external subcommands
This changes the default type as well to encourage preserving the full
information for shelling out.  If people need UTF-8, then they can
change the value parser.

Fixes #3733
2022-07-25 14:31:56 -05:00
Ed Page
cd9cbb4c20 fix!: Remove ArgMatches::*value* functions 2022-07-21 14:24:16 -05:00
Ed Page
9caec5a52d fix(parser): Deprecate ArgMatches::is_present 2022-06-10 14:21:25 -05:00
Ed Page
a712adefcd fix(parser): Deprecate value_of and friends 2022-05-25 12:57:11 -05:00
Ed Page
f15a1aab1a fix: Deprecate allow_invalid_utf8 2022-05-25 12:57:11 -05:00
Ed Page
dcf69d1c87 refactor(parser): Track str/OsStr values via Box
Unfortunately, we can't track using a `ValueParser` inside of `Command`
because its `PartialEq`.  We'll have to wait until a breaking change to
relax that.

Compatibility:
- We now assert on using the wrong method to look up defaults.  This
  shouldn't be a breaking change as it'll assert when getting a real
  value.
- `values_of`, et al delay panicing on the wrong lookup until the
  iterator is being processed.
2022-05-12 16:13:30 -05:00
Ed Page
c4144d7d6c docs: Update App references to Command 2022-02-14 15:33:49 -06:00
Ed Page
272f840178 feat: Replace core set of AppSettings with functions
This is a part of #2717

Some settings didn't get getters because
- They are transient parse settings (e.g. ignore errors)
- They get propagated to args and should be checked there

`is_allow_hyphen_values_set` is a curious case.  In some cases, we only
check the app and not an arg.  This seems suspicious.
2022-02-11 12:35:09 -06:00
Ed Page
b538a43961 refactor(error): Switch to error::ErrorKind 2022-02-02 15:41:24 -06:00
Ed Page
4538d618a7 refactor: Migrate off of .kind 2022-02-01 11:27:08 -06:00
Ed Page
9c6c0174d2 test: Show more detailed failures 2021-12-27 13:57:38 -06:00
rhysd
8ce56d416e fix: Update tests for assertion messages 2021-12-11 20:33:23 +09:00
Ed Page
045bf99ae0 test: Consolidate builder tests
This is prep for moving the derive tests.  Besides organizing the test
folder for each API, this should reduce link time at the cost of
re-compiling more when a test changes.
2021-11-30 10:07:05 -06:00
Renamed from tests/utf8.rs (Browse further)