Skip to content

Commit

Permalink
bzl_library target @io_bazel_rules_go//go:go_lib
Browse files Browse the repository at this point in the history
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`.
  • Loading branch information
aherrmann committed Aug 24, 2020
1 parent cbb70ea commit c3e7253
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 2 deletions.
9 changes: 9 additions & 0 deletions go/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

filegroup(
name = "all_files",
testonly = True,
Expand All @@ -21,6 +23,13 @@ filegroup(
visibility = ["//visibility:public"],
)

bzl_library(
name = "go_lib",
srcs = [":all_rules"],
deps = ["//proto:proto_lib"],
visibility = ["//visibility:public"],
)

toolchain_type(
name = "toolchain",
visibility = ["//visibility:public"],
Expand Down
9 changes: 8 additions & 1 deletion proto/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(
"//proto:compiler.bzl",
"go_proto_compiler",
Expand Down Expand Up @@ -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"],
deps = [],
visibility = ["//visibility:public"],
)

filegroup(
name = "all_files",
testonly = True,
Expand Down
1 change: 0 additions & 1 deletion proto/wkt/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,6 @@ go_proto_library(

filegroup(
name = "all_rules",
testonly = True,
srcs = glob(["*.bzl"]),
visibility = ["//visibility:public"],
)
Expand Down

0 comments on commit c3e7253

Please sign in to comment.