ignite / cli

Ignite is a CLI tool and hub designed for constructing Proof of Stake Blockchains rooted in Cosmos-SDK
https://ignite.com
Other
1.26k stars 547 forks source link

Running `ignite c serve -r` removes generated Vuex stores for 3rd party modules #2986

Closed jeronimoalbi closed 2 years ago

jeronimoalbi commented 2 years ago

Description

Generated Vuex stores for 3rd party modules are removed from the vue/src/store/generated/index.ts file when the blockchain app is served using the --force-reset flag without --proto-all-modules.

This might be an issue when users generated Vuex code before running the blockchain app resetting the state in which case the generated store directories won't be removed but the index.ts file won't include them leading to an "inconsistent" code.

New users might not be aware of this behaviour. Maybe we should consider to always generate Vuex code for all modules by default.

fadeev commented 2 years ago

Maybe we should consider to always generate Vuex code for all modules by default.

Yes, please. The reason this was not the default behavior is that TS code generation happens on ignite c serve and it takes much longer to generate clients both for standard and custom module.

Hence, my proposal to not generate anything (except proto) when running serve.