underscore in folder name crashes "ignite scaffold module mymodule"

1 week ago 10
ARTICLE AD BOX

I have a package name with underscore "space_chain" and when i trying run "ignite scaffold module customcheck" i got error:

✘ Error while running command /home/mf/go/bin/buf generate /mnt/e/w/go/src/github.com/imbamf/space_chain/proto --error-format=json --log-format=json --template=/mnt/e/w/go/src/github.com/imbamf/space_chain/proto/buf.gen.gogo.yaml --output=/tmp/2933124691 --path=/mnt/e/w/go/src/github.com/imbamf/space_chain/proto/spacechain/customcheck/genesis.proto --path=/mnt/e/w/go/src/github.com/imbamf/space_chain/proto/spacechain/customcheck/params.proto --path=/mnt/e/w/go/src/github.com/imbamf/space_chain/proto/spacechain/customcheck/query.proto --path=/mnt/e/w/go/src/github.com/imbamf/space_chain/proto/spacechain/customcheck/tx.proto: panic: file name spacechain/customcheck/params.proto does not start with expected space_chain/customcheck/; please make sure your folder structure matches the proto files fully-qualified names goroutine 1 [running]: github.com/cosmos/gogoproto/protoc-gen-gogo/generator.(*Generator).WrapTypes(0xc0002fac80) /home/mf/go/pkg/mod/github.com/cosmos/[email protected]/protoc-gen-gogo/generator/generator.go:806 +0xa2e github.com/cosmos/gogoproto/vanity/command.Generate(0xc000106a20) /home/mf/go/pkg/mod/github.com/cosmos/[email protected]/vanity/command/command.go:126 +0x18f main.main() /home/mf/go/pkg/mod/github.com/cosmos/[email protected]/protoc-gen-gocosmos/main.go:22 +0x505 Failure: plugin gocosmos: exit status 2

My project root folder name is space_chain: i have this structure:

. ├── Dockerfile ├── LICENSE ├── Makefile ├── api │   └── spacechain │   └── customcheck │   └── module │   └── module.pulsar.go ├── app │   ├── app.go │   ├── app_config.go │   ├── config.go │   ├── export.go │   ├── genesis.go │   ├── genesis_account.go │   ├── sim_bench_test.go │   └── sim_test.go ├── buf.work.yaml ├── changelog.md ├── cmd │   └── space_chaind │   ├── cmd │   │   ├── commands.go │   │   ├── config.go │   │   ├── root.go │   │   ├── testnet.go │   │   └── testnet_multi_node.go │   └── main.go ├── config.yml ├── dist │   ├── genesis.json │   └── space_chaind ├── docs │   └── static │   └── openapi.yml ├── go.mod ├── go.sum ├── proto │   ├── buf.gen.gogo.yaml │   ├── buf.gen.pulsar.yaml │   ├── buf.gen.sta.yaml │   ├── buf.gen.swagger.yaml │   ├── buf.gen.ts.yaml │   ├── buf.lock │   ├── buf.yaml │   ├── query.proto │   └── spacechain │   └── customcheck │   ├── genesis.proto │   ├── module │   │   └── module.proto │   ├── params.proto │   ├── query.proto │   └── tx.proto ├── readme.md ├── testnetgenerate.sh ├── testutil │   ├── keeper │   │   └── customcheck.go │   ├── network │   │   └── network.go │   ├── nullify │   │   └── nullify.go │   └── sample │   └── sample.go ├── tools │   └── tools.go └── x └── customcheck ├── keeper │   ├── keeper.go │   ├── msg_server.go │   ├── msg_server_test.go │   ├── msg_update_params.go │   ├── msg_update_params_test.go │   ├── params.go │   ├── params_test.go │   ├── query.go │   ├── query_params.go │   └── query_params_test.go ├── module │   ├── autocli.go │   ├── genesis.go │   ├── genesis_test.go │   ├── module.go │   └── simulation.go ├── simulation │   └── helpers.go └── types ├── codec.go ├── errors.go ├── expected_keepers.go ├── genesis.go ├── genesis_test.go ├── keys.go ├── msg_update_params.go ├── params.go └── types.go 28 directories, 71 files

As seeing in this folder structure the command "ignite scaffold module customecheck" creates folder with name "/proto/spacechain" (without underscore) but must be name "space_chain", /proto/spacechain -> /proto/space_chain and then when command continue working, after some minutes i got error that i provide above

ignite vestion:

Ignite CLI version: v28.6.1 Ignite CLI build date: 2024-12-18T21:52:35Z Ignite CLI source hash: 3af08a4da563d4c295c3adf8a760734095f65bbe Ignite CLI config version: v1 Cosmos SDK version: v0.50.11 Your OS: linux Your arch: amd64 Your go version: go version go1.25.5 linux/amd64 Your uname -a: Linux iPhone-Qard 6.6.87.2-microsoft-standard-WSL2 #1 SMP PREEMPT_DYNAMIC Thu Jun 5 18:30:46 UTC 2025 x86_64 x86_64 x86_64 GNU/Linux Your cwd: /mnt/e/w/go/src/github.com/imbamf/space_chain Is on Gitpod: false

Can any explain how can i solve it? If i have working network, can i rename project to name "spacechain" and rename module in go.mod file to "spacechain" and all import in .go files to /spacechain/app (not space_chain/app), and after upgrade will it work fine or its wrong? can anyone who know how it works under the hood explain how to solve this issue

Read Entire Article