Skip to content

Commit 059a63f

Browse files
committed
Fix scala_deps.toolchains docs and comments
Should've been part of the previous commit, but I missed them.
1 parent a2e69e0 commit 059a63f

File tree

3 files changed

+7
-17
lines changed

3 files changed

+7
-17
lines changed

docs/scala_toolchain.md

+4-15
Original file line numberDiff line numberDiff line change
@@ -105,21 +105,10 @@ register_toolchains("//toolchains:my_scala_toolchain")
105105

106106
When using your own JARs for every `setup_scala_toolchain()` argument, while
107107
using `scala_deps` or`scala_toolchains()` to instantiate other builtin
108-
toolchains, set `scala = False`:
108+
toolchains:
109109

110-
```py
111-
# MODULE.bazel
112-
scala_deps.toolchains(
113-
scala = False,
114-
# ...other toolchain parameters...
115-
)
116-
117-
# WORKSPACE
118-
scala_toolchains(
119-
scala = False,
120-
# ...other toolchain parameters...
121-
)
122-
```
110+
- Bzlmod: Don't instantiate `scala_deps.scala()`.
111+
- `WORKSPACE`: Call `scala_toolchains(scala = False, ...)`.
123112

124113
Otherwise, `scala_deps` or `scala_toolchains()` will try to instantiate a
125114
default Scala toolchain and its compiler JAR repositories. The build will then
@@ -131,7 +120,7 @@ set `validate_scala_version = False` to disable the Scala version check.
131120

132121
```py
133122
# MODULE.bazel
134-
scala_deps.toolchains(
123+
scala_deps.settings(
135124
validate_scala_version = False,
136125
# ...other toolchain parameters...
137126
)

examples/testing/multi_frameworks_toolchain/MODULE.bazel

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ scala_deps.junit()
3434
scala_deps.scalatest()
3535
scala_deps.specs2()
3636

37-
# Under normal circumstances, the above `scala_deps.toolchains()` registration
37+
# Under normal circumstances, the above `scala_deps` tag class instantiations
3838
# would be all you need. rules_scala will set up and register the toolchains
3939
# automatically.
4040
#

scala/extensions/deps.bzl

+2-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,8 @@ _settings_attrs = {
5050
doc = (
5151
"Check if the configured Scala version matches " +
5252
"the default version supported by rules_scala. " +
53-
"Only takes effect if `scala_deps.toolchains(scala = True)`."
53+
"Only takes effect when the builtin Scala toolchain is " +
54+
"instantiated via `scala_deps.scala()`."
5455
),
5556
),
5657
}

0 commit comments

Comments
 (0)