Skip to content

Commit

Permalink
Add bzl_libraries (#8)
Browse files Browse the repository at this point in the history
Needed to generate documentation for build encyclopedia. There are links
in Bazel docs to sh rules and the generator complains if the Sh rules
docs are removed / break those links.

---------

Co-authored-by: Fabian Meumertzheim <[email protected]>
  • Loading branch information
comius and fmeum authored Oct 8, 2024
1 parent bfdfa00 commit 6cb835e
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 0 deletions.
1 change: 1 addition & 0 deletions MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ module(
)

bazel_dep(name = "platforms", version = "0.0.10")
bazel_dep(name = "bazel_skylib", version = "1.6.1")

sh_configure = use_extension("//shell/private/extensions:sh_configure.bzl", "sh_configure")
use_repo(sh_configure, "local_config_shell")
Expand Down
14 changes: 14 additions & 0 deletions shell/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,21 @@
# Bazel's sh_* rules.
#
# Toolchains registered for this type should have target constraints.

load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

toolchain_type(
name = "toolchain_type",
visibility = ["//visibility:public"],
)

bzl_library(
name = "rules_bzl",
srcs = [
"sh_binary.bzl",
"sh_library.bzl",
"sh_test.bzl",
],
visibility = ["//visibility:public"],
deps = ["//shell/private:private_bzl"],
)
7 changes: 7 additions & 0 deletions shell/private/BUILD
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

bzl_library(
name = "private_bzl",
srcs = ["sh_executable.bzl"],
visibility = ["//shell:__pkg__"],
)

0 comments on commit 6cb835e

Please sign in to comment.