effekt
effekt copied to clipboard
Passing same `--no-...` option twice breaks with bad error message
When running effekt indirectly via a script, it can happen that options like --no-optimize get duplicated, e.g.:
effekt --no-optimize --no-optimize <some effect file>
When this happens, Effekt currently errors out with:
Command-line error: Bad arguments for option 'optimize': ' ' - wrong arguments format
Common Options
-c, --compile Compile the Effekt program to the backend
specific representation
--no-compile
...
IMHO this should just work, or at least provide a better error message.
This seems to be a problem in the Scallop library. It seems that toggle options don't like to see other toggle options: https://github.com/scallop/scallop/blob/0f290269a69e22068629294c864ad2bd9a2c3ff1/src/main/scala/org.rogach.scallop/CliOptions.scala#L263-L278