fix GRPC_GATEWAY() for non-GO submodules
@@ -558,11 +558,7 @@ macro GRPC() {
### Now just alias to usual GRPC() macro.
macro GRPC_GATEWAY() {
GRPC()
- # FIXME(snermolaev): uncomment the code below when vendor/github.com/gogo/googleapis/google
- # are switched to PROTO_LIBRARY
- # SET_APPEND(PROTO_PATH -I=vendor -I=vendor/github.com/gogo/googleapis)
- # PEERDIR(vendor/github.com/gogo/googleapis/google/api)
- # PEERDIR(vendor/github.com/gogo/googleapis/google/rpc)
+ SET_APPEND(PROTO_PATH -I=contrib/libs/googleapis-common-protos)
}
# variables must be defined for all module types to make generate_mf.py work
@@ -4959,37 +4955,28 @@ macro CGO_LDFLAGS(FLAGS...) {
GO_TOOLCHAIN_ENV=$TOOLCHAIN_ENV
+_GO_GRPC_WELLKNOWN=\
+ vendor/google.golang.org/grpc \
+ vendor/google.golang.org/grpc \
+ vendor/google.golang.org/grpc/codes \
+ vendor/google.golang.org/grpc/grpclog \
+ vendor/google.golang.org/grpc/status
+
macro _GO_GRPC() {
SET(GO_PROTO_GEN_PLUGINS grpc)
- PEERDIR(${GOSTD}/context vendor/google.golang.org/grpc)
+ PEERDIR(${GOSTD}/context ${_GO_GRPC_WELLKNOWN})
}
-_GO_GRPC_GATEWAY_PACKAGE_MAP=\
- google/api/annotations.proto=github.com/gogo/googleapis/google/api \
- google/api/http.proto=github.com/gogo/googleapis/google/api \
- google/rpc/code.proto=github.com/gogo/googleapis/google/rpc \
- google/rpc/error_details.proto=github.com/gogo/googleapis/google/rpc \
- google/rpc/status.proto=github.com/gogo/googleapis/google/rpc
-
macro _GO_GRPC_GATEWAY() {
_GO_GRPC()
SET_APPEND(GO_PROTO_OPTS $_PROTO_PLUGIN_ARGS_BASE(go_grpc_gw vendor/github.com/grpc-ecosystem/grpc-gateway/protoc-gen-grpc-gateway))
SET_APPEND(GO_PROTO_OUTS \${output;hide;noauto;norel;nopath;noext;suf=.pb.gw.go:File})
- SET_APPEND(PROTO_PATH -I vendor/github.com/gogo/googleapis -I vendor)
- SET_APPEND(GO_PROTO_PACKAGE_MAP ${_GO_GRPC_GATEWAY_PACKAGE_MAP})
+ SET_APPEND(PROTO_PATH -I contrib/libs/googleapis-common-protos)
PEERDIR(${GOSTD}/context ${GOSTD}/io ${GOSTD}/net/http)
PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/runtime)
PEERDIR(vendor/github.com/grpc-ecosystem/grpc-gateway/utilities)
- PEERDIR(vendor/google.golang.org/grpc)
- PEERDIR(vendor/google.golang.org/grpc/codes)
- PEERDIR(vendor/google.golang.org/grpc/grpclog)
- PEERDIR(vendor/google.golang.org/grpc/status)
- PEERDIR(vendor/github.com/gogo/protobuf/gogoproto)
- PEERDIR(vendor/github.com/gogo/googleapis/google/api)
-
- ADDINCL(vendor/github.com/gogo/googleapis vendor)
}
### @usage _GO_BASE_UNIT # internal
