Skip to content

Commit edec717

Browse files
committed
Move scala/{private/macros/,}toolchains_repo.bzl
Like "Move `scala_toolchains` to `scala/toolchains.bzl`", removes the `scala_toolchains_repo` symbol from `scala/scala.bzl` and makes it available from `scala/toolchains_repo.bzl`. This avoids a future `test_scala_version 2.12.20` failure during Bazel 8 builds after adding `twitter_scrooge` toolchain support in the new `test_version/version_specific_tests_dir/scrooge_repositories.bzl` file. Otherwise, this new file would load `toolchains_repo` from `scala/scala.bzl`. The `test_version/test_scala_version_.../WORKSPACE` file generated from `test_version/WORKSPACE.template` would then transitively load `.bzl` files with `rules_java` symbols, breaking the test. ```txt $ RULES_SCALA_TEST_ONLY="test_scala_version 2.12.20" ./test_version.sh ERROR: Traceback (most recent call last): File ".../external/rules_scala/scala/private/common_attributes.bzl", line 18, column 28, in <toplevel> "deps": attr.label_list( Error in label_list: Illegal argument: element in 'providers' is of unexpected type. Either all elements should be providers, or all elements should be lists of providers, but got list with an element of type NoneType. ERROR: Error computing the main repository mapping: at test_version/test_scala_version_.../scrooge_repositories.bzl:1:6: at .../scala/scala.bzl:30:5: at .../scala/private/rules/scala_junit_test.bzl:5:5: initialization of module 'scala/private/common_attributes.bzl' failed ```
1 parent 26f0ffb commit edec717

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

scala/scala.bzl

-5
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ load(
22
"//specs2:specs2_junit.bzl",
33
_specs2_junit_dependencies = "specs2_junit_dependencies",
44
)
5-
load(
6-
"//scala/private:macros/toolchains_repo.bzl",
7-
_scala_toolchains_repo = "scala_toolchains_repo",
8-
)
95
load(
106
"//scala/private:macros/scala_repositories.bzl",
117
_rules_scala_setup = "rules_scala_setup",
@@ -80,4 +76,3 @@ rules_scala_toolchain_deps_repositories = _rules_scala_toolchain_deps_repositori
8076
scala_test = _scala_test
8177
scala_test_suite = _scala_test_suite
8278
setup_scala_toolchain = _setup_scala_toolchain
83-
scala_toolchains_repo = _scala_toolchains_repo

scala/toolchains.bzl

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
load("//junit:junit.bzl", "junit_artifact_ids")
44
load("//scala/private:macros/scala_repositories.bzl", "scala_repositories")
5-
load("//scala/private:macros/toolchains_repo.bzl", "scala_toolchains_repo")
5+
load("//scala:toolchains_repo.bzl", "scala_toolchains_repo")
66
load("//scala:scala_cross_version.bzl", "default_maven_server_urls")
77
load("//scalatest:scalatest.bzl", "scalatest_artifact_ids")
88
load("//specs2:specs2.bzl", "specs2_artifact_ids")
File renamed without changes.

0 commit comments

Comments
 (0)