Open
Description
Description of the feature request:
Skylib's bzl_library.bzl
provides a StarlarkLibraryInfo
provider and bzl_library
rule, which are used for aggregating .bzl
rules files for use by other analysis tools.
The definition of that provider and rule are quite stable (basically unchanged since 2018), and it has no dependencies on any other part of skylib.
The natural way to use that file is to load
it from every BUILD
file in a ruleset, like this:
# rules_example/example/BUILD
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
bzl_library(
name = "bzl_srcs",
srcs = ["defs.bzl", "repository.bzl", "toolchain.bzl"],
deps = ["//example/internal:bzl_srcs"],
)
However, since the load
needs to fetch skylib before evaluation continues, this means that skylib becomes a hard dependency for every client of the ruleset.
Given that the bzl_library.bzl
file is generic, broadly useful, and very stable, could it be bundled into @bazel_tools
instead?