Skip to content

INIT: Scaffolding an array of custom type #3094

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

Activity

  1. aljo242 commented on Nov 14, 2022

    @aljo242
    Contributor

    This would be a useful feature for sure. We do not support this currently, but will be adding this as a feature to include in our planned scaffolding improvements epic.

    As you've said, in the meantime the best option is to modify the protobuf files manually, then recompile them using ignite c build.

    If you have any issues with this process feel free to provide more info here in this issue and we can try to help!

  2. ashishchandr70 commented on Nov 14, 2022

    @ashishchandr70
    Author

    Thanks. I took that approach and it works!

  3. fadeev commented on Dec 22, 2022

    @fadeev
    Contributor

    Reopening this. I think this is a very useful feature to have.

  4. reopened this on Dec 22, 2022
  5. added
    component:scaffoldFeature, enhancement, or refactor related to scaffolding.
    and removed on Dec 22, 2022
  6. modified the milestones: , on Oct 31, 2023
  7. moved this from To Discuss to Doing in Ignite CLI Masterboardon Apr 16, 2024
  8. changed the title [-]Scaffolding an array of custom type[/-] [+]INIT: Scaffolding an array of custom type[/+] on Jan 23, 2025
  9. moved this from Doing to Todo in Ignite CLI Masterboardon Jan 23, 2025
  10. lxgr-linux commented on Feb 16, 2025

    @lxgr-linux
    Contributor

    @julienrbrt Hey,
    I would volunteer to implement this, the fact this is missing has been on my nerves for years.
    LG

  11. julienrbrt commented on Feb 18, 2025

    @julienrbrt
    Member

    @julienrbrt Hey, I would volunteer to implement this, the fact this is missing has been on my nerves for years. LG

    Hi! You are most welcome to! Thank you!

  12. removed this from the milestone on Jun 11, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

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

Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions