cosmos-proto
cosmos-proto copied to clipboard
Support optional fields
The plugin currently does not support optional fields:
testpb/1.proto: is a proto3 file that contains optional fields, but code generator protoc-gen-go-fasteflection hasn't been updated to support optional fields in proto3.
it works in the main branch, but you need to pass --experimental_allow_proto3_optional
iceboxing this as we are not planning to support optional fields at this time
I think it's worth reopening this as I'm seeing some use cases for optional fields. How hard do you think it will be to add?
Btw, pulsar codegen does not fail for me and generates the expected *int32 pointer type. But build does fail:
regen/ecocredit/curation/v1beta1/state.pulsar.go:662:6: x.XMin undefined (type *fastReflection_NumericAttributeDefinition has no field or method XMin)
regen/ecocredit/curation/v1beta1/state.pulsar.go:663:16: x.XMin undefined (type *fastReflection_NumericAttributeDefinition has no field or method XMin)
regen/ecocredit/curation/v1beta1/state.pulsar.go:664:9: undefined: NumericAttributeDefinition_Min
It's complex due to presence semantics.
I will add it to the backlog, what is the priority?
I would consider it low as I can make a work-around