Migrate 'docopt' to 'structopt'#295
Migrate 'docopt' to 'structopt'#295bors[bot] merged 11 commits intokillercup:masterfrom DCjanus:master
Conversation
|
Beacuse of backtrace(>=0.3.16), we have to install MinGW for windows-gnu targets. |
|
Tried to upgrade the cargo-metadata version(0.6 -> 0.7), test failed and have to delete Output: thread 'upgrade_as_expected' panicked at 'cargo-upgrade failed to execute', tests/utils.rs:62:9
note: Run with `RUST_BACKTRACE=1` environment variable to display a backtrace.
test upgrade_as_expected ... FAILED
thread 'upgrade_prints_messages' panicked at 'Assertion failed for `target/debug/cargo-upgrade upgrade docopt --manifest-path=/tmp/cargo-edit-test.04q33Nv75XB6/Cargo.toml`
with: Unexpected return status: failure
stdout=``````
stderr=```Command failed due to unhandled error: Invalid manifest
Caused by: error during execution of `cargo metadata`: Blocking waiting for file lock on the registry index
Updating `git://mirrors.ustc.edu.cn/crates.io-index` index
Blocking waiting for file lock on the git checkouts
Updating git repository `https://github.com/serde-rs/serde.git`
Downloading crates ...
error: failed to download `libc v0.2.55`
Caused by:
unable to get packages from source
Caused by:
failed to download replaced source registry `https://github.com/rust-lang/crates.io-index`
Caused by:
failed to parse manifest at `/home/dcjanus/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/libc-0.2.55/Cargo.toml`
Caused by:
failed to parse the version requirement `rustc-std-workspace-core--CURRENT_VERSION_TEST` for dependency `rustc-std-workspace-core`
Caused by:
the given version requirement is invalid
```', /home/dcjanus/.cargo/registry/src/mirrors.ustc.edu.cn-61ef6e0cd06fb9b8/assert_cli-0.6.3/src/assert.rs:441:13
test upgrade_prints_messages ... FAILED |
|
@DCjanus thanks for the PR, I'll try to have a look this weekend. |
rename: 'ArgsWrap' -> 'Command' comment location: put docs above attributes arg conflict: 'path' and 'vers' are not conflicting
|
@ordian Thanks for your help, would you mind review again? |
|
bors r+ |
With these code, The reason that I changed those in this PR: It's hard to define some complex constraints in 'structopt'. If I forgot to remind you to pay attention to these changes in the review, I'm so sorry. |
|
Ah, sorry, you're right. |
|
I've noticed this PR introduced a regression with |
| /// `--version` | ||
| flag_version: bool, | ||
| /// Crates to be upgraded. | ||
| #[structopt(conflicts_with = "all")] |
There was a problem hiding this comment.
Looks like I found the suspect.
Close #207