From 5f266fcb62575d45cbd78dcd6604c2c7eaed25e1 Mon Sep 17 00:00:00 2001 From: htuch Date: Tue, 16 May 2017 13:34:05 -0400 Subject: [PATCH] Add has_services annotation to api_proto_library. (#37) Also bonus fix to eds.proto, it doesn't need the address.proto import. --- api/BUILD | 5 +++++ api/eds.proto | 1 - bazel/api_build_system.bzl | 4 +++- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/api/BUILD b/api/BUILD index afb0e829..cc9772ca 100644 --- a/api/BUILD +++ b/api/BUILD @@ -31,6 +31,7 @@ api_proto_library( ":health_check", ":tls_context", ], + has_services = 1, ) api_proto_library( @@ -41,6 +42,7 @@ api_proto_library( ":base", ":health_check", ], + has_services = 1, ) api_proto_library( @@ -50,6 +52,7 @@ api_proto_library( ":base", ":health_check", ], + has_services = 1, ) api_proto_library( @@ -60,10 +63,12 @@ api_proto_library( ":base", ":tls_context", ], + has_services = 1, ) api_proto_library( name = "rds", srcs = ["rds.proto"], deps = [":base"], + has_services = 1, ) diff --git a/api/eds.proto b/api/eds.proto index 81f13dca..ed09e19d 100644 --- a/api/eds.proto +++ b/api/eds.proto @@ -2,7 +2,6 @@ syntax = "proto3"; package envoy.api.v2; -import "api/address.proto"; import "api/base.proto"; import "api/health_check.proto"; diff --git a/bazel/api_build_system.bzl b/bazel/api_build_system.bzl index 27ba121b..9517f431 100644 --- a/bazel/api_build_system.bzl +++ b/bazel/api_build_system.bzl @@ -1,6 +1,8 @@ load("@protobuf_bzl//:protobuf.bzl", "cc_proto_library") -def api_proto_library(name, srcs = [], deps = []): +# TODO(htuch): has_services is currently ignored but will in future support +# gRPC stub generation. +def api_proto_library(name, srcs = [], deps = [], has_services = 0): cc_proto_library( name = name, srcs = srcs,