You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Adds scala_proto toolchains to `scala_toolchains()`. Part of #1482.
The most significant part of the change is moving all the toolchain
rules from `scala_proto/BUILD` to `setup_scala_toolchains()` in
`scala_proto/toolchains.bzl`.
Adds the `scala_proto_deps_providers()` macro to replace
`//scala_proto:scalapb_{compile,grpc,worker}_deps_provider` targets in
the `dep_providers` parameter of `scala_proto_deps_toolchain()`.
Examples of this are in `test/proto/custom_generator/BUILD`.
Excludes `@scala_proto_rules_scalapb_protoc_gen` from
`DEFAULT_SCALAPB_WORKER_DEPS` in `scala_proto/default/default_deps.bzl`
for Scala 2.11. For other Scala versions, this repo name will have the
Scala version appended. This is to avoid build failures under Bzlmod,
since:
- This repo is required by ScalaPB 0.11.17, but Scala 2.11 is capped at
ScalaPB 0.9.8.
- Importing the nonexistent `scala_proto_rules_scalapb_protoc_gen` under
Scala 2.11 results in an error under Bzlmod, as does importing it
multiple times when configuring multiple Scala versions.
- `MODULE.bazel` can iterate over a list of Scala versions, filtering
out Scala 2.11, and call `use_repo()` on each version specific repo.
A lot of the other changes are more opportunistic removals of
`@io_bazel_rules_scala` label prefixes and application of `Label()`
where appropriate. Doing this will allow Bzlmod users to use
`rules_scala` without setting `repo_name = "@io_bazel_rules_scala"` in
`bazel_dep()`.
0 commit comments