Upgrade clap to v4

Close #2846

4.0.0 changelog: 'https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#400---2022-09-28'

I followed the [Migrating steps](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#migrating) and the only issue I encountered are:
1. The typo problem in previous commit "Fix clap ArgGroup typo"
2. I can't say I am 100% sure every [Subtle changes](https://github.com/clap-rs/clap/blob/master/CHANGELOG.md#breaking-changes) is fine for our use case, but at least after a quick read I didn't notice anything actionable.
This commit is contained in:
Lawrence Chou 2022-10-04 21:46:27 +08:00
parent 6285c5949c
commit 9e5ef8eb69
No known key found for this signature in database
GPG Key ID: 56B65EC9D482438D
3 changed files with 47 additions and 10 deletions

53
Cargo.lock generated
View File

@ -711,8 +711,8 @@ checksum = "86447ad904c7fb335a790c9d7fe3d0d971dc523b8ccd1561a520de9a85302750"
dependencies = [ dependencies = [
"atty", "atty",
"bitflags", "bitflags",
"clap_derive", "clap_derive 3.2.18",
"clap_lex", "clap_lex 0.2.4",
"indexmap", "indexmap",
"once_cell", "once_cell",
"strsim", "strsim",
@ -720,6 +720,21 @@ dependencies = [
"textwrap", "textwrap",
] ]
[[package]]
name = "clap"
version = "4.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30607dd93c420c6f1f80b544be522a0238a7db35e6a12968d28910983fee0df0"
dependencies = [
"atty",
"bitflags",
"clap_derive 4.0.9",
"clap_lex 0.3.0",
"once_cell",
"strsim",
"termcolor",
]
[[package]] [[package]]
name = "clap_derive" name = "clap_derive"
version = "3.2.18" version = "3.2.18"
@ -733,6 +748,19 @@ dependencies = [
"syn 1.0.101", "syn 1.0.101",
] ]
[[package]]
name = "clap_derive"
version = "4.0.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a4a307492e1a34939f79d3b6b9650bd2b971513cd775436bf2b78defeb5af00b"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2 1.0.46",
"quote 1.0.21",
"syn 1.0.101",
]
[[package]] [[package]]
name = "clap_lex" name = "clap_lex"
version = "0.2.4" version = "0.2.4"
@ -742,6 +770,15 @@ dependencies = [
"os_str_bytes", "os_str_bytes",
] ]
[[package]]
name = "clap_lex"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0d4198f73e42b4936b35b5bb248d81d2b595ecb170da0bac7655c54eedfa8da8"
dependencies = [
"os_str_bytes",
]
[[package]] [[package]]
name = "concat-arrays" name = "concat-arrays"
version = "0.1.2" version = "0.1.2"
@ -1793,7 +1830,7 @@ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"byteorder", "byteorder",
"clap", "clap 3.2.22",
"csv", "csv",
"encoding", "encoding",
"env_logger", "env_logger",
@ -1868,7 +1905,7 @@ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"byteorder", "byteorder",
"clap", "clap 3.2.22",
"encoding", "encoding",
"env_logger", "env_logger",
"glob", "glob",
@ -1888,7 +1925,7 @@ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"byteorder", "byteorder",
"clap", "clap 3.2.22",
"csv", "csv",
"encoding", "encoding",
"env_logger", "env_logger",
@ -1908,7 +1945,7 @@ dependencies = [
"anyhow", "anyhow",
"bincode", "bincode",
"byteorder", "byteorder",
"clap", "clap 3.2.22",
"csv", "csv",
"encoding", "encoding",
"env_logger", "env_logger",
@ -2049,7 +2086,7 @@ dependencies = [
"byte-unit", "byte-unit",
"bytes", "bytes",
"cargo_toml", "cargo_toml",
"clap", "clap 4.0.9",
"crossbeam-channel", "crossbeam-channel",
"either", "either",
"env_logger", "env_logger",
@ -2121,7 +2158,7 @@ dependencies = [
"atomic_refcell", "atomic_refcell",
"byte-unit", "byte-unit",
"bytes", "bytes",
"clap", "clap 4.0.9",
"crossbeam-channel", "crossbeam-channel",
"csv", "csv",
"derivative", "derivative",

View File

@ -31,7 +31,7 @@ async-trait = "0.1.57"
bstr = "1.0.1" bstr = "1.0.1"
byte-unit = { version = "4.0.14", default-features = false, features = ["std", "serde"] } byte-unit = { version = "4.0.14", default-features = false, features = ["std", "serde"] }
bytes = "1.2.1" bytes = "1.2.1"
clap = { version = "3.2.8", features = ["derive", "env"] } clap = { version = "4.0.9", features = ["derive", "env"] }
crossbeam-channel = "0.5.6" crossbeam-channel = "0.5.6"
either = "1.8.0" either = "1.8.0"
env_logger = "0.9.1" env_logger = "0.9.1"

View File

@ -11,7 +11,7 @@ async-trait = "0.1.57"
atomic_refcell = "0.1.8" atomic_refcell = "0.1.8"
byte-unit = { version = "4.0.14", default-features = false, features = ["std", "serde"] } byte-unit = { version = "4.0.14", default-features = false, features = ["std", "serde"] }
bytes = "1.2.1" bytes = "1.2.1"
clap = { version = "3.2.8", features = ["derive", "env"] } clap = { version = "4.0.9", features = ["derive", "env"] }
crossbeam-channel = "0.5.6" crossbeam-channel = "0.5.6"
csv = "1.1.6" csv = "1.1.6"
derivative = "2.2.0" derivative = "2.2.0"