Skip to content

Commit ef50aab

Browse files
fmeumcopybara-github
authored andcommitted
Mark toolchains extension as reproducible
Copybara Import from #187 Needed a manual import with a copybara fix (top-level targets for transformed repositories need special casing) BEGIN_PUBLIC Mark `toolchains` extension as reproducible (#187) This avoids an unnecessary and verbose lockfile entry for rules_java users. Uses `bazel_skylib`'s `modules.as_extension` to automatically detect the availability of the `reproducible` feature. Closes #187 END_PUBLIC PiperOrigin-RevId: 633475117 Change-Id: I05f1578e767f2148ef59a041c1b505c30976c779
1 parent 25a1131 commit ef50aab

File tree

3 files changed

+7
-6
lines changed

3 files changed

+7
-6
lines changed

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ module(
88

99
bazel_dep(name = "platforms", version = "0.0.4")
1010
bazel_dep(name = "rules_cc", version = "0.0.2")
11-
bazel_dep(name = "bazel_skylib", version = "1.2.0")
11+
bazel_dep(name = "bazel_skylib", version = "1.6.1")
1212

1313
# Required by @remote_java_tools, which is loaded via module extension.
1414
bazel_dep(name = "rules_proto", version = "4.0.0")

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,10 +4,10 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "bazel_skylib",
7-
sha256 = "af87959afe497dc8dfd4c6cb66e1279cb98ccc84284619ebfec27d9c09a903de",
7+
sha256 = "9f38886a40548c6e96c106b752f242130ee11aaa068a56ba7e56f4511f33e4f2",
88
urls = [
9-
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.2.0/bazel-skylib-1.2.0.tar.gz",
10-
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.2.0/bazel-skylib-1.2.0.tar.gz",
9+
"https://mirror.bazel.build/github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz",
10+
"https://github.com/bazelbuild/bazel-skylib/releases/download/1.6.1/bazel-skylib-1.6.1.tar.gz",
1111
],
1212
)
1313

java/extensions.bzl

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@
1313
# limitations under the License.
1414
"""Module extensions for rules_java."""
1515

16+
load("@bazel_skylib//lib:modules.bzl", "modules")
1617
load(
1718
"//java:repositories.bzl",
1819
"java_tools_repos",
@@ -23,12 +24,12 @@ load(
2324
"remote_jdk8_repos",
2425
)
2526

26-
def _toolchains_impl(_ctx):
27+
def _toolchains_impl():
2728
java_tools_repos()
2829
local_jdk_repo()
2930
remote_jdk8_repos()
3031
remote_jdk11_repos()
3132
remote_jdk17_repos()
3233
remote_jdk21_repos()
3334

34-
toolchains = module_extension(implementation = _toolchains_impl)
35+
toolchains = modules.as_extension(_toolchains_impl)

0 commit comments

Comments
 (0)