From 449c4e61058837ca0f79d86c600177a16ddfe305 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 9 Feb 2023 23:06:33 +0100 Subject: [PATCH 1/2] chore: follow-ups --- Makefile | 2 +- api/cosmos/autocli/v1/options.pulsar.go | 24 ++++++++++++------------ api/cosmos/orm/v1/orm.pulsar.go | 7 +++++-- proto/cosmos/autocli/v1/options.proto | 6 +++--- 4 files changed, 21 insertions(+), 18 deletions(-) diff --git a/Makefile b/Makefile index 67762f6f64fa..f9a7511dbf22 100644 --- a/Makefile +++ b/Makefile @@ -372,7 +372,7 @@ format: ### Protobuf ### ############################################################################### -protoVer=0.11.6 +protoVer=0.12.0 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) diff --git a/api/cosmos/autocli/v1/options.pulsar.go b/api/cosmos/autocli/v1/options.pulsar.go index 265c2368769b..9dcec49e8f6c 100644 --- a/api/cosmos/autocli/v1/options.pulsar.go +++ b/api/cosmos/autocli/v1/options.pulsar.go @@ -3435,21 +3435,21 @@ func (x *fastReflection_FlagOptions) ProtoMethods() *protoiface.Methods { dAtA[i] = 0 } i-- - dAtA[i] = 0x40 + dAtA[i] = 0x38 } if len(x.ShorthandDeprecated) > 0 { i -= len(x.ShorthandDeprecated) copy(dAtA[i:], x.ShorthandDeprecated) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.ShorthandDeprecated))) i-- - dAtA[i] = 0x3a + dAtA[i] = 0x32 } if len(x.Deprecated) > 0 { i -= len(x.Deprecated) copy(dAtA[i:], x.Deprecated) i = runtime.EncodeVarint(dAtA, i, uint64(len(x.Deprecated))) i-- - dAtA[i] = 0x32 + dAtA[i] = 0x2a } if len(x.DefaultValue) > 0 { i -= len(x.DefaultValue) @@ -3656,7 +3656,7 @@ func (x *fastReflection_FlagOptions) ProtoMethods() *protoiface.Methods { } x.DefaultValue = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 6: + case 5: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Deprecated", wireType) } @@ -3688,7 +3688,7 @@ func (x *fastReflection_FlagOptions) ProtoMethods() *protoiface.Methods { } x.Deprecated = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 7: + case 6: if wireType != 2 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field ShorthandDeprecated", wireType) } @@ -3720,7 +3720,7 @@ func (x *fastReflection_FlagOptions) ProtoMethods() *protoiface.Methods { } x.ShorthandDeprecated = string(dAtA[iNdEx:postIndex]) iNdEx = postIndex - case 8: + case 7: if wireType != 0 { return protoiface.UnmarshalOutput{NoUnkeyedLiterals: input.NoUnkeyedLiterals, Flags: input.Flags}, fmt.Errorf("proto: wrong wireType = %d for field Hidden", wireType) } @@ -4535,11 +4535,11 @@ type FlagOptions struct { // default_value is the default value as text. DefaultValue string `protobuf:"bytes,4,opt,name=default_value,json=defaultValue,proto3" json:"default_value,omitempty"` // deprecated is the usage text to show if this flag is deprecated. - Deprecated string `protobuf:"bytes,6,opt,name=deprecated,proto3" json:"deprecated,omitempty"` + Deprecated string `protobuf:"bytes,5,opt,name=deprecated,proto3" json:"deprecated,omitempty"` // shorthand_deprecated is the usage text to show if the shorthand of this flag is deprecated. - ShorthandDeprecated string `protobuf:"bytes,7,opt,name=shorthand_deprecated,json=shorthandDeprecated,proto3" json:"shorthand_deprecated,omitempty"` + ShorthandDeprecated string `protobuf:"bytes,6,opt,name=shorthand_deprecated,json=shorthandDeprecated,proto3" json:"shorthand_deprecated,omitempty"` // hidden hides the flag from help/usage text - Hidden bool `protobuf:"varint,8,opt,name=hidden,proto3" json:"hidden,omitempty"` + Hidden bool `protobuf:"varint,7,opt,name=hidden,proto3" json:"hidden,omitempty"` } func (x *FlagOptions) Reset() { @@ -4739,12 +4739,12 @@ var file_cosmos_autocli_v1_options_proto_rawDesc = []byte{ 0x09, 0x52, 0x05, 0x75, 0x73, 0x61, 0x67, 0x65, 0x12, 0x23, 0x0a, 0x0d, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x5f, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0c, 0x64, 0x65, 0x66, 0x61, 0x75, 0x6c, 0x74, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x12, 0x1e, 0x0a, - 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x64, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, 0x12, 0x31, 0x0a, 0x14, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x5f, 0x64, 0x65, 0x70, 0x72, 0x65, - 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x68, 0x6f, + 0x63, 0x61, 0x74, 0x65, 0x64, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x13, 0x73, 0x68, 0x6f, 0x72, 0x74, 0x68, 0x61, 0x6e, 0x64, 0x44, 0x65, 0x70, 0x72, 0x65, 0x63, 0x61, 0x74, 0x65, 0x64, - 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x08, + 0x12, 0x16, 0x0a, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x18, 0x07, 0x20, 0x01, 0x28, 0x08, 0x52, 0x06, 0x68, 0x69, 0x64, 0x64, 0x65, 0x6e, 0x22, 0x54, 0x0a, 0x17, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x61, 0x6c, 0x41, 0x72, 0x67, 0x44, 0x65, 0x73, 0x63, 0x72, 0x69, 0x70, 0x74, 0x6f, 0x72, 0x12, 0x1f, 0x0a, 0x0b, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x5f, 0x66, 0x69, 0x65, diff --git a/api/cosmos/orm/v1/orm.pulsar.go b/api/cosmos/orm/v1/orm.pulsar.go index 54ac19ce08a5..e746252fa4fc 100644 --- a/api/cosmos/orm/v1/orm.pulsar.go +++ b/api/cosmos/orm/v1/orm.pulsar.go @@ -2129,8 +2129,11 @@ type PrimaryKeyDescriptor struct { // with a 32-bit unsigned varint in non-terminal segments. // - int32, sint32, int64, sint64, sfixed32, sfixed64 are encoded as fixed width bytes with // an encoding that enables sorted iteration. - // - google.protobuf.Timestamp and google.protobuf.Duration are encoded - // as 12 bytes using an encoding that enables sorted iteration. + // - google.protobuf.Timestamp is encoded such that values with only seconds occupy 6 bytes, + // values including nanos occupy 9 bytes, and nil values occupy 1 byte. When iterating, nil + // values will always be ordered last. Seconds and nanos values must conform to the officially + // specified ranges of 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z and 0 to 999,999,999 respectively. + // - google.protobuf.Duration is encoded as 12 bytes using an encoding that enables sorted iteration. // - enum fields are encoded using varint encoding and do not support sorted // iteration. // - bool fields are encoded as a single byte 0 or 1. diff --git a/proto/cosmos/autocli/v1/options.proto b/proto/cosmos/autocli/v1/options.proto index 4b938db6977f..b0112455f5d7 100644 --- a/proto/cosmos/autocli/v1/options.proto +++ b/proto/cosmos/autocli/v1/options.proto @@ -102,13 +102,13 @@ message FlagOptions { string default_value = 4; // deprecated is the usage text to show if this flag is deprecated. - string deprecated = 6; + string deprecated = 5; // shorthand_deprecated is the usage text to show if the shorthand of this flag is deprecated. - string shorthand_deprecated = 7; + string shorthand_deprecated = 6; // hidden hides the flag from help/usage text - bool hidden = 8; + bool hidden = 7; } // PositionalArgDescriptor describes a positional argument. From 8a07245cb59f5f158461f68d51492988a7f442a6 Mon Sep 17 00:00:00 2001 From: Julien Robert Date: Thu, 9 Feb 2023 23:46:51 +0100 Subject: [PATCH 2/2] updates --- Makefile | 2 +- scripts/protocgen.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index f9a7511dbf22..67762f6f64fa 100644 --- a/Makefile +++ b/Makefile @@ -372,7 +372,7 @@ format: ### Protobuf ### ############################################################################### -protoVer=0.12.0 +protoVer=0.11.6 protoImageName=ghcr.io/cosmos/proto-builder:$(protoVer) protoImage=$(DOCKER) run --rm -v $(CURDIR):/workspace --workdir /workspace $(protoImageName) diff --git a/scripts/protocgen.sh b/scripts/protocgen.sh index b1a4428e8572..dad8f74624e1 100755 --- a/scripts/protocgen.sh +++ b/scripts/protocgen.sh @@ -33,6 +33,6 @@ cp -r github.com/cosmos/cosmos-sdk/* ./ cp -r cosmossdk.io/** ./ rm -rf github.com cosmossdk.io -go mod tidy +# go mod tidy # TODO to be uncommented after https://github.com/cosmos/cosmos-sdk/issues/14988 ./scripts/protocgen-pulsar.sh