Skip to content

Commit

Permalink
Update bzl_library targets
Browse files Browse the repository at this point in the history
With bazelbuild/bazel-gazelle#760 submitted, it
should now be possible to use stardoc to generate documentation for
rules_go and gazelle.
  • Loading branch information
achew22 committed Aug 20, 2021
1 parent 728a9e1 commit 00755a6
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions go/platform/BUILD.bazel
Expand Up @@ -36,3 +36,8 @@ bzl_library(
name = "apple",
srcs = ["apple.bzl"],
)

bzl_library(
name = "crosstool",
srcs = ["crosstool.bzl"],
)
6 changes: 6 additions & 0 deletions go/private/BUILD.bazel
Expand Up @@ -137,3 +137,9 @@ bzl_library(
"//proto:__pkg__", # keep
],
)

bzl_library(
name = "rpath",
srcs = ["rpath.bzl"],
visibility = ["//go:__subpackages__"],
)
2 changes: 2 additions & 0 deletions go/private/actions/BUILD.bazel
Expand Up @@ -75,8 +75,10 @@ bzl_library(
srcs = ["link.bzl"],
visibility = ["//go:__subpackages__"],
deps = [
"@bazel_skylib//lib:collections",
"@io_bazel_rules_go//go/private:common",
"@io_bazel_rules_go//go/private:mode",
"@io_bazel_rules_go//go/private:rpath",
],
)

Expand Down
3 changes: 2 additions & 1 deletion go/private/context.bzl
Expand Up @@ -346,7 +346,8 @@ def _infer_importpath(ctx):
def go_context(ctx, attr = None):
"""Returns an API used to build Go code.
See /go/toolchains.rst#go-context"""
See /go/toolchains.rst#go-context
"""
if not attr:
attr = ctx.attr
toolchain = ctx.toolchains["@io_bazel_rules_go//go:toolchain"]
Expand Down
1 change: 1 addition & 0 deletions go/private/repositories.bzl
Expand Up @@ -316,6 +316,7 @@ load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
bzl_library(
name = "def",
srcs = ["def.bzl"],
visibility = ["//visibility:public"],
)
"""
ctx.file("BUILD.bazel", build_content)
Expand Down
5 changes: 3 additions & 2 deletions go/private/rules/BUILD.bazel
Expand Up @@ -115,12 +115,13 @@ bzl_library(
"//go:__subpackages__",
"//proto:__pkg__",
],
# Don't list dependency on @io_bazel_rules_go_name_hack//:def
deps = [
"@io_bazel_rules_go//go/platform:crosstool",
"@io_bazel_rules_go//go/private:mode",
"@io_bazel_rules_go//go/private:platforms",
"@io_bazel_rules_go//go/private:providers",
], # keep
"@io_bazel_rules_go_name_hack//:def",
],
)

bzl_library(
Expand Down

0 comments on commit 00755a6

Please sign in to comment.