Add gogoproto marshallers to proto files in order to make use of

gogoproto.nullable compatible with GRPC downstream of ABCI and libs
protbuf types
This commit is contained in:
Silas Davis
2018-07-16 20:52:51 +01:00
parent 71859f8f3b
commit 398f3779cc
12 changed files with 8724 additions and 249 deletions

View File

@@ -36,7 +36,7 @@ protoc_abci:
## See https://stackoverflow.com/a/25518702
protoc $(INCLUDE) --gogo_out=plugins=grpc:. abci/types/*.proto
@echo "--> adding nolint declarations to protobuf generated files"
@awk '/package abci/types/ { print "//nolint: gas"; print; next }1' abci/types/types.pb.go > abci/types/types.pb.go.new
@awk '/package types/ { print "//nolint: gas"; print; next }1' abci/types/types.pb.go > abci/types/types.pb.go.new
@mv abci/types/types.pb.go.new abci/types/types.pb.go
build_abci:
@@ -112,7 +112,7 @@ protoc_libs:
## If you get the following error,
## "error while loading shared libraries: libprotobuf.so.14: cannot open shared object file: No such file or directory"
## See https://stackoverflow.com/a/25518702
protoc $(INCLUDE) --go_out=plugins=grpc:. libs/common/*.proto
protoc $(INCLUDE) --gogo_out=plugins=grpc:. libs/common/*.proto
@echo "--> adding nolint declarations to protobuf generated files"
@awk '/package common/ { print "//nolint: gas"; print; next }1' libs/common/types.pb.go > libs/common/types.pb.go.new
@mv libs/common/types.pb.go.new libs/common/types.pb.go