Skip to content

Commit 18ee6b2

Browse files
committed
Merge #124: Migrate from structopt to clap.
b20a140 Fix some clippies.. (rajarshimaitra) 1e21cc7 Fix wasm (rajarshimaitra) ba1c165 Update cargo lock. (rajarshimaitra) 02e71b0 Reverse the recipient parsing string (rajarshimaitra) 95719b0 Remove vector of string from compact_filters options. (rajarshimaitra) 9fb651a Update wasm build to 1.57 in CI (rajarshimaitra) 7e87a65 update MSRV to 1.57 (rajarshimaitra) 3dcc269 Update Cargo lock (rajarshimaitra) f8c0f2e Update recipient parsing in handlers. (rajarshimaitra) 5bbc45a Move from structopt to clap (rajarshimaitra) Pull request description: <!-- You can erase any parts of this template not applicable to your Pull Request. --> ### Description Fixes #113. This is an attempt to migrate from `structopt` to `clap v0.3` which provides very similar kind of derives as `structopt`. Changes are straight forward. But this comes with few more problems. - with clap `v3.2.22` the MSRV pushes up to `1.57.0`.. The last clap of MSRV `1.56.0` was `clap 3.2.5`.. But even that doesn't seem to be working at MSRV `1.56.0` anymore, as bunch of underlying lib has upgraded. - `clap v3.0` doesn't seem to support custom vector parsing well, reported here clap-rs/clap#1704. This is required for `recipient` parsing which is a `Vec<(Script, u32)>`. Workaround for that is to use vecs of strings and parse them at runtime in `create_tx` handler. Included in the PR. ### Notes to the reviewers `structopt` is currently freezed at `clap 2.0` and doesn't seem to intend on updating and currently its has unmaintained vulnerability. And `clap v3.0` onward seems to replacing everything that `structopt` did before. So this means we should also look for ways to migrate from `strcutopt` to `clap`.. But `clap` seemed to have moved ahead than our MSRV `1.56.0`.. So we need to take up a call on that.. Opened this PR to facilitate that discussion.. This is draft until we figure what to do.. ### Checklists #### All Submissions: * [x] I've signed all my commits * [x] I followed the [contribution guidelines](https://github.com/bitcoindevkit/bdk-cli/blob/master/CONTRIBUTING.md) * [x] I ran `cargo fmt` and `cargo clippy` before committing ACKs for top commit: notmandatory: ACK b20a140 Tree-SHA512: de3511c1531185064e3c328f0c966c3e87294b7c6d07a89ba9f64e49f7c8b8ccaef0915f49fc6721b738f91a0128b30eeb61147a2da174ccac9abab094ab6798
2 parents af925ab + b20a140 commit 18ee6b2

File tree

7 files changed

+192
-198
lines changed

7 files changed

+192
-198
lines changed

.github/workflows/cont_integration.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
matrix:
1212
rust:
1313
- 1.60.0 # STABLE
14-
- 1.56.0 # MSRV
14+
- 1.57.0 # MSRV
1515
features:
1616
- default
1717
- electrum,sqlite-db
@@ -80,7 +80,7 @@ jobs:
8080
- run: sudo apt-get update || exit 1
8181
- run: sudo apt-get install -y libclang-common-10-dev clang-10 libc6-dev-i386 || exit 1
8282
- name: Set default toolchain
83-
run: rustup default 1.56.1 # MSRV
83+
run: rustup default 1.57.0 # MSRV
8484
- name: Set profile
8585
run: rustup set profile minimal
8686
- name: Add target wasm32

Cargo.lock

Lines changed: 42 additions & 57 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ license = "MIT"
1414
[dependencies]
1515
bdk = { version = "0.24", default-features = false, features = ["all-keys"] }
1616
bdk-macros = "0.6"
17-
structopt = "0.3"
17+
clap = { version = "3.2.22", features = ["derive"] }
1818
serde_json = "1.0"
1919
log = "0.4"
2020
zeroize = "<1.4.0"

0 commit comments

Comments
 (0)