besu
besu copied to clipboard
repeated CLI args should prevent startup
I would expect besu to not start with this config since it's impossible to determine what is the desired behavior
besu --Xbonsai-full-flat-db-enabled=true --Xbonsai-full-flat-db-enabled=false
besu --privacy-enabled=true --privacy-enabled=false
besu --p2p-enabled=true --p2p-enabled=false
maybe it's only the case with boolean type args? if I try with --network or --sync-mode I get an aborted start with error message
besu --sync-mode=CHECKPOINT --sync-mode=FULL
option '--sync-mode' (<MODE>) should be specified only once
To display full help:
besu [COMMAND] --help
besu version besu/v25.3-develop-2df5428/osx-aarch_64/oracle_openjdk-java-22
Perhaps it is arity related with regard to PicoCLI?
yes, @jflo , seems to be related to how PicoCLI consumes the options , for single value types (not array, set, lists) the last specified value will override and be used, I am interested to take this a a first issue, should the default behaviour for all single value type options to NOT allow duplicates?
yes, not allowing duplicates for single value types should be the default behavior. a descriptive error and failing fast should happen if more than one is provided. I'll assign this to you, thanks!
@jonathandeclan any progress on this one?
Hi, I’m interested in this issue. Could you please assign it to me.
@jonathandeclan any progress on this one?
Started on it target to complete a PR in coming week