Skip to content

Fix dt_patches/dt_patch_test.sh for Scala 2.13.0 #1632

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 6 additions & 4 deletions dt_patches/dt_patch_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,6 @@ test_compiler_srcjar_error() {
run_in_test_repo "bazel build //... --repo_env=SCALA_VERSION=${SCALA_VERSION} //..." "test_dt_patches_user_srcjar" 2>&1 | grep "$EXPECTED_ERROR"
}

run_test_local test_compiler_patch 2.12.1


#run_test_local test_compiler_patch 2.11.0
#run_test_local test_compiler_patch 2.11.1
#run_test_local test_compiler_patch 2.11.2
Expand Down Expand Up @@ -122,9 +119,14 @@ run_test_local test_compiler_patch 2.13.15
run_test_local test_compiler_srcjar_error 2.12.11
run_test_local test_compiler_srcjar_error 2.12.12
run_test_local test_compiler_srcjar_error 2.12.13

# These tests are semi-stateful, if two tests are run sequentially with the
# same Scala version, the DEBUG message about a canonical reproducible form
# that we grep for will only be outputted the first time (on Bazel >= 6).
# So we clean the repo first to ensure consistency.

run_in_test_repo "bazel clean --expunge" "test_dt_patches_user_srcjar"

run_test_local test_compiler_srcjar 2.12.14
run_test_local test_compiler_srcjar 2.12.15
run_test_local test_compiler_srcjar 2.12.16
Expand All @@ -136,4 +138,4 @@ run_test_local test_compiler_srcjar_nonhermetic 2.12.20
run_test_local test_compiler_srcjar_nonhermetic 2.13.11
run_test_local test_compiler_srcjar_nonhermetic 2.13.12
run_test_local test_compiler_srcjar_nonhermetic 2.13.14
run_test_local test_compiler_srcjar_nonhermetic 2.13.15
run_test_local test_compiler_srcjar_nonhermetic 2.13.15
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@ load("//scala:scala_cross_version_select.bzl", "select_for_scala_version")
filegroup(
name = "deps_tracking_reporter",
srcs = select_for_scala_version(
any_2_13_0 = ["before_2_12_13/DepsTrackingReporter.java"],
any_3 = ["scala_3/DepsTrackingReporter.java"],
before_2_12_13 = ["before_2_12_13/DepsTrackingReporter.java"],
between_2_12_13_and_2_13_12 = ["after_2_12_13_and_before_2_13_12/DepsTrackingReporter.java"],
between_2_12_13_and_2_13 = ["after_2_12_13_and_before_2_13_12/DepsTrackingReporter.java"],
between_2_13_12_and_3 = ["after_2_13_12/DepsTrackingReporter.java"],
between_2_13_1_and_2_13_12 = ["after_2_12_13_and_before_2_13_12/DepsTrackingReporter.java"],
),
visibility = ["//visibility:public"],
)
15 changes: 8 additions & 7 deletions src/java/io/bazel/rulesscala/scalac/reporter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -5,27 +5,28 @@ load("//scala:scala_cross_version_select.bzl", "select_for_scala_version")
java_library(
name = "reporter",
srcs = select_for_scala_version(
any_2_13_0 = [
"before_2_12_13/ProtoReporter.java",
],
before_2_12_13 = [
"//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter",
"before_2_12_13/ProtoReporter.java",
],
between_2_12_13_and_2_13_12 = [
"//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter",
between_2_12_13_and_2_13 = [
"after_2_12_13_and_before_2_13_12/ProtoReporter.java",
],
between_2_13_12_and_3 = [
"//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter",
"after_2_13_12/ProtoReporter.java",
],
between_2_13_1_and_2_13_12 = [
"after_2_12_13_and_before_2_13_12/ProtoReporter.java",
],
between_3_0_and_3_3 = glob(["scala_3/*.java"]) + [
"since_3_before_3_3/CompilerCompat.java",
"//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter",
],
since_3_3 = glob(["scala_3/*.java"]) + [
"since_3_3/CompilerCompat.java",
"//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter",
],
),
) + ["//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter"],
visibility = ["//visibility:public"],
deps = [
":scala_deps_java_proto",
Expand Down