Supervise {
#[arg(long)]
file: PathBuf,
#[cfg(feature = "etcd")]
#[arg(long, value_parser = parse_socket_addr, conflicts_with("file"))]
etcd: Option<SocketAddr>,
},
Hi, im having some problem with clap, bc i want both these args to be excluents, but one of them being conditionaly compiled is making things hard, i want at least one to be used, but cant use both, if i put the file
as is, im required to use file
use even when using etcd
. If i put file
as Option<>
, both wont be required. If etcd
is not Option<>
, Clap makes me have to use both, even with the conflicts_with("file")
. And when i try to use both, i have this panic:
the best would be to have conflicts_with("file")
as conditionaly compiled, but this is impossible, i tried with groups also, but cant be conditional also.