-
Notifications
You must be signed in to change notification settings - Fork 277
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update
{junit,specs2_junit}_toolchain()
These macros now mirror the implementation of `scalatest_toolchain()`. However, I realized that the old pattern of calling `scalatest_repositories()` followed by `scalatest_toolchain()` will no longer work without first calling `scala_toolchains(scalatest = True)`. This is because the `alias` targets in `testing/BUILD` that replace the previous implementations all point to `@io_bazel_rules_scala_toolchains`. So if we want to keep these macros, it seems like we should maybe restore the original toolchain targets in `testing/BUILD`. If we don't, we can remove these macros, but we can document these as breaking changes, and update other documentation accordingly.
- Loading branch information
Showing
3 changed files
with
14 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
load("//junit:junit.bzl", _repositories = "junit_repositories") | ||
load("//scala:scala_cross_version.bzl", "version_suffix") | ||
load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSIONS") | ||
|
||
def junit_repositories(): | ||
_repositories() | ||
|
||
def junit_toolchain(): | ||
native.register_toolchains("@io_bazel_rules_scala//testing:junit_toolchain") | ||
for scala_version in SCALA_VERSIONS: | ||
native.register_toolchains(str(Label( | ||
"//testing:junit_toolchain" + version_suffix(scala_version), | ||
))) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,12 @@ | ||
load("//scala:scala_cross_version.bzl", "version_suffix") | ||
load("//specs2:specs2_junit.bzl", _repositories = "specs2_junit_repositories") | ||
load("@io_bazel_rules_scala_config//:config.bzl", "SCALA_VERSIONS") | ||
|
||
def specs2_junit_repositories(): | ||
_repositories() | ||
|
||
def specs2_junit_toolchain(): | ||
native.register_toolchains("@io_bazel_rules_scala//testing:specs2_junit_toolchain") | ||
for scala_version in SCALA_VERSIONS: | ||
native.register_toolchains(str(Label( | ||
"//testing:specs2_junit_toolchain" + version_suffix(scala_version), | ||
))) |