@@ -166,7 +166,12 @@ v6.x:
166
166
167
167
- __ ` rules_scala ` no longer requires the ` io_bazel_rules_scala ` repository
168
168
name__ unless your ` BUILD ` files or those of your dependencies require it
169
- (bazelbuild/rules_scala #1696 ).
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.)
170
175
171
176
- __ ` rules_scala ` v7.0.0 introduces a new ` scala_toolchains() ` API that is
172
177
very different from ` rules_scala ` 6__ . For details on what's changed, see
@@ -237,6 +242,7 @@ which also requires that the patch be a regular file in your own repo. In other
237
242
words, neither ` @rules_scala//protoc:0001-protobuf-19679-rm-protoc-dep.patch `
238
243
nor an [ ` alias ` ] [ ] to it will work.
239
244
245
+ [ `single_version_override` ] : https://bazel.build/rules/lib/globals/module#single_version_override
240
246
[ `alias` ] : https://bazel.build/reference/be/general#alias
241
247
242
248
Assuming you've copied the patch to a file called ` protobuf.patch ` in the root
@@ -667,7 +673,7 @@ register_toolchains(
667
673
)
668
674
```
669
675
670
- ### ` @io_bazel_rules_scala_config ` is now ` @rules_scala_config `
676
+ ### < a id = " map " ></ a > ` @io_bazel_rules_scala_config ` is now ` @rules_scala_config `
671
677
672
678
Since ` @io_bazel_rules_scala ` is no longer hardcoded in ` rules_scala ` internals,
673
679
we've shortened ` @io_bazel_rules_scala_config ` to ` @rules_scala_config ` . This
@@ -676,7 +682,16 @@ shouldn't affect most users, but it may break some builds using
676
682
./docs/cross-compilation.md).
677
683
678
684
If you can't fix uses of ` @io_bazel_rules_scala_config ` in your own project
679
- immediately, you can remap ` @rules_scala_config ` via [ ` use_repo() ` ] :
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.
690
+
691
+ #### Bzlmod
692
+
693
+ You can remap ` @rules_scala_config ` via [ ` use_repo() ` ] if you need it in your
694
+ own project:
680
695
681
696
[ `use_repo()` ] : https://bazel.build/rules/lib/globals/module#use_repo
682
697
@@ -689,11 +704,6 @@ scala_config = use_extension(
689
704
use_repo(scala_config, io_bazel_rules_scala_config = " rules_scala_config" )
690
705
```
691
706
692
- If any of your dependencies still require ` @io_bazel_rules_scala_config ` , use
693
- one of the following mechanisms to override it with ` @rules_scala_config ` :
694
-
695
- #### Bzlmod
696
-
697
707
For [ ` bazel_dep() ` ] [ ] dependencies, use [ ` override_repo() ` ] [ ] to
698
708
override ` @io_bazel_rules_scala_config ` with ` @rules_scala_config ` :
699
709
0 commit comments