The current state of the CLI in the SDK is a bit of a mess, with the use of Viper global/singleton, ad-hoc flag instantiation and binding, and magically instantiation of client.Context. It makes testing difficult and runtime errors hard to debug.
Once https://github.com/cosmos/cosmos-sdk/issues/6423 is finalized and merged, we'll have the ability to remove a lot of the existing cruft from the CLI framework. Namely, we should:
client.Context Init* and New* functions - https://github.com/cosmos/cosmos-sdk/pull/6797Stretch Goal:
--config flag where if provided, any field found will set/override any flag/arg./cc @aaronc @anilCSE @sahith-narahari @alessio
Since this is a quite a big change. Could we add creating a doc to the to do list for this. Maybe as an upgrade doc or explaining the scope of the changes for projects dependent upon this area of code.
@colin-axner sure, but the only major differences from a UX POV are:
config.tomlWe'll have an upgrading doc that will cover all of this stuff.
Great job bez!
Looking forward to the new cli
Most helpful comment
@colin-axner sure, but the only major differences from a UX POV are:
config.tomlWe'll have an upgrading doc that will cover all of this stuff.