aerogear / charmil

The framework for building modular plugin based CLI's using Cobra and Golang
https://aerogear.github.io/charmil
Apache License 2.0
116 stars 13 forks source link

Migrate rhoas CLI to use Charmil #225

Closed ankithans closed 3 years ago

ankithans commented 3 years ago

In https://github.com/aerogear/charmil-host-example, it needs to use charmil overall.

ankithans commented 3 years ago

copying all the code and then migrating was not a good idea, it will take ages to fix those errors. Will be writting initial stuff on my own and then picking rhoas module by module.

wtrocki commented 3 years ago

Just seen it. What code to where? Maybe you want sync on approach? Technically taking only single command will work we do not need to take all of them for case study.

wtrocki commented 3 years ago

What we should do

1) Push rhoas apicurio-cli branch to host with all commits etc.

git remote add host ... git push host main

2) Push the same codebase to plugin

3) Remove service-registry commands from host

4) Remove everything else than service registry commands from plugin

At this point we could technically integrate both CLI even without charmil but we will see problems like

5) Sprinkle both projects with charmil solutions to those problems and extract common/useful code.

6) Integrate and call it done :)

Disclaimer: Nr 5 and 6 can take number of iterations and will likely require number of fixes in charmil. I see those as collaborative efforts with @namit-chandwani

wtrocki commented 3 years ago

Hope that clarifies things