gevulotnetwork / gevulot

Gevulot is an internet scale compute network for zero-knowledge proof generation and verification.
https://gevulot.com
Apache License 2.0
154 stars 48 forks source link

Parse json args as vector of strings #206

Open koxu1996 opened 2 months ago

koxu1996 commented 2 months ago

Asking for args in key=value format is a mistake, as it is often necessary to pass single values for CLI execution. There was workaround #201, but I believe we should just use a vector of strings. Not only it's simpler and more intuitive, but it also supports weird case when user wants to pass empty string as an argument.

This is breaking change of CLI, but resolves all the issues with passing args. I will update documentation accordingly, once this PR is merged.

tuommaki commented 2 months ago

Asking for args in key=value format is a mistake, as it is often necessary to pass single values for CLI execution.

I :100: agree with you on this, but I'd rather not merge this in at this point. There's more than our documentation (e.g. blog articles, TG support / examples etc.) with the old format and I don't want to break them at this point when the devnet as-is won't be live too long anymore. We must ensure that the future APIs handle arguments correctly (which they do atm. AFAIK) and just put up with this unfortunate key=value brainfart.

koxu1996 commented 2 months ago

What about supporting both formats and printing deprecation warning when key=value is used?