Closed kyessenov closed 6 years ago
/cc @davecheney need to fix this first to get the build working in go-control-plane
Also noticed this:
make kitchensink
# generates the kitchensink test protos
rm -r tests/kitchensink/go || true
mkdir -p tests/kitchensink/go
rm -r tests/kitchensink/gogo || true
mkdir -p tests/kitchensink/gogo
cd tests/kitchensink && \
protoc \
-I . \
-I ../.. \
--go_out="Mvalidate/validate.proto=github.com/lyft/protoc-gen-validate/validate,Mgoogle/protobuf/any.proto=github.com/golang/protobuf/ptypes/any,Mgoogle/protobuf/duration.proto=github.com/golang/protobuf/ptypes/duration,Mgoogle/protobuf/struct.proto=github.com/golang/protobuf/ptypes/struct,Mgoogle/protobuf/timestamp.proto=github.com/golang/protobuf/ptypes/timestamp,Mgoogle/protobuf/wrappers.proto=github.com/golang/protobuf/ptypes/wrappers,Mgoogle/protobuf/descriptor.proto=github.com/golang/protobuf/protoc-gen-go/descriptor,Mgogoproto/gogo.proto=github.com/lyft/protoc-gen-validate/gogoproto:./go" \
--validate_out="lang=go:./go" \
--plugin=protoc-gen-gogofast=/home/kuat/go/src/github.com/lyft/protoc-gen-validate/gogofast \
--gogofast_out="Mvalidate/validate.proto=github.com/lyft/protoc-gen-validate/validate,Mgoogle/protobuf/any.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/duration.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/struct.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/timestamp.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/wrappers.proto=github.com/gogo/protobuf/types,Mgoogle/protobuf/descriptor.proto=github.com/gogo/protobuf/types,Mgogoproto/gogo.proto=github.com/gogo/protobuf/gogoproto:./gogo" \
--validate_out="lang=gogo:./gogo" \
`find . -name "*.proto"`
cd tests/kitchensink/go && go build .
# github.com/lyft/protoc-gen-validate/tests/kitchensink/go
./repeated.pb.validate.go:158:15: undefined: _Repeated_InItemRules_InLookup
./repeated.pb.validate.go:170:15: undefined: _Repeated_NotInItemRules_NotInLookup
Makefile:86: recipe for target 'kitchensink' failed
@junr03 I think this is related to your PR, want to take a look?
@kyessenov this is the related PR https://github.com/lyft/protoc-gen-validate/pull/78/files. How is it failing in gogo? How should I repro? I can take a look tomorrow morning.
The problem might be present for go, too. Try make kitchensink
, as in the above.
I forgot to rebuild my binary... I'll take a look at why go/gogo are different here. The templates look the same to me.
OK, resolved by updating to master. Sorry for the noise.
Current version fails to produce valid gogo code for: https://github.com/envoyproxy/data-plane-api/blob/master/envoy/config/filter/accesslog/v2/accesslog.proto#L164