Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: avoid breaking Bazel 5 users #616

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions docs/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -116,10 +116,12 @@ stardoc_with_diff_test(
bzl_library_target = "//lib:host_repo",
)

stardoc_with_diff_test(
name = "platform_utils",
bzl_library_target = "//lib:platform_utils",
)
# NB: we don't bother documenting this, because it just has three trivial functions,
# and the dependency on @local_config_platform makes the load() break for Bazel 5 users.
# stardoc_with_diff_test(
# name = "platform_utils",
# bzl_library_target = "//lib:platform_utils",
# )

stardoc_with_diff_test(
name = "stamping",
Expand Down
8 changes: 2 additions & 6 deletions lib/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ load("//lib/private:copy_common.bzl", "copy_options")
load("//lib/private:stamping.bzl", "stamp_build_setting")

# Ensure that users building their own rules can dep on our bzl_library targets for their stardoc
# This file has a dependency on @local_config_platform which is breaking for Bazel 5 users.
# gazelle:exclude platform_utils.bzl
package(default_visibility = ["//visibility:public"])

exports_files(
Expand Down Expand Up @@ -277,12 +279,6 @@ bzl_library(
],
)

bzl_library(
name = "platform_utils",
srcs = ["platform_utils.bzl"],
deps = ["//lib/private:platform_utils"],
)

bzl_library(
name = "base64",
srcs = ["base64.bzl"],
Expand Down
12 changes: 2 additions & 10 deletions lib/private/BUILD.bazel
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

# This file has a dependency on @local_config_platform which is breaking for Bazel 5 users.
# gazelle:exclude platform_utils.bzl
exports_files(
[
"diff_test_tmpl.sh",
Expand Down Expand Up @@ -250,16 +252,6 @@ bzl_library(
deps = [":repo_utils"],
)

bzl_library(
name = "platform_utils",
srcs = [
"platform_utils.bzl",
"@local_config_platform//:constraints.bzl", # keep
],
visibility = ["//lib:__subpackages__"],
deps = [], # keep
)

bzl_library(
name = "tar_toolchain",
srcs = ["tar_toolchain.bzl"],
Expand Down
Loading