Unverified Commit f25a61cf authored by zyno42's avatar zyno42
Browse files

Update `tapasco-debug` to use `clap` crate instead of `structopt`

because `structopt`'s functionality is now completely integrated in `clap`.
parent ff00160f
......@@ -123,8 +123,8 @@ version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "51e3973b165dc0f435831a9e426de67e894de532754ff7a3f307c03ee5dec7dc"
dependencies = [
"clap",
"heck",
"clap 2.34.0",
"heck 0.3.3",
"indexmap",
"log",
"proc-macro2",
......@@ -170,12 +170,42 @@ dependencies = [
"ansi_term",
"atty",
"bitflags",
"strsim",
"textwrap",
"strsim 0.8.0",
"textwrap 0.11.0",
"unicode-width",
"vec_map",
]
[[package]]
name = "clap"
version = "3.1.6"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d8c93436c21e4698bacadf42917db28b23017027a4deccb35dbe47a7e7840123"
dependencies = [
"atty",
"bitflags",
"clap_derive",
"indexmap",
"lazy_static",
"os_str_bytes",
"strsim 0.10.0",
"termcolor",
"textwrap 0.15.0",
]
[[package]]
name = "clap_derive"
version = "3.1.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "da95d038ede1a964ce99f49cbe27a7fb538d1da595e4b4f70b8c8f338d17bf16"
dependencies = [
"heck 0.4.0",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
[[package]]
name = "config"
version = "0.12.0"
......@@ -409,6 +439,12 @@ dependencies = [
"unicode-segmentation",
]
[[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"
......@@ -646,6 +682,15 @@ dependencies = [
"hashbrown 0.9.1",
]
[[package]]
name = "os_str_bytes"
version = "6.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8e22443d1643a904602595ba1cd8f7d896afe56d26712531c5ff73a15b2fbf64"
dependencies = [
"memchr",
]
[[package]]
name = "owned-alloc"
version = "0.2.0"
......@@ -792,7 +837,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "62941722fb675d463659e49c4f3fe1fe792ff24fe5bbaa9c08cd3b98a1c354f5"
dependencies = [
"bytes",
"heck",
"heck 0.3.3",
"itertools",
"lazy_static",
"log",
......@@ -1030,7 +1075,7 @@ version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7a7fe9b0669ef117c5cabc5549638528f36771f058ff977d7689deb517833a75"
dependencies = [
"heck",
"heck 0.3.3",
"proc-macro2",
"quote",
"syn",
......@@ -1043,28 +1088,10 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8ea5119cdb4c55b55d432abb513a0429384878c15dde60cc77b1c99de1a95a6a"
[[package]]
name = "structopt"
version = "0.3.26"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c6b5c64445ba8094a6ab0c3cd2ad323e07171012d9c98b0b15651daf1787a10"
dependencies = [
"clap",
"lazy_static",
"structopt-derive",
]
[[package]]
name = "structopt-derive"
version = "0.4.18"
name = "strsim"
version = "0.10.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dcb5ae327f9cc13b68763b5749770cb9e048a99bd9dfdfa58d0cf05d5f64afe0"
dependencies = [
"heck",
"proc-macro-error",
"proc-macro2",
"quote",
"syn",
]
checksum = "73473c0e59e6d5812c5dfe2a064a6444949f089e20eec9a2e5506596494e4623"
[[package]]
name = "syn"
......@@ -1105,12 +1132,12 @@ name = "tapasco-debug"
version = "0.1.0"
dependencies = [
"chrono",
"clap 3.1.6",
"crossterm",
"env_logger",
"log",
"memmap",
"snafu",
"structopt",
"tapasco",
"tui",
"unicode-width",
......@@ -1148,6 +1175,12 @@ dependencies = [
"unicode-width",
]
[[package]]
name = "textwrap"
version = "0.15.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b1141d4d61095b28419e22cb0bbf02755f5e54e0526f97f1e3d1d160e60885fb"
[[package]]
name = "time"
version = "0.1.44"
......
......@@ -14,6 +14,6 @@ snafu = "0.7.0"
chrono = "0.4.19"
log = "0.4.14"
env_logger = "0.9.0"
structopt = "0.3.23"
clap = { version = "3.1.6", features = ["derive"] }
memmap = "0.7.0"
unicode-width = "0.1.9"
......@@ -25,7 +25,7 @@ enum Error {
type Result<T, E = Error> = std::result::Result<T, E>;
use structopt::StructOpt;
use clap::StructOpt;
// TODO: 1. When issue #296 is fixed, remove the paragraph about the `EMFILE` error.
/// The interactive `TaPaSCo` Debugger can be used to retrieve information about the loaded
......@@ -36,7 +36,7 @@ use structopt::StructOpt;
#[structopt(rename_all = "kebab-case")]
struct Opt {
/// The Device ID of the FPGA you want to use if you got more than one
#[structopt(short = "d", long = "device", default_value = "0")]
#[structopt(short = 'd', long = "device", default_value = "0")]
device_id: u32,
/// Specify the Access Mode as subcommand
......@@ -60,7 +60,7 @@ fn init() -> Result<()> {
let Opt {
device_id,
subcommand,
} = Opt::from_args();
} = Opt::parse();
// Specify the Access Mode as subcommand and setup the App and UI
ui::setup(&mut app::App::new(device_id, subcommand).context(AppSnafu {})?).context(UISnafu {})
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment