@@ -126,8 +126,8 @@ load("@rules_scala//:scala_config.bzl", "scala_config")
126
126
# scala_config(scala_version = "2.13.16")
127
127
#
128
128
# You may define your own custom toolchain using Maven artifact dependencies
129
- # configured by your `WORKSPACE` file, imported using external loader like
130
- # https://github.com/bazelbuild/rules_jvm_external.
129
+ # configured by your `WORKSPACE` file, imported using an external loader like
130
+ # https://github.com/bazelbuild/rules_jvm_external. See docs/scala_toolchain.md.
131
131
scala_config()
132
132
133
133
load(
@@ -264,20 +264,26 @@ maximum available at the time of writing.
264
264
- For the actual versions used by ` rules_scala ` , see
265
265
[ scala/deps.bzl] ( scala/deps.bzl ) .
266
266
267
- - See [ the configuration file] [ ci-config ] for the exact Bazel versions verified
268
- with the continuous-integration builds.
269
-
270
- [ ci-config ] : ./.bazelci/presubmit.yml
267
+ - See [ .bazelci/presubmit.yml] ( ./.bazelci/presubmit.yml ) for the exact Bazel
268
+ versions verified by the continuous integration builds.
271
269
272
270
| Bazel/Dependency | ` rules_scala ` 7.x |
273
271
| :-: | :-: |
274
- | Bazel versions using Bzlmod<br />(Coming soon! See bazelbuild/rules_scala #1482 .) | 7.5.0, 8.x,<br />` rolling ` , ` last_green ` |
275
- | Bazel versions using ` WORKSPACE ` | 6.5.0, 7.5.0, 8.x<br />(see the [ notes on 6.5.0 compatibility] ( #6.5.0 ) ) |
276
- | ` protobuf ` | v30.0 |
277
- | ` abseil-cpp ` | 20250127.0 |
278
- | ` rules_java ` | 8.10.0 |
272
+ | Bazel versions using Bzlmod<br />(Coming soon! See bazelbuild/rules_scala #1482 .) | 7.6.0, 8.x,<br />` rolling ` , ` last_green ` |
273
+ | Bazel versions using ` WORKSPACE ` | 6.5.0, 7.6.0, 8.x<br />(see the [ notes on 6.5.0 compatibility] ( #6.5.0 ) ) |
274
+ | ` protobuf ` | v30.1 |
275
+ | ` rules_proto ` | 7.1.0 |
276
+ | ` abseil-cpp ` | 20250127.1 |
277
+ | ` rules_java ` | 8.11.0 |
279
278
| ` ScalaPB ` | 1.0.0-alpha.1 |
280
279
280
+ The next major release will likely drop support for ` protobuf ` versions before
281
+ v29 and remove ` rules_proto ` completely. This is to comply with the guidance in
282
+ [ Protobuf News: News Announcements for Version 29.x] (
283
+ https://protobuf.dev/news/v29/ ). For more details, see this [ comment from #1710
284
+ explaining why rules_proto remains for now] (
285
+ https://github.com/bazelbuild/rules_scala/pull/1710#issuecomment-2750001012 ).
286
+
281
287
## Usage with [ bazel-deps] ( https://github.com/johnynek/bazel-deps )
282
288
283
289
Bazel-deps allows you to generate bazel dependencies transitively for maven artifacts. Generally we don't want bazel-deps to fetch
@@ -682,7 +688,7 @@ Under Bzlmod, repos are only visible to the module extension that creates them,
682
688
unless the ` MODULE.bazel ` file brings them into scope with
683
689
[ ` use_repo() ` ] ( https://bazel.build/rules/lib/globals/module#use_repo ) . This can
684
690
lead to errors like those from the following example, which [ originally called
685
- ` setup_scala_toolchain() ` under Bzlmod] (
691
+ ' setup_scala_toolchain()' under Bzlmod] (
686
692
https://github.com/michalbogacz/scala-bazel-monorepo/blob/17f0890a4345529e09b9ce83bcb2e3d15687c522/BUILD.bazel ):
687
693
688
694
``` py
@@ -756,7 +762,7 @@ bazelbuild/bazel#25198 describes how the semantics of some instances of
756
762
` $(rootpath) ` fixed them.
757
763
758
764
The good news is that replacing such instances ` $(location) ` with ` $(rootpath) `
759
- is backwards compatible to Bazel 6.5.0 and 7.5 .0. Updating them now will ensure
765
+ is backwards compatible to Bazel 6.5.0 and 7.6 .0. Updating them now will ensure
760
766
future compatibility.
761
767
762
768
### <a id =" 6.5.0 " ></a >Limited Bazel 6.5.0 compatibility
@@ -809,10 +815,52 @@ https://github.com/scalapb/ScalaPB/releases/tag/v1.0.0-alpha.1), we had to
809
815
remove the Scala 2.11 test cases.
810
816
811
817
Building ` scala_proto ` for Scala 2.11 requires [ building with Bazel 6.5.0
812
- under ` WORKSPACE ` ] ( #6.5.0 ) , with the maximum dependency versions specified in
818
+ under WORKSPACE] ( #6.5.0 ) , with the maximum dependency versions specified in
813
819
that section. While this may continue to work for some time, it is not
814
820
officially supported.
815
821
822
+ ### Removal of ` bind() ` aliases for ` twitter_scrooge ` dependencies
823
+
824
+ ` rules_scala ` 7.x removes all of the obsolete [ ` bind() ` ] [ ] aliases under
825
+ ` //external:io_bazel_rules_scala/dependency/ ` created for ` twitter_scrooge `
826
+ toolchain dependencies. If your project happens to depend on these aliases, you
827
+ can replace them with the following repository references:
828
+
829
+ | ` bind() ` alias under ` //external:io_bazel_rules_scala/dependency/ ` | Repository reference |
830
+ | :-- | :-- |
831
+ | ` scala/guava ` | ` @io_bazel_rules_scala_guava ` |
832
+ | ` thrift/javax_annotation_api ` | ` @io_bazel_rules_scala_javax_annotation_api ` |
833
+ | ` thrift/libthrift ` | ` @libthrift ` |
834
+ | ` thrift/mustache ` | ` @io_bazel_rules_scala_mustache ` |
835
+ | ` thrift/scopt ` | ` @io_bazel_rules_scala_scopt ` |
836
+ | ` thrift/scrooge_core ` | ` @io_bazel_rules_scala_scrooge_core ` |
837
+ | ` thrift/scrooge_generator ` | ` @io_bazel_rules_scala_scrooge_generator ` |
838
+ | ` thrift/util_core ` | ` @io_bazel_rules_scala_util_core ` |
839
+ | ` thrift/util_logging ` | ` @io_bazel_rules_scala_util_logging ` |
840
+
841
+ [ `bind()` ] : https://bazel.build/reference/be/workspace#bind
842
+
843
+ To access these repositories under Bzlmod, you'll need to add the following to
844
+ your ` MODULE.bazel ` file:
845
+
846
+ ``` py
847
+ scala_deps.toolchains(
848
+ twitter_scrooge = True ,
849
+ )
850
+ use_repo(
851
+ scala_deps,
852
+ " io_bazel_rules_scala_guava" ,
853
+ " io_bazel_rules_scala_javax_annotation_api" ,
854
+ " io_bazel_rules_scala_mustache" ,
855
+ " io_bazel_rules_scala_scopt" ,
856
+ " io_bazel_rules_scala_scrooge_core" ,
857
+ " io_bazel_rules_scala_scrooge_generator" ,
858
+ " io_bazel_rules_scala_util_core" ,
859
+ " io_bazel_rules_scala_util_logging" ,
860
+ " libthrift" ,
861
+ )
862
+ ```
863
+
816
864
### Bazel module compatibility levels
817
865
818
866
` rules_scala ` 7.0.0 will set the
0 commit comments