Skip to content

Commit 6588c32

Browse files
committed
Update the scala_deps module extension docstring
The `scala_deps` docstring now more accurately describes the behavior implemented by `_toolchain_settings()`.
1 parent d30ddbb commit 6588c32

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

scala/extensions/deps.bzl

+7-4
Original file line numberDiff line numberDiff line change
@@ -244,23 +244,26 @@ scala_deps = module_extension(
244244
tag_classes = _tag_classes,
245245
doc = """Selects and configures builtin toolchains.
246246
247-
If the root module explicitly uses the extension, it assumes responsibility for
248-
selecting all required toolchains by insantiating the corresponding tag classes:
247+
Modules throughout the dependency graph can enable a builtin toolchain by
248+
instantiating its corresponding tag class. The root module controls the
249+
configuration of all toolchains it directly enables. Any other builtin
250+
toolchain required by other modules will use that toolchain's default
251+
configuration values.
249252
250253
```py
251254
scala_deps = use_extension(
252255
"@rules_scala//scala/extensions:deps.bzl",
253256
"scala_deps",
254257
)
255258
scala_deps.scala()
256-
scala_deps.scala_proto()
259+
scala_deps.scala_proto(default_gen_opts = ["grpc", "scala3_sources"])
257260
258261
dev_deps = use_extension(
259262
"@rules_scala//scala/extensions:deps.bzl",
260263
"scala_deps",
261264
dev_dependency = True,
262265
)
263-
dev_deps.scalafmt()
266+
dev_deps.scalafmt(default_config = "path/to/scalafmt.conf")
264267
dev_deps.scalatest()
265268
266269
# And so on...

0 commit comments

Comments
 (0)