Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AutoCLI Tracking Issue #3499

Closed
4 of 15 tasks
pysel opened this issue Nov 23, 2022 · 7 comments
Closed
4 of 15 tasks

AutoCLI Tracking Issue #3499

pysel opened this issue Nov 23, 2022 · 7 comments

Comments

@pysel
Copy link
Member

pysel commented Nov 23, 2022

Draft PR: #3485

Abstract

In order to make it easier for developers to write Cosmos SDK modules, we provide infrastructure which automatically generates CLI commands based on protobuf definitions.

Due to the fact that autocli is already implemented in SDK (even though it does not provide much functionality yet), the main goal is to follow SDK's approach to make the same thing possible for Osmosis.

Checklist for implementing SDK's features

  • client/v2 folder (aka api types)
  • Add simulation run with non-related to modules commands
  • Add /runtime module to Osmosis's SDK fork
  • Generate proto files

Auto CLI commands checklist by module

  • Lockup WIP
  • Epochs
  • Gamm
  • Gov
  • Mint
  • Pool-Incentives
  • Superfluid
  • Tokenfactory
  • TWAP
  • TxFees
  • Incentives

* Will create PR for each module

Possible Problems

  • Osmosis's SDK fork has drastically fallen behind original SDK. Because of that a lot of additions to the current Osmosis's SDK are required. In addition, a lot of api changes will be needed because of that. At this point, I do not know wether it would be better to continue mimicking SDK's AutoCLI approach or rewrite it from scratch the way we need it.

  • Dependency Injection. As to my knowledge, Osmosis does not wish to deal with depinject package. This may also require to rewrite AutoCLI as we want, because SDK's approach uses depinject. However:

    1. There is only one place using injection: injecting AppConfig (application configurations of every module) into AppOptions (application options for every module, which are needed during cobra commands generations)
    2. From conversation with SDK member, we were told that it will be possible to use it without depinject

These are the only problems I can think of currently.

Will be updating this issue in time.

@pysel pysel mentioned this issue Nov 23, 2022
@ValarDragon
Copy link
Member

Why does CLI have any need for simulation?

@pysel
Copy link
Member Author

pysel commented Nov 24, 2022

Why does CLI have any need for simulation?

for the purpose of demonstrating that it works. I should have clarified that, my bad

@pysel
Copy link
Member Author

pysel commented Nov 24, 2022

it will only be there while it is draft, I will remove it prior to merging
that is the plan for now at least

@faddat
Copy link
Member

faddat commented Nov 29, 2022

@ValarDragon splice into the osmosis-sdk, or work on a v47 upgrade?

Getting reports currently that bringing autocli into sdk v45, will cause breakages when Osmosis moves to cosmos-sdk v0.47.*

Today's workshop is on autocli again, so we're all poking at it currently.

What doesn't work

  • app wiring related features

  • what does
    • autocli itself

@pysel
Copy link
Member Author

pysel commented Nov 29, 2022

@ValarDragon splice into the osmosis-sdk, or work on a v47 upgrade?

Getting reports currently that bringing autocli into sdk v45, will cause breakages when Osmosis moves to cosmos-sdk v0.47.*

Today's workshop is on autocli again, so we're all poking at it currently.

What doesn't work

  • app wiring related features

  • what does

    • autocli itself

I'd say autocli does not work due to app-wiring absence in sdk45 of osmosis

@faddat
Copy link
Member

faddat commented Nov 29, 2022

Okay, let's do what the SDK team recommended, and table this for a little bit. Let's keep your research at the ready and thank you so much for really digging deep into this.

Oh and one more thanks for finishing up my half written issue. That's kind of a habit of mine, I... anyway thank you before I start another half written issue. :)

@ValarDragon
Copy link
Member

Should we close this for now, in favor of osmocli?

@czarcas7ic czarcas7ic closed this as not planned Won't fix, can't repro, duplicate, stale Jan 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Archived in project
Development

No branches or pull requests

4 participants