Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FIX: Stringer in RawCheckpoint and correct checkpointing module ModuleName #17

Merged
merged 5 commits into from
Jun 20, 2022

Conversation

vitsalis
Copy link
Member

This PR fixes build errors introduced by #5 and #8

More specifically, initially there was this error related to the RawCheckpoint message.

>>> ignite chain serve --reset-once --verbose
cannot build app:

    [stack_trace]
# github.com/babylonchain/babylon/x/checkpointing/types
../../x/checkpointing/types/checkpoint.pb.go:85:51: cannot use m (variable of type *RawCheckpoint) as type "github.com/gogo/protobuf/proto".Message in argument to xxx_messageInfo_RawCheckpoint.Marshal:
        *RawCheckpoint does not implement "github.com/gogo/protobuf/proto".Message (missing String method)
../../x/checkpointing/types/checkpoint.pb.go:96:38: cannot use m (variable of type *RawCheckpoint) as type "github.com/gogo/protobuf/proto".Message in argument to xxx_messageInfo_RawCheckpoint.Merge:
        *RawCheckpoint does not implement "github.com/gogo/protobuf/proto".Message (missing String method)
../../x/checkpointing/types/checkpoint.pb.go:102:47: cannot use m (variable of type *RawCheckpoint) as type "github.com/gogo/protobuf/proto".Message in argument to xxx_messageInfo_RawCheckpoint.DiscardUnknown:
        *RawCheckpoint does not implement "github.com/gogo/protobuf/proto".Message (missing String method)
../../x/checkpointing/types/checkpoint.pb.go:219:21: cannot use (*RawCheckpoint)(nil) (value of type *RawCheckpoint) as type "github.com/gogo/protobuf/proto".Message in argument to proto.RegisterType:
        *RawCheckpoint does not implement "github.com/gogo/protobuf/proto".Message (missing String method)
: exit status 2

This seems to be introduced by the RawCheckpoint message not having a stringer method due to a config.

Afterwards, the build was failing due to the following error:

>>> ignite chain serve --reset-once --verbose
panic: route expressions can only contain alphanumeric characters

[stack_trace]

This was due to the ModuleName attribute containing a ..

@KonradStaniec
Copy link
Contributor

This is probably good time to have task to introduce CI which will at least have building step :)
Few remarks:

  1. Ine general I would check if code builds by running make build as this is something we will use
  2. Even on this branch when I run make build I got error x/epoching/types/query.pb.gw.go:144:31: undefined: metadata

@vitsalis
Copy link
Member Author

Yep, agreed.

The error happens because make proto-gen needs to run first. Seems that ignite is generating different proto files than what make proto-gen does. Committed an update to fix that as well.

@vitsalis vitsalis changed the title FIX: Introduce stringer in RawCheckpoint and use correct module name in checkpointing module FIX: String in RawCheckpoint, correct ModuleName in checkpointing module, and proto updates Jun 20, 2022
@vitsalis vitsalis changed the title FIX: String in RawCheckpoint, correct ModuleName in checkpointing module, and proto updates FIX: Stringer in RawCheckpoint and correct ModuleName in checkpointing module, Jun 20, 2022
@vitsalis vitsalis changed the title FIX: Stringer in RawCheckpoint and correct ModuleName in checkpointing module, FIX: Stringer in RawCheckpoint and correct ModuleName in checkpointing module Jun 20, 2022
@vitsalis vitsalis changed the title FIX: Stringer in RawCheckpoint and correct ModuleName in checkpointing module FIX: Stringer in RawCheckpoint and correct checkpointing module ModuleName Jun 20, 2022
@vitsalis vitsalis merged commit ae07660 into main Jun 20, 2022
@vitsalis vitsalis deleted the fix-build branch June 20, 2022 18:02
KonradStaniec pushed a commit that referenced this pull request Oct 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants