Skip to content

Commit d71f990

Browse files
committed
More README.md updates for 7.x and Bzlmod
Fine tuning of some language and formatting. Also includes `rolling` and `last_green` in the "Compatible Bazel versions" table.
1 parent 398ee0e commit d71f990

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

+22-22
Original file line numberDiff line numberDiff line change
@@ -166,12 +166,13 @@ v6.x:
166166

167167
- __`rules_scala` no longer requires the `io_bazel_rules_scala` repository
168168
name__ unless your `BUILD` files or those of your dependencies require it
169-
(bazelbuild/rules_scala#1696). You can use the `repo_mapping` attribute of
170-
`http_archive`, or equivalent Bzlmod mechanisms, to translate `@rules_scala`
171-
to `@io_bazel_rules_scala` for dependencies. The
172-
['@io_bazel_rules_scala_config' is now '@rules_scala_config'](#map) section
173-
below describes these options in detail. (That section is about
174-
`@rules_scala_config`, but the same mechanisms apply.)
169+
(bazelbuild/rules_scala#1696).
170+
171+
You can use the `repo_mapping` attribute of `http_archive` or equivalent
172+
Bzlmod mechanisms to translate `@rules_scala` to `@io_bazel_rules_scala`
173+
for dependencies. See the ['@io_bazel_rules_scala_config' is now
174+
'@rules_scala_config'](#map) section below for details. (That section is
175+
about `@rules_scala_config`, but the same mechanisms apply.)
175176

176177
- __`rules_scala` v7.0.0 introduces a new `scala_toolchains()` API that is
177178
very different from `rules_scala` 6__. For details on what's changed, see
@@ -384,7 +385,7 @@ maximum available at the time of writing.
384385

385386
| Bazel/Dependency | `rules_scala` 7.x |
386387
| :-: | :-: |
387-
| Bazel versions using Bzlmod<br/>(Coming soon! See bazelbuild/rules_scala#1482.) | 7.5.0, 8.x |
388+
| Bazel versions using Bzlmod<br/>(Coming soon! See bazelbuild/rules_scala#1482.) | 7.5.0, 8.x,<br/>`rolling`, `last_green` |
388389
| Bazel versions using `WORKSPACE` | 6.5.0, 7.5.0, 8.x<br/>(see the [notes on 6.5.0 compatibility](#6.5.0)) |
389390
| `protobuf` | v29.3 |
390391
| `abseil-cpp` | 20250127.0 |
@@ -574,7 +575,8 @@ load(
574575
"scala_toolchains",
575576
)
576577

577-
# Note that `rules_scala` toolchain repos are _always_ configured.
578+
# The `scala_version` toolchain repos used by `scala_library` and `scala_binary`
579+
# are _always_ configured, but all others are optional.
578580
scala_toolchains(
579581
scalafmt = True,
580582
scalatest = True,
@@ -590,9 +592,9 @@ examples.
590592

591593
### Replacing toolchain registration macros in `WORKSPACE`
592594

593-
Almost all `rules_scala` toolchains are automatically configured and registered by
594-
`scala_toolchains()` and `scala_register_toolchains()`. There are two toolchain
595-
macro replacements that require special handling.
595+
Almost all `rules_scala` toolchains configured using `scala_toolchains()` are
596+
automatically registered by `scala_register_toolchains()`. There are two
597+
toolchain macro replacements that require special handling.
596598

597599
The first is replacing `scala_proto_register_enable_all_options_toolchain()`
598600
with the following `scala_toolchains()` parameters:
@@ -681,12 +683,10 @@ shouldn't affect most users, but it may break some builds using
681683
`@io_bazel_rules_scala_config` to define custom [cross-compilation targets](
682684
./docs/cross-compilation.md).
683685

684-
If you can't fix uses of `@io_bazel_rules_scala_config` in your own project
685-
immediately, or have dependencies that need it, there are options.
686-
Use one of the following mechanisms to override it with `@rules_scala_config`.
687-
688-
The same mechanisms also apply if you need to translate `@rules_scala` to
689-
`@io_bazel_rules_scala` for your dependencies.
686+
If you can't update `@io_bazel_rules_scala_config` references in your own
687+
project immediately, or have dependencies that require it, use the workarounds
688+
below. (The same workarounds also apply if you need to translate `@rules_scala`
689+
to `@io_bazel_rules_scala`.)
690690

691691
#### Bzlmod
692692

@@ -766,8 +766,8 @@ supporting Bazel + MSVC builds per:
766766
- [protocolbuffers/protobuf#20085: Breaking Change: Dropping support for
767767
Bazel+MSVC](https://github.com/protocolbuffers/protobuf/issues/20085)
768768

769-
Enable [protocol compiler toolchainization](#protoc) to fix broken Windows
770-
builds by avoiding `@com_google_protobuf//:protoc` recompilation.
769+
To fix this problem, enable [protocol compiler toolchainization](#protoc) to
770+
avoid `@com_google_protobuf//:protoc` recompilation.
771771

772772
### Embedded resource paths no longer begin with `external/<repo_name>`
773773

@@ -838,9 +838,9 @@ ERROR: no such package
838838
```
839839

840840
In this case, where the toolchain only sets different compiler options, the best
841-
fix is to [use `scala_toolchain` directly instead][scala_tc_direct]. Its
842-
underlying `BUILD` rule uses builtin toolchain dependencies via existing targets
843-
visible within `rules_scala`, without forcing users to import them:
841+
fix is to [use the 'scala_toolchain' rule directly instead][scala_tc_direct].
842+
Its underlying `BUILD` rule uses builtin toolchain dependencies via existing
843+
targets visible within `rules_scala`, without forcing users to import them:
844844

845845
[scala_tc_direct]: https://github.com/michalbogacz/scala-bazel-monorepo/blob/2cac860f386dcaa1c3be56cd25a84b247d335743/BUILD.bazel
846846

0 commit comments

Comments
 (0)