Closed vallentin closed 5 months ago
Ouch. Fixed locally, new error message is going to say "parser requires an extra flag, argument or parameter, but its name is hidden by the author". I might add an error into invariant check - required but hidden argument seems very bad UX.
I agree, I actually ran into it because of a "typo" in relation to the previous issue #344 I posted. I was doing something along the lines of #[bpaf(hide, env)]
, but then accidentally used field: T
instead of field: Option<T>
Fixed in #349
As the title says:
Executing
cargo run
results in:However, changing
#[bpaf(long)]
to#[bpaf(hide, long)]
and then executingcargo run
results in:I still expected an error, but not a panic.
I think a hidden argument, should be hidden from the help text, but included in error messages. Maybe rephrasing a bit, and saying
expected hidden `--foo=ARG` ...
or something similar.