summaryrefslogtreecommitdiffstats
path: root/Cargo.lock
diff options
context:
space:
mode:
authorNora Widdecke <nora@sequoia-pgp.org>2022-05-06 17:57:06 +0200
committerNora Widdecke <nora@sequoia-pgp.org>2022-05-16 14:23:08 +0200
commitf17ada2baf2866e90ac1f9d68309ed9b8d8347f8 (patch)
tree3d3e47c2f9eb69cb41a56ce91fcadf42ed008f96 /Cargo.lock
parente41ce7b791031bf40d0035673fd2f32b2a2a029c (diff)
sq: Port command line handling from clap 2 to 3.
Change sq command line handling from using clap version 2 to version 3, and adapt to all the breaking changes. Clap version 3 is a major new version with a number of breaking changes. It also adds functionality to allow a structopt style declarative way of defining command line syntax. We want to use that, but first we need to port the old "builder style" of defining the command line syntax to clap version 3. The change to use the "derive style" comes later. The semantics of clap version 2's .multiple function were hard to understand and it was replaced with .multiple_occurences. Care was taken to preserve the original intention regarding an argument's number of occurrences and number of values. There are some changes to help output (in src/sq-usage.rs). These are mostly from upstream changes and we think the differences are minor so we are okay with following upstream's lead. In summary: FLAGS and OPTIONS are merged into just OPTIONS; the layout of subcommand lists are a little different (split into two lines); there is no "[--]" before filename arguments anymore; default and allowed values for options are on a separate line now; --version isn't repeated for every subcommand anymore; help is listed for each subcommand separately. In addition, we will help clap upstream fix a problem where the help output doesn't have a "..." to indicate that an option may be used several times. Further, upstream has changed --help text to be of the form "Print help", when it earlier was "Prints help". We will change our own help texts to follow suite in a future commit. We don't do it in this commit, to avoid making an even larger diff. By default, clap v3 now colors its help output. However, this does not support custom sections like our examples. Clap is tracking this as https://github.com/clap-rs/clap/issues/3108. In the meantime, disable colors.
Diffstat (limited to 'Cargo.lock')
-rw-r--r--Cargo.lock101
1 files changed, 93 insertions, 8 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 566800e7..b6467aad 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -414,14 +414,62 @@ dependencies = [
"ansi_term",
"atty",
"bitflags",
- "strsim",
- "term_size",
+ "strsim 0.8.0",
"textwrap 0.11.0",
"unicode-width",
"vec_map",
]
[[package]]
+name = "clap"
+version = "3.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "47582c09be7c8b32c0ab3a6181825ababb713fde6fff20fc573a3870dd45c6a0"
+dependencies = [
+ "atty",
+ "bitflags",
+ "clap_derive",
+ "clap_lex",
+ "indexmap",
+ "lazy_static",
+ "strsim 0.10.0",
+ "termcolor",
+ "terminal_size",
+ "textwrap 0.15.0",
+]
+
+[[package]]
+name = "clap_complete"
+version = "3.1.4"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "da92e6facd8d73c22745a5d3cbb59bdf8e46e3235c923e516527d8e81eec14a4"
+dependencies = [
+ "clap 3.1.17",
+]
+
+[[package]]
+name = "clap_derive"
+version = "3.1.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a3aab4734e083b809aaf5794e14e756d1c798d2c69c7f7de7a09a2f5214993c1"
+dependencies = [
+ "heck 0.4.0",
+ "proc-macro-error",
+ "proc-macro2",
+ "quote",
+ "syn",
+]
+
+[[package]]
+name = "clap_lex"
+version = "0.2.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "a37c35f1112dad5e6e0b1adaff798507497a18fceeb30cceb3bae7d1427b9213"
+dependencies = [
+ "os_str_bytes",
+]
+
+[[package]]
name = "cmac"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -479,7 +527,7 @@ checksum = "1604dafd25fba2fe2d5895a9da139f8dc9b319a5fe5354ca137cbbce4e178d10"
dependencies = [
"atty",
"cast",
- "clap",
+ "clap 2.34.0",
"criterion-plot",
"csv",
"itertools 0.10.3",
@@ -1255,6 +1303,12 @@ dependencies = [
]
[[package]]
+name = "heck"
+version = "0.4.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "2540771e65fc8cb83cd6e8a237f70c319bd5c29f78ed1084ba5d50eeac86f7f9"
+
+[[package]]
name = "hermit-abi"
version = "0.1.19"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -1874,6 +1928,12 @@ dependencies = [
]
[[package]]
+name = "os_str_bytes"
+version = "6.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
+
+[[package]]
name = "p256"
version = "0.8.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -2541,7 +2601,7 @@ dependencies = [
"anyhow",
"buffered-reader",
"capnp-rpc",
- "clap",
+ "clap 2.34.0",
"ctor",
"dirs",
"fs2",
@@ -2649,7 +2709,8 @@ dependencies = [
"assert_cmd",
"buffered-reader",
"chrono",
- "clap",
+ "clap 3.1.17",
+ "clap_complete",
"fehler",
"itertools 0.10.3",
"predicates",
@@ -2904,12 +2965,18 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
+name = "strsim"
+version = "0.10.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
+
+[[package]]
name = "structopt"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
dependencies = [
- "clap",
+ "clap 2.34.0",
"lazy_static",
"structopt-derive",
]
@@ -2920,7 +2987,7 @@ version = "0.4.18"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
dependencies = [
- "heck",
+ "heck 0.3.3",
"proc-macro-error",
"proc-macro2",
"quote",
@@ -3117,6 +3184,16 @@ dependencies = [
]
[[package]]
+name = "terminal_size"
+version = "0.1.17"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "633c1a546cee861a1a6d0dc69ebeca693bf4296661ba7852b9d21d159e0506df"
+dependencies = [
+ "libc",
+ "winapi",
+]
+
+[[package]]
name = "termtree"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
@@ -3128,7 +3205,6 @@ version = "0.11.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d326610f408c7a4eb6f51c37c330e496b08506c9457c9d34287ecc38809fb060"
dependencies = [
- "term_size",
"unicode-width",
]
@@ -3144,6 +3220,15 @@ dependencies = [
]
[[package]]
+name = "textwrap"
+version = "0.15.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
+dependencies = [
+ "terminal_size",
+]
+
+[[package]]
name = "thiserror"
version = "1.0.30"
source = "registry+https://github.com/rust-lang/crates.io-index"