Skip to content

Commit 24326e3

Browse files
committed
Remove scalafmt_toolchain dep_providers default
It's likely that no one will ever rely on the default when defining their own `scalafmt_toolchain`. While investigating bazel-contrib#1675, I realized the `dep_providers` default was set to a nonexistent target. This didn't break our tests because our Scalafmt toolchains are created by `setup_scala_toolchain`, which sets `dep_providers` explicitly. I thought about aliasing the provider generated for the toolchain for `SCALA_VERSION` in `@io_bazel_rules_scala_toolchains//scalafmt`, or generating a new one. I ultimately decided to remove the default, because the `deps_providers` is literally the only attribute. Anyone defining their own `scalafmt_toolchain` will certainly define their own `deps_providers` target(s).
1 parent 970bc9d commit 24326e3

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

scala/scalafmt/toolchain/toolchain.bzl

+1-6
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,7 @@ def _scalafmt_toolchain_impl(ctx):
1414
scalafmt_toolchain = rule(
1515
_scalafmt_toolchain_impl,
1616
attrs = {
17-
"dep_providers": attr.label_list(
18-
default = [
19-
"@io_bazel_rules_scala//scala/scalafmt:scalafmt_classpath_provider",
20-
],
21-
providers = [_DepsInfo],
22-
),
17+
"dep_providers": attr.label_list(providers = [_DepsInfo]),
2318
},
2419
)
2520

0 commit comments

Comments
 (0)