From fa6b82da161c4eb8d21c35cd26f4f386cd2208b3 Mon Sep 17 00:00:00 2001 From: Mike Bland Date: Fri, 29 Nov 2024 12:36:11 -0500 Subject: [PATCH] Begin Bazel 8 / rules_java 8 compatibility updates Moves functions out of `//scala:scala.bzl` and updates `WORKSPACE` to load `//scala:toolchains.bzl` to avoid importing macros that depend on `JavaInfo` and `java_common` during `WORKSPACE` evaluation. Based on advice from @hvadehra in #1652. Also bumps `.bazelversion` to 7.4.1 in order to upgrade `abseil-cpp` to 20240722.0 and `protobuf` to v29.0. This is instead of keeping `.bazelversion` at 6.5.0 and setting C++ compiler flags in `.bazelrc` as described in #1647. I haven't tried this under Bzlmod yet, and it still fails with the following error. Bumping to ScalaPB 1.0.0-alpha.1 in the next commit fixes this. ```txt ERROR: .../external/com_google_protobuf/src/google/protobuf/BUILD.bazel:23:14: ProtoScalaPBRule external/com_google_protobuf/src/google/protobuf/any_proto_jvm_extra_protobuf_generator_scalapb.srcjar failed: (Exit 1): scalapb_worker failed: error executing ProtoScalaPBRule command (from target @@com_google_protobuf//src/google/protobuf:any_proto) bazel-out/.../bin/src/scala/scripts/scalapb_worker ... (remaining 2 arguments skipped) --jvm_extra_protobuf_generator_out: java.lang.NoSuchMethodError: 'java.lang.Object com.google.protobuf.DescriptorProtos$FieldOptions.getExtension(com.google.protobuf.GeneratedMessage$GeneratedExtension)' at scalapb.compiler.DescriptorImplicits$ExtendedFieldDescriptor.fieldOptions(DescriptorImplicits.scala:329) at scalapb.compiler.DescriptorImplicits$ExtendedFieldDescriptor.scalaName(DescriptorImplicits.scala:207) at scalapb.compiler.ProtoValidation.validateField(ProtoValidation.scala:121) at scalapb.compiler.ProtoValidation.$anonfun$validateMessage$3(ProtoValidation.scala:56) at scalapb.compiler.ProtoValidation.$anonfun$validateMessage$3$adapted(ProtoValidation.scala:56) at scala.collection.Iterator.foreach(Iterator.scala:943) at scala.collection.Iterator.foreach$(Iterator.scala:943) at scala.collection.AbstractIterator.foreach(Iterator.scala:1431) at scala.collection.IterableLike.foreach(IterableLike.scala:74) at scala.collection.IterableLike.foreach$(IterableLike.scala:73) at scala.collection.AbstractIterable.foreach(Iterable.scala:56) at scalapb.compiler.ProtoValidation.validateMessage(ProtoValidation.scala:56) at scalapb.compiler.ProtoValidation.$anonfun$validateFile$2(ProtoValidation.scala:17) at scalapb.compiler.ProtoValidation.$anonfun$validateFile$2$adapted(ProtoValidation.scala:17) at scala.collection.Iterator.foreach(Iterator.scala:943) at scala.collection.Iterator.foreach$(Iterator.scala:943) at scala.collection.AbstractIterator.foreach(Iterator.scala:1431) at scala.collection.IterableLike.foreach(IterableLike.scala:74) at scala.collection.IterableLike.foreach$(IterableLike.scala:73) at scala.collection.AbstractIterable.foreach(Iterable.scala:56) at scalapb.compiler.ProtoValidation.validateFile(ProtoValidation.scala:17) at scalapb.compiler.ProtoValidation.$anonfun$validateFiles$1(ProtoValidation.scala:10) at scalapb.compiler.ProtoValidation.$anonfun$validateFiles$1$adapted(ProtoValidation.scala:10) at scala.collection.immutable.Stream.foreach(Stream.scala:533) at scalapb.compiler.ProtoValidation.validateFiles(ProtoValidation.scala:10) at scalarules.test.extra_protobuf_generator.ExtraProtobufGenerator$.handleCodeGeneratorRequest(ExtraProtobufGenerator.scala:86) at scalarules.test.extra_protobuf_generator.ExtraProtobufGenerator$.run(ExtraProtobufGenerator.scala:55) at protocbridge.frontend.PluginFrontend$.$anonfun$runWithBytes$1(PluginFrontend.scala:51) at scala.util.Try$.apply(Try.scala:213) at protocbridge.frontend.PluginFrontend$.runWithBytes(PluginFrontend.scala:51) at protocbridge.frontend.PluginFrontend$.runWithInputStream(PluginFrontend.scala:121) at protocbridge.frontend.PosixPluginFrontend$.$anonfun$prepare$2(PosixPluginFrontend.scala:40) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) at scala.concurrent.impl.ExecutionContextImpl$DefaultThreadFactory$$anon$1$$anon$2.block(ExecutionContextImpl.scala:75) at java.base/java.util.concurrent.ForkJoinPool.managedBlock(ForkJoinPool.java:3118) at scala.concurrent.impl.ExecutionContextImpl$DefaultThreadFactory$$anon$1.blockOn(ExecutionContextImpl.scala:87) at scala.concurrent.package$.blocking(package.scala:146) at protocbridge.frontend.PosixPluginFrontend$.$anonfun$prepare$1(PosixPluginFrontend.scala:38) at scala.runtime.java8.JFunction0$mcV$sp.apply(JFunction0$mcV$sp.java:23) at scala.concurrent.Future$.$anonfun$apply$1(Future.scala:659) at scala.util.Success.$anonfun$map$1(Try.scala:255) at scala.util.Success.map(Try.scala:213) at scala.concurrent.Future.$anonfun$map$1(Future.scala:292) at scala.concurrent.impl.Promise.$anonfun$transform$1(Promise.scala:42) at scala.concurrent.impl.CallbackRunnable.run(Promise.scala:74) at java.base/java.util.concurrent.ForkJoinTask$RunnableExecuteAction.exec(ForkJoinTask.java:1426) at java.base/java.util.concurrent.ForkJoinTask.doExec(ForkJoinTask.java:290) at java.base/java.util.concurrent.ForkJoinPool$WorkQueue.topLevelExec(ForkJoinPool.java:1020) at java.base/java.util.concurrent.ForkJoinPool.scan(ForkJoinPool.java:1656) at java.base/java.util.concurrent.ForkJoinPool.runWorker(ForkJoinPool.java:1594) at java.base/java.util.concurrent.ForkJoinWorkerThread.run(ForkJoinWorkerThread.java:183) java.lang.RuntimeException: Exit with code 1 at scala.sys.package$.error(package.scala:30) at scripts.ScalaPBWorker$.work(ScalaPBWorker.scala:44) at io.bazel.rulesscala.worker.Worker.persistentWorkerMain(Worker.java:96) at io.bazel.rulesscala.worker.Worker.workerMain(Worker.java:49) at scripts.ScalaPBWorker$.main(ScalaPBWorker.scala:39) at scripts.ScalaPBWorker.main(ScalaPBWorker.scala) ERROR: .../external/com_google_protobuf/src/google/protobuf/BUILD.bazel:23:14 Building source jar external/com_google_protobuf/src/google/protobuf/any_proto_scalapb-src.jar failed: (Exit 1): scalapb_worker failed: error executing ProtoScalaPBRule command (from target @@com_google_protobuf//src/google/protobuf:any_proto) bazel-out/darwin_arm64-opt-exec-ST-a828a81199fe/bin/src/scala/scripts/scalapb_worker ... (remaining 2 arguments skipped) ``` --- .bazelrc | 2 +- .bazelversion | 2 +- WORKSPACE | 18 +++++++++--- dt_patches/test_dt_patches/.bazelversion | 2 +- dt_patches/test_dt_patches/WORKSPACE | 12 +++++++- .../test_dt_patches_user_srcjar/.bazelversion | 2 +- .../test_dt_patches_user_srcjar/WORKSPACE | 12 +++++++- examples/crossbuild/.bazelversion | 2 +- examples/crossbuild/WORKSPACE | 18 +++++++++--- examples/scala3/.bazelversion | 2 +- examples/scala3/WORKSPACE | 18 +++++++++--- examples/semanticdb/.bazelversion | 2 +- examples/semanticdb/WORKSPACE | 18 +++++++++--- .../multi_frameworks_toolchain/.bazelversion | 2 +- .../multi_frameworks_toolchain/WORKSPACE | 18 +++++++++--- .../scalatest_repositories/.bazelversion | 2 +- .../testing/scalatest_repositories/WORKSPACE | 18 +++++++++--- .../specs2_junit_repositories/.bazelversion | 2 +- .../specs2_junit_repositories/WORKSPACE | 18 +++++++++--- scala/deps.bzl | 29 +++++++++---------- .../repo/.bazelversion | 2 +- test/semanticdb/BUILD | 1 + test_cross_build/.bazelversion | 2 +- test_cross_build/WORKSPACE | 12 +++++++- test_version/WORKSPACE.template | 18 +++++++++--- .../example_external_workspace/.bazelversion | 2 +- third_party/test/new_local_repo/.bazelversion | 2 +- third_party/test/proto/.bazelversion | 2 +- 28 files changed, 175 insertions(+), 65 deletions(-) diff --git a/.bazelrc b/.bazelrc index 498871943..a2dbc9f90 100644 --- a/.bazelrc +++ b/.bazelrc @@ -6,4 +6,4 @@ build:windows --worker_quit_after_build --enable_runfiles # Remove upon completing Bzlmod compatibility work. # - https://github.com/bazelbuild/rules_scala/issues/1482 -build --noenable_bzlmod +build --noenable_bzlmod --enable_workspace diff --git a/.bazelversion b/.bazelversion index f22d756da..815da58b7 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/WORKSPACE b/WORKSPACE index 1352ae82b..1e74387e8 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -5,10 +5,20 @@ load("//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -17,9 +27,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/dt_patches/test_dt_patches/.bazelversion b/dt_patches/test_dt_patches/.bazelversion index f22d756da..815da58b7 100644 --- a/dt_patches/test_dt_patches/.bazelversion +++ b/dt_patches/test_dt_patches/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/dt_patches/test_dt_patches/WORKSPACE b/dt_patches/test_dt_patches/WORKSPACE index e26de1338..eea22f859 100644 --- a/dt_patches/test_dt_patches/WORKSPACE +++ b/dt_patches/test_dt_patches/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") diff --git a/dt_patches/test_dt_patches_user_srcjar/.bazelversion b/dt_patches/test_dt_patches_user_srcjar/.bazelversion index f22d756da..815da58b7 100644 --- a/dt_patches/test_dt_patches_user_srcjar/.bazelversion +++ b/dt_patches/test_dt_patches_user_srcjar/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/dt_patches/test_dt_patches_user_srcjar/WORKSPACE b/dt_patches/test_dt_patches_user_srcjar/WORKSPACE index b6844af65..6c33f89c1 100644 --- a/dt_patches/test_dt_patches_user_srcjar/WORKSPACE +++ b/dt_patches/test_dt_patches_user_srcjar/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") diff --git a/examples/crossbuild/.bazelversion b/examples/crossbuild/.bazelversion index f22d756da..815da58b7 100644 --- a/examples/crossbuild/.bazelversion +++ b/examples/crossbuild/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/examples/crossbuild/WORKSPACE b/examples/crossbuild/WORKSPACE index c443add26..dbab213be 100644 --- a/examples/crossbuild/WORKSPACE +++ b/examples/crossbuild/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -23,9 +33,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/examples/scala3/.bazelversion b/examples/scala3/.bazelversion index f22d756da..815da58b7 100644 --- a/examples/scala3/.bazelversion +++ b/examples/scala3/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/examples/scala3/WORKSPACE b/examples/scala3/WORKSPACE index 0fda302af..2ab1d2a4d 100644 --- a/examples/scala3/WORKSPACE +++ b/examples/scala3/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -23,9 +33,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/examples/semanticdb/.bazelversion b/examples/semanticdb/.bazelversion index f22d756da..815da58b7 100644 --- a/examples/semanticdb/.bazelversion +++ b/examples/semanticdb/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/examples/semanticdb/WORKSPACE b/examples/semanticdb/WORKSPACE index 49f790a4f..c7c6899a8 100644 --- a/examples/semanticdb/WORKSPACE +++ b/examples/semanticdb/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -23,9 +33,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/examples/testing/multi_frameworks_toolchain/.bazelversion b/examples/testing/multi_frameworks_toolchain/.bazelversion index f22d756da..815da58b7 100644 --- a/examples/testing/multi_frameworks_toolchain/.bazelversion +++ b/examples/testing/multi_frameworks_toolchain/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/examples/testing/multi_frameworks_toolchain/WORKSPACE b/examples/testing/multi_frameworks_toolchain/WORKSPACE index 74dc143fc..3ce2bbc78 100644 --- a/examples/testing/multi_frameworks_toolchain/WORKSPACE +++ b/examples/testing/multi_frameworks_toolchain/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -23,9 +33,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/examples/testing/scalatest_repositories/.bazelversion b/examples/testing/scalatest_repositories/.bazelversion index f22d756da..815da58b7 100644 --- a/examples/testing/scalatest_repositories/.bazelversion +++ b/examples/testing/scalatest_repositories/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/examples/testing/scalatest_repositories/WORKSPACE b/examples/testing/scalatest_repositories/WORKSPACE index 89e9de3d1..22981632f 100644 --- a/examples/testing/scalatest_repositories/WORKSPACE +++ b/examples/testing/scalatest_repositories/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -23,9 +33,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/examples/testing/specs2_junit_repositories/.bazelversion b/examples/testing/specs2_junit_repositories/.bazelversion index f22d756da..815da58b7 100644 --- a/examples/testing/specs2_junit_repositories/.bazelversion +++ b/examples/testing/specs2_junit_repositories/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/examples/testing/specs2_junit_repositories/WORKSPACE b/examples/testing/specs2_junit_repositories/WORKSPACE index 72bdcb576..b5b6f6dfd 100644 --- a/examples/testing/specs2_junit_repositories/WORKSPACE +++ b/examples/testing/specs2_junit_repositories/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -23,9 +33,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/scala/deps.bzl b/scala/deps.bzl index 74f761c36..6ea31029c 100644 --- a/scala/deps.bzl +++ b/scala/deps.bzl @@ -18,41 +18,40 @@ def load_rules_dependencies(): maybe( http_archive, name = "rules_cc", - urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.0.9/rules_cc-0.0.9.tar.gz"], - sha256 = "2037875b9a4456dce4a79d112a8ae885bbc4aad968e6587dca6e64f3a0900cdf", - strip_prefix = "rules_cc-0.0.9", + urls = ["https://github.com/bazelbuild/rules_cc/releases/download/0.1.0/rules_cc-0.1.0.tar.gz"], + sha256 = "4b12149a041ddfb8306a8fd0e904e39d673552ce82e4296e96fac9cbf0780e59", + strip_prefix = "rules_cc-0.1.0", ) - # Needed by protobuf-21.7 and Bazel 6.5.0, as later versions require C++14. maybe( http_archive, name = "com_google_absl", - sha256 = "91ac87d30cc6d79f9ab974c51874a704de9c2647c40f6932597329a282217ba8", - strip_prefix = "abseil-cpp-20220623.1", - url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20220623.1.tar.gz", + sha256 = "f50e5ac311a81382da7fa75b97310e4b9006474f9560ac46f54a9967f07d4ae3", + strip_prefix = "abseil-cpp-20240722.0", + url = "https://github.com/abseil/abseil-cpp/archive/refs/tags/20240722.0.tar.gz", ) maybe( http_archive, name = "rules_java", urls = [ - "https://github.com/bazelbuild/rules_java/releases/download/7.12.2/rules_java-7.12.2.tar.gz", + "https://github.com/bazelbuild/rules_java/releases/download/8.5.1/rules_java-8.5.1.tar.gz", ], - sha256 = "a9690bc00c538246880d5c83c233e4deb83fe885f54c21bb445eb8116a180b83", + sha256 = "1389206b2208c5f33a05dd96e51715b0855c480c082b7bb4889a8e07fcff536c", ) maybe( http_archive, name = "com_google_protobuf", - sha256 = "75be42bd736f4df6d702a0e4e4d30de9ee40eac024c4b845d17ae4cc831fe4ae", - strip_prefix = "protobuf-21.7", - url = "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v21.7.tar.gz", + sha256 = "10a0d58f39a1a909e95e00e8ba0b5b1dc64d02997f741151953a2b3659f6e78c", + strip_prefix = "protobuf-29.0", + url = "https://github.com/protocolbuffers/protobuf/archive/refs/tags/v29.0.tar.gz", ) maybe( http_archive, name = "rules_proto", - sha256 = "6fb6767d1bef535310547e03247f7518b03487740c11b6c6adb7952033fe1295", - strip_prefix = "rules_proto-6.0.2", - url = "https://github.com/bazelbuild/rules_proto/releases/download/6.0.2/rules_proto-6.0.2.tar.gz", + sha256 = "0e5c64a2599a6e26c6a03d6162242d231ecc0de219534c38cb4402171def21e8", + strip_prefix = "rules_proto-7.0.2", + url = "https://github.com/bazelbuild/rules_proto/releases/download/7.0.2/rules_proto-7.0.2.tar.gz", ) diff --git a/test/proto_cross_repo_boundary/repo/.bazelversion b/test/proto_cross_repo_boundary/repo/.bazelversion index f22d756da..815da58b7 100644 --- a/test/proto_cross_repo_boundary/repo/.bazelversion +++ b/test/proto_cross_repo_boundary/repo/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/test/semanticdb/BUILD b/test/semanticdb/BUILD index b8db06e57..ecc04deab 100644 --- a/test/semanticdb/BUILD +++ b/test/semanticdb/BUILD @@ -57,5 +57,6 @@ scala_library( "*.scala", "tempsrc/*.scala", #Include src files that are dynamically generated by the test_semanticdb.sh (tmpsrc should be in .gitignore so its contents don't get checked in) ], + allow_empty = True, ), ) diff --git a/test_cross_build/.bazelversion b/test_cross_build/.bazelversion index f22d756da..815da58b7 100644 --- a/test_cross_build/.bazelversion +++ b/test_cross_build/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/test_cross_build/WORKSPACE b/test_cross_build/WORKSPACE index 143e088ea..b65aa1e8e 100644 --- a/test_cross_build/WORKSPACE +++ b/test_cross_build/WORKSPACE @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") diff --git a/test_version/WORKSPACE.template b/test_version/WORKSPACE.template index 99de6f401..0ae4a7ca1 100644 --- a/test_version/WORKSPACE.template +++ b/test_version/WORKSPACE.template @@ -11,10 +11,20 @@ load("@io_bazel_rules_scala//scala:deps.bzl", "load_rules_dependencies") load_rules_dependencies() -load("@rules_java//java:repositories.bzl", "rules_java_dependencies", "rules_java_toolchains") +load("@rules_java//java:rules_java_deps.bzl", "rules_java_dependencies") rules_java_dependencies() +# buildifier: disable=bzl-visibility +load( + "@com_google_protobuf//bazel/private:proto_bazel_features.bzl", + "proto_bazel_features", +) + +proto_bazel_features(name = "proto_bazel_features") + +load("@rules_java//java:repositories.bzl", "rules_java_toolchains") + rules_java_toolchains() load("@bazel_skylib//:workspace.bzl", "bazel_skylib_workspace") @@ -23,9 +33,9 @@ bazel_skylib_workspace() http_archive( name = "rules_python", - sha256 = "ca2671529884e3ecb5b79d6a5608c7373a82078c3553b1fa53206e6b9dddab34", - strip_prefix = "rules_python-0.38.0", - url = "https://github.com/bazelbuild/rules_python/releases/download/0.38.0/rules_python-0.38.0.tar.gz", + sha256 = "690e0141724abb568267e003c7b6d9a54925df40c275a870a4d934161dc9dd53", + strip_prefix = "rules_python-0.40.0", + url = "https://github.com/bazelbuild/rules_python/releases/download/0.40.0/rules_python-0.40.0.tar.gz", ) load("@rules_python//python:repositories.bzl", "py_repositories") diff --git a/third_party/test/example_external_workspace/.bazelversion b/third_party/test/example_external_workspace/.bazelversion index f22d756da..815da58b7 100644 --- a/third_party/test/example_external_workspace/.bazelversion +++ b/third_party/test/example_external_workspace/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/third_party/test/new_local_repo/.bazelversion b/third_party/test/new_local_repo/.bazelversion index f22d756da..815da58b7 100644 --- a/third_party/test/new_local_repo/.bazelversion +++ b/third_party/test/new_local_repo/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1 diff --git a/third_party/test/proto/.bazelversion b/third_party/test/proto/.bazelversion index f22d756da..815da58b7 100644 --- a/third_party/test/proto/.bazelversion +++ b/third_party/test/proto/.bazelversion @@ -1 +1 @@ -6.5.0 +7.4.1