From dc1a20c811303fcb75ec99e11e5a444ed97c1b4c Mon Sep 17 00:00:00 2001 From: Andreas Herrmann Date: Fri, 21 Aug 2020 18:26:44 +0200 Subject: [PATCH] bzl_library target @io_bazel_rules_go//go:go_lib As well as `@io_bazel_rules_go//proto:proto_lib` as a dependency of `@io_bazel_rules_go//go:go_lib`. This is needed to generate Stardoc documentation for rule sets that themselves depend on `rules_go`. --- go/BUILD.bazel | 9 +++++++++ proto/BUILD.bazel | 9 ++++++++- proto/wkt/BUILD.bazel | 1 - 3 files changed, 17 insertions(+), 2 deletions(-) diff --git a/go/BUILD.bazel b/go/BUILD.bazel index 278c269130..90706713f2 100644 --- a/go/BUILD.bazel +++ b/go/BUILD.bazel @@ -1,3 +1,5 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") + filegroup( name = "all_files", testonly = True, @@ -21,6 +23,13 @@ filegroup( visibility = ["//visibility:public"], ) +bzl_library( + name = "go_lib", + srcs = [":all_rules"], + visibility = ["//visibility:public"], + deps = ["//proto:proto_lib"], +) + toolchain_type( name = "toolchain", visibility = ["//visibility:public"], diff --git a/proto/BUILD.bazel b/proto/BUILD.bazel index 71be587383..4bffa8d7f6 100644 --- a/proto/BUILD.bazel +++ b/proto/BUILD.bazel @@ -1,3 +1,4 @@ +load("@bazel_skylib//:bzl_library.bzl", "bzl_library") load( "//proto:compiler.bzl", "go_proto_compiler", @@ -112,11 +113,17 @@ go_proto_compiler( filegroup( name = "all_rules", - testonly = True, srcs = glob(["*.bzl"]) + ["//proto/wkt:all_rules"], visibility = ["//:__subpackages__"], ) +bzl_library( + name = "proto_lib", + srcs = [":all_rules"], + visibility = ["//visibility:public"], + deps = [], +) + filegroup( name = "all_files", testonly = True, diff --git a/proto/wkt/BUILD.bazel b/proto/wkt/BUILD.bazel index 69605fb464..ac15848de7 100644 --- a/proto/wkt/BUILD.bazel +++ b/proto/wkt/BUILD.bazel @@ -165,7 +165,6 @@ go_proto_library( filegroup( name = "all_rules", - testonly = True, srcs = glob(["*.bzl"]), visibility = ["//visibility:public"], )