Skip to content

INIT: Scaffolding an array of custom type #3094

@ashishchandr70

Description

@ashishchandr70

Is your feature request related to a problem or issue you encountered? Please describe.
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]

I am playing around with the ignite cli and am trying to scaffold a new type which has one of its fields as an array of a previously defined custom type. However, I get this error:

invalid proto message name array.Foo

These are my steps:
ignite s chain mychain
ignite s type foo index:int location
So far so good. Type foo is successfully created. Now, I want to do this:
ignite s type bar items:array.Foo

This is when I get this error:
invalid proto message name array.Foo

I am doing this in emulation of the scaffolding of other array types, such as string as per https://docs.ignite.com/kb/types

Describe the solution you'd like
A clear and concise description of what you want to happen.

I would like this scaffolding to work, just like it would work for

ignite s type bar items:array.string

Describe alternatives you've considered
A clear and concise description of any alternative solutions or features you've considered.

I could add the repeated prefix in the protobuf file but then I am not exactly sure how many other files would require an update. However, I have not tried this approach but I can, if this feature is not supported.

Include other useful information that helps us understand your request.

My ignite cli info:

Ignite CLI version:     v0.25.1
Ignite CLI build date:  2022-10-20T15:52:00Z
Ignite CLI source hash: cc393a9b59a8792b256432fafb472e5ac0738f7c
Cosmos SDK version:     v0.46.3
Your OS:                linux
Your arch:              amd64
Your Node.js version:   v12.22.9
Your go version:        go version go1.18.1 linux/amd64
Your uname -a:          Linux ubuntu2-virtual-machine 5.15.0-52-generic #58-Ubuntu SMP Thu Oct 13 08:03:55 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Your cwd:               /home/ubuntu/mychain
Is on Gitpod:           false

Metadata

Metadata

Assignees

Labels

component:scaffoldFeature, enhancement, or refactor related to scaffolding.

Projects

Status

Todo

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions