Aaron Craelius

Results 328 comments of Aaron Craelius

The only exception would be if we had to codegen for third-party files, but then you should just generate those separately

Here's one alternate idea I had for custom types: ```go type Coin struct { Denom string Amount string amountInt cosmos.Int amountIntLastStr string } func (c *Coin) GetAmountInt() (cosmos.Int, error) {...

I'm thinking this alternate approach might also be more performant for marshaling with the ORM. For instance, say we have a primary key field with a custom type - in...

Going to follow up on some of the discussion from https://github.com/cosmos/cosmos-proto/pull/45#discussion_r761377486. The current proposal there I think is: ```go type CustomType interface { UnmarshalBytes(b []byte) error MarshalBytes() ([]byte, error) Size()...

> ``` > CustomTypeString interface { > UnmarshalString(string) error > MarshalString() (string, error) > ValueString() string > } > > CustomTypeInt64 interface { > UnmarshalInt64(in64) error > MarshalInt64() (int64, error)...

But how is Value different from Marshal then? Unmarshal would make it mutable. I'm also not sure why the constructor is a problem. That can easily be derived from type...

Would be great to have a decision here. I'm mostly leaning towards the approach in https://github.com/cosmos/cosmos-proto/issues/2#issuecomment-984762597 for the reasons outlined there. I also think it will be quite easy to...

> > Would be great to have a decision here. I'm mostly leaning towards the approach in [#2 (comment)](https://github.com/cosmos/cosmos-proto/issues/2#issuecomment-984762597) for the reasons outlined there. I also think it will be...

Thanks @elias-orijtech. Likely the whole code generator will get rewritten before 1.0 in light of https://github.com/cosmos/cosmos-sdk/pull/15404 so that will likely affect this feature (as well as everything else) pretty substantially.

> would it be the same code path or potentially a different go mod to seaprate proto codegen from zero copy I think we'd want them to be the same...