@@ -950,8 +950,9 @@ with Bazel 6.5.0 won't work at all because [Bazel 6.5.0 doesn't support
950
950
https://github.com/bazelbuild/rules_scala/issues/1482#issuecomment-2515496234 ).
951
951
952
952
At the moment, ` WORKSPACE ` builds mostly continue to work with Bazel 6.5.0, but
953
- not out of the box, and may break at any time. You will have to choose one of
954
- the following approaches to resolve ` protobuf ` compatibility issues.
953
+ not out of the box, and may break at any time.
954
+
955
+ #### Maximum of ` protobuf ` v29
955
956
956
957
First of all, you _ must_ use ` protobuf ` v29 or earlier. ` rules_scala ` now uses
957
958
v30 by default, which removes ` py_proto_library ` and other symbols that Bazel
@@ -976,6 +977,12 @@ ERROR: .../src/java/io/bazel/rulesscala/worker/BUILD:3:13:
976
977
and referenced by '//src/java/io/bazel/rulesscala/worker:worker'
977
978
```
978
979
980
+ #### Using a prebuilt ` @com_google_protobuf//:protoc ` or C++ compiler flags
981
+
982
+ Newer versions of ` @com_google_protobuf//:protoc ` fail to compile under Bazel
983
+ 6.5.0 by default. You will have to choose one of the following approaches to
984
+ resolve this problem, if migrating to Bazel 7 or 8 isn't an immediate option.
985
+
979
986
You may use protocol compiler toolchainization with ` protobuf ` v29 to avoid
980
987
recompiling ` protoc ` . See the [ Using a precompiled protocol compiler] ( #protoc )
981
988
section for details.
@@ -999,6 +1006,8 @@ Note that this example uses `common:` config settings instead of `build:`. This
999
1006
seems to prevent invalidating the action cache between ` bazel ` runs, which
1000
1007
improves performance.
1001
1008
1009
+ #### Using older ` protobuf ` versions
1010
+
1002
1011
If you have a dependency that requires ` protobuf ` version before v28, use the
1003
1012
following maximum versions of key dependencies. Note that no ` ScalaPB ` release
1004
1013
supports ` protobuf ` v25.6, v26, or v27.
@@ -1025,6 +1034,48 @@ under `WORKSPACE`](#6.5.0), with the maximum dependency versions specified in
1025
1034
that section. While this may continue to work for some time, it is not
1026
1035
officially supported.
1027
1036
1037
+ ### Removal of ` bind() ` aliases for ` twitter_scrooge ` dependencies
1038
+
1039
+ ` rules_scala ` 7.x removes all of the obsolete [ ` bind() ` ] [ ] aliases under
1040
+ ` //external:io_bazel_rules_scala/dependency/ ` created for ` twitter_scrooge `
1041
+ toolchain dependencies. If your project happens to depend on these aliases, you
1042
+ can replace them with the following repository references:
1043
+
1044
+ | ` bind() ` alias under ` //external:io_bazel_rules_scala/dependency/ ` | Repository reference |
1045
+ | :-- | :-- |
1046
+ | ` scala/guava ` | ` @io_bazel_rules_scala_guava ` |
1047
+ | ` thrift/javax_annotation_api ` | ` @io_bazel_rules_scala_javax_annotation_api ` |
1048
+ | ` thrift/libthrift ` | ` @libthrift ` |
1049
+ | ` thrift/mustache ` | ` @io_bazel_rules_scala_mustache ` |
1050
+ | ` thrift/scopt ` | ` @io_bazel_rules_scala_scopt ` |
1051
+ | ` thrift/scrooge_core ` | ` @io_bazel_rules_scala_scrooge_core ` |
1052
+ | ` thrift/scrooge_generator ` | ` @io_bazel_rules_scala_scrooge_generator ` |
1053
+ | ` thrift/util_core ` | ` @io_bazel_rules_scala_util_core ` |
1054
+ | ` thrift/util_logging ` | ` @io_bazel_rules_scala_util_logging ` |
1055
+
1056
+ [ `bind()` ] : https://bazel.build/reference/be/workspace#bind
1057
+
1058
+ To access these repositories under Bzlmod, you'll need to add the following to
1059
+ your ` MODULE.bazel ` file:
1060
+
1061
+ ``` py
1062
+ scala_deps.toolchains(
1063
+ twitter_scrooge = True ,
1064
+ )
1065
+ use_repo(
1066
+ scala_deps,
1067
+ " io_bazel_rules_scala_guava" ,
1068
+ " io_bazel_rules_scala_javax_annotation_api" ,
1069
+ " io_bazel_rules_scala_mustache" ,
1070
+ " io_bazel_rules_scala_scopt" ,
1071
+ " io_bazel_rules_scala_scrooge_core" ,
1072
+ " io_bazel_rules_scala_scrooge_generator" ,
1073
+ " io_bazel_rules_scala_util_core" ,
1074
+ " io_bazel_rules_scala_util_logging" ,
1075
+ " libthrift" ,
1076
+ )
1077
+ ```
1078
+
1028
1079
### Bazel module compatibility levels
1029
1080
1030
1081
` rules_scala ` 7.0.0 will set the
0 commit comments