Skip to content

Commit

Permalink
Change all loads of bzl_library to have the absolute repository
Browse files Browse the repository at this point in the history
@bazel_skylib. This works around not having flipped the
--incompatible_remap_main_repo flag. If that gets done
we can unwind this change.

The exact problem we are working around is namespace resolution
for providers which are global. Without the main repo remapping,
we see the equivalent of '//StarlarkLibraryInfo' from within
this library, but Stardoc sees '@bazel_skylib//StarlarkLibraryInfo'.

bazelbuild/bazel#3115
bazelbuild/bazel#7130
  • Loading branch information
aiuto committed Aug 21, 2019
1 parent f130d7c commit fc3bdbe
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
2 changes: 1 addition & 1 deletion BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

licenses(["notice"]) # Apache 2.0

Expand Down
9 changes: 4 additions & 5 deletions WORKSPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
workspace(name = "bazel_skylib")

load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
http_archive(
load("@bazel_tools//tools/build_defs/repo:utils.bzl", "maybe")
maybe(
http_archive,
name = "bazel_federation",
url = "https://github.com/bazelbuild/bazel-federation/archive/130c84ec6d60f31b711400e8445a8d0d4a2b5de8.zip",
sha256 = "9d4fdf7cc533af0b50f7dd8e58bea85df3b4454b7ae00056d7090eb98e3515cc",
Expand All @@ -10,21 +12,18 @@ http_archive(
)

load("@bazel_federation//:repositories.bzl", "bazel_skylib_deps")

bazel_skylib_deps()

load("@bazel_federation//setup:bazel_skylib.bzl", "bazel_skylib_setup")

bazel_skylib_setup()


# Below this line is for documentation generation only,
# and should thus not be included by dependencies on
# bazel-skylib.

load("//:internal_deps.bzl", "bazel_skylib_internal_deps")

bazel_skylib_internal_deps()

load("//:internal_setup.bzl", "bazel_skylib_internal_setup")

bazel_skylib_internal_setup()
2 changes: 1 addition & 1 deletion lib/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

licenses(["notice"])

Expand Down
2 changes: 1 addition & 1 deletion rules/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

licenses(["notice"])

Expand Down
2 changes: 1 addition & 1 deletion rules/private/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")

licenses(["notice"])

Expand Down
2 changes: 1 addition & 1 deletion tests/BUILD
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
load("//:bzl_library.bzl", "bzl_library")
load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
load(":build_test_tests.bzl", "build_test_test_suite")
load(":collections_tests.bzl", "collections_test_suite")
load(":dicts_tests.bzl", "dicts_test_suite")
Expand Down

0 comments on commit fc3bdbe

Please sign in to comment.