Skip to content

Commit

Permalink
docs: //pkg:bzl_srcs update deps.
Browse files Browse the repository at this point in the history
This change updates deps for //pkg:bzl_srcs to include paths and
rules_python, which comes from the individual rules.

This bzl_library is next to the .bzl files. Users of rules_pkg may build
stardoc for their own extensions by relying on this bzl_library
directly.

This change deletes the unnecessary starlark_library rule, because
starlark_library itself already creates the non-dev dependency from
rules_pkg to skylib. A user of rules_pkg will have to have skylib
anyways. So let's just use skylib's bzl_library directly. It is okay
to put non .bzl files in bzl_library.

Test: locally update latest.md, no significant difference other than
  small changes due to the file being outdated in the first place.
Link: #897
  • Loading branch information
HONG Yifan committed Dec 12, 2024
1 parent 5c6aec6 commit a6a12e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 39 deletions.
3 changes: 2 additions & 1 deletion doc_build/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -116,8 +116,9 @@ bzl_library(
name = "rules_pkg_lib",
srcs = [
"//:version.bzl",
],
deps = [
"//pkg:bzl_srcs",
"@bazel_skylib//lib:paths",
],
visibility = ["//visibility:public"],
)
Expand Down
9 changes: 6 additions & 3 deletions pkg/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.

load("@rules_pkg//pkg/private:make_starlark_library.bzl", "starlark_library")

# -*- coding: utf-8 -*-
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load("@rules_python//python:defs.bzl", "py_binary", "py_library")

package(default_applicable_licenses = ["//:license"])
Expand Down Expand Up @@ -51,7 +50,7 @@ filegroup(
],
)

starlark_library(
bzl_library(
name = "bzl_srcs",
srcs = [
":standard_package",
Expand All @@ -62,6 +61,10 @@ starlark_library(
"//pkg/private/zip:standard_package",
"//pkg/releasing:standard_package",
],
deps = [
"@rules_python//python:defs_bzl",
"@bazel_skylib//lib:paths",
],
visibility = ["//visibility:public"],
)

Expand Down
35 changes: 0 additions & 35 deletions pkg/private/make_starlark_library.bzl

This file was deleted.

0 comments on commit a6a12e9

Please sign in to comment.