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 549 forks source link

Add a flag to scaffold a module with no registration in `app` #1826

Open lumtis opened 3 years ago

lumtis commented 3 years ago

Add a flag --no-registration to only scaffold module without registering it to the app.go so the module is part of the codebase but not part of the blockchain

Example usage: spn, the monitoring-testnet module exists but will only be used by chains that connect to spn General usage: a utilitary module used by a remote chain

We already not register when an error happen with app so implementation must be trivial

starport s module foo --no-registration
fadeev commented 3 years ago

I like the idea. --no-import is a bit shorter.

lumtis commented 3 years ago

I like the idea. --no-import is a bit shorter.

This is to stay consistent with our current flag --require-registration

championshuttler commented 3 years ago

@lubtd @fadeev I want to work on this bug can you tell me how to do it? Thanks

lumtis commented 3 years ago

@lubtd @fadeev I want to work on this bug can you tell me how to do it? Thanks

Hey @championshuttler, sure you can if you're interested in this👍 This is not a bug but rather a feature

For the implementation it should be few lines of codes. The package services/scaffolder contains logic for scaffolding command. We want to add a flag to the starport s module command defined in cmd/scaffold_module.go so that the app.go file modification is skipped: https://github.com/tendermint/starport/blob/ff59c3a333854573df3c1b23e6fcc957804e376b/starport/services/scaffolder/module.go#L220