New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Clap 3.1.13 fails to build by unwrapping a None value #3669
Labels
C-bug
Category: Updating dependencies
Comments
A minimal reproduction: use clap::{arg, Command};
fn main() {
let mut cmd = Command::new("ctest").subcommand(
Command::new("subcmd").subcommand(
Command::new("multi")
.about("tests subcommands")
.author("Kevin K. <kbknapp@gmail.com>")
.version("0.1")
.arg(arg!(
<FLAG> "tests flags"
)),
),
);
cmd.build();
} If I remove one level of subcommand, it does not reproeduce |
Looks like #3667 exposed that we aren't recursing where we need to |
epage
added a commit
to epage/clap
that referenced
this issue
May 1, 2022
Besides addressing the panic from assuming things were built when they weren't, this should fix some completion issues for some people. Fixes clap-rs#3669
epage
added a commit
to epage/clap
that referenced
this issue
May 1, 2022
Besides addressing the panic from assuming things were built when they weren't, this should fix some completion issues for some people. Fixes clap-rs#3669
epage
added a commit
to epage/clap
that referenced
this issue
May 1, 2022
Besides addressing the panic from assuming things were built when they weren't, this should fix some completion issues for some people. Fixes clap-rs#3669
Released in v3.1.14 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Please complete the following tasks
Rust Version
rustc 1.60.0 (7737e0b5c 2022-04-04)
Clap Version
3.1.13
Minimal reproducible code
Steps to reproduce the bug with the above code
Sorry for not being able to reproduce this, this only happens in this one project I have where I upgraded
clap
and not in a few others I have, see this PR: sondr3/git-ignore#9. It seems to come from thebuild.rs
file when generating shell completions when running withRUST_BACKTRACES=1
:Actual Behaviour
I have verified that this only happens on
3.1.13
, using3.1.10
,3.1.11
and3.1.12
does not crash. I did a quick look at the commits but can't pinpoint any culprits from a quick glance.Expected Behaviour
This worked in the previous patch release.
Additional Context
If need be, I can try to bisect
clap
itself if you need more information. I haven't been able to create a minimal, crashing example.Debug Output
No response
The text was updated successfully, but these errors were encountered: