Skip to content

Commit

Permalink
Upgrade Scalatest to v3.2.9. (#10576)
Browse files Browse the repository at this point in the history
* Upgrade Scalatest to v3.2.9.

Because of some coupling we also have to upgrade Scalaz to the latest
v7.2 point release, v7.2.33.

The Scalatest changes are quite involved because the JAR has been broken
up into several smaller JARs. Because Bazel expects us to specify all
dependencies and doesn't allow transitive dependencies to be used
directly, this means that we need to specify the explicit Scalatest
components that we use.

As you can imagine, this results in quite a big set of changes. They
are, however, constrained to dependency management; all the code remains
the same.

CHANGELOG_BEGIN
CHANGELOG_END

* http-json-oracle: Fix a Scalatest dependency.

* ledger-api-client: Fix a Scalatest dependency.
  • Loading branch information
SamirTalwar authored Aug 12, 2021
1 parent 41e60f7 commit 4b8b67a
Show file tree
Hide file tree
Showing 69 changed files with 3,489 additions and 1,855 deletions.
16 changes: 8 additions & 8 deletions bazel-java-deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -168,17 +168,17 @@ def install_java_deps():
"org.reactivestreams:reactive-streams-tck:1.0.2",
"org.sangria-graphql:sangria_{}:2.0.1".format(scala_major_version),
"org.sangria-graphql:sangria-spray-json_{}:1.0.2".format(scala_major_version),
"org.scalacheck:scalacheck_{}:1.14.3".format(scala_major_version),
"org.scalacheck:scalacheck_{}:1.15.4".format(scala_major_version),
"org.scala-lang.modules:scala-collection-compat_{}:2.3.2".format(scala_major_version),
"org.scala-lang.modules:scala-java8-compat_{}:0.9.0".format(scala_major_version),
"org.scalameta:munit_{}:0.7.26".format(scala_major_version),
"org.scalactic:scalactic_{}:3.1.2".format(scala_major_version),
"org.scalatest:scalatest_{}:3.1.2".format(scala_major_version),
"org.scalatestplus:scalacheck-1-14_{}:3.1.4.0".format(scala_major_version),
"org.scalatestplus:selenium-3-141_{}:3.1.3.0".format(scala_major_version),
"org.scalatestplus:testng-6-7_{}:3.1.4.0".format(scala_major_version),
"org.scalaz:scalaz-core_{}:7.2.30".format(scala_major_version),
"org.scalaz:scalaz-scalacheck-binding_{}:7.2.30-scalacheck-1.14".format(scala_major_version),
"org.scalactic:scalactic_{}:3.2.9".format(scala_major_version),
"org.scalatest:scalatest_{}:3.2.9".format(scala_major_version),
"org.scalatestplus:scalacheck-1-15_{}:3.2.9.0".format(scala_major_version),
"org.scalatestplus:selenium-3-141_{}:3.2.9.0".format(scala_major_version),
"org.scalatestplus:testng-6-7_{}:3.2.9.0".format(scala_major_version),
"org.scalaz:scalaz-core_{}:7.2.33".format(scala_major_version),
"org.scalaz:scalaz-scalacheck-binding_{}:7.2.33-scalacheck-1.15".format(scala_major_version),
"org.seleniumhq.selenium:selenium-java:3.12.0",
"org.slf4j:slf4j-api:1.7.26",
"org.slf4j:slf4j-simple:1.7.26",
Expand Down
6 changes: 5 additions & 1 deletion daml-assistant/scala-daml-project-config/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,13 @@ da_scala_test_suite(
"src/test/**/*Test.scala",
]),
scala_deps = [
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
],
deps = [
":scala-daml-project-config",
"@maven//:org_scalatest_scalatest_compatible",
],
)
10 changes: 7 additions & 3 deletions daml-lf/archive/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,11 @@ da_scala_test_suite(
],
scala_deps = [
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_flatspec",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatestplus_scalacheck_1_15",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_scalaz_scalaz_scalacheck_binding",
],
Expand All @@ -160,6 +163,7 @@ da_scala_test_suite(
"//daml-lf/transaction",
"//libs-scala/scalatest-utils",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:org_scalatest_scalatest_compatible",
],
)

Expand All @@ -171,7 +175,7 @@ da_scala_test_suite(
],
scala_deps = [
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatestplus_scalacheck_1_15",
],
scalacopts = lf_scalacopts,
deps = [
Expand Down
2 changes: 1 addition & 1 deletion daml-lf/data/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ da_scala_test(
],
scala_deps = [
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatestplus_scalacheck_1_15",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_scalaz_scalaz_scalacheck_binding",
"@maven//:org_scala_lang_modules_scala_collection_compat",
Expand Down
6 changes: 5 additions & 1 deletion daml-lf/encoder/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,10 @@ da_scala_test_suite(
srcs = glob(["src/test/scala/**/*.scala"]),
data = [":testing-dar-%s" % target for target in ENCODER_LF_VERSIONS],
scala_deps = [
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts,
Expand All @@ -61,6 +64,7 @@ da_scala_test_suite(
"//daml-lf/validation",
"//libs-scala/logging-entries",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:org_scalatest_scalatest_compatible",
],
)

Expand Down
12 changes: 10 additions & 2 deletions daml-lf/engine/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,10 @@ da_scala_test_suite(
],
scala_deps = [
"@maven//:com_storm_enroute_scalameter_core",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts,
Expand All @@ -69,6 +72,7 @@ da_scala_test_suite(
"//daml-lf/transaction-test-lib",
"//libs-scala/logging-entries",
"@maven//:com_google_protobuf_protobuf_java",
"@maven//:org_scalatest_scalatest_compatible",
],
)

Expand All @@ -87,7 +91,10 @@ da_scala_test(
max_heap_size = "2g",
scala_deps = [
"@maven//:com_storm_enroute_scalameter_core",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts,
Expand All @@ -99,5 +106,6 @@ da_scala_test(
"//daml-lf/interpreter",
"//daml-lf/language",
"//daml-lf/transaction",
"@maven//:org_scalatest_scalatest_compatible",
],
)
14 changes: 11 additions & 3 deletions daml-lf/interpreter/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,11 @@ da_scala_test_suite(
scala_deps = [
"@maven//:org_scala_lang_modules_scala_collection_compat",
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalatestplus_scalacheck_1_15",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_scalaz_scalaz_scalacheck_binding",
"@maven//:org_typelevel_paiges_core",
Expand All @@ -70,6 +73,7 @@ da_scala_test_suite(
"//daml-lf/transaction-test-lib",
"//daml-lf/validation",
"//libs-scala/logging-entries",
"@maven//:org_scalatest_scalatest_compatible",
"@maven//:org_slf4j_slf4j_api",
],
)
Expand All @@ -78,7 +82,10 @@ da_scala_test(
name = "test_bignumeric",
srcs = [bigNumericTests],
scala_deps = [
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_freespec",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalaz_scalaz_core",
],
scalacopts = lf_scalacopts,
Expand All @@ -87,6 +94,7 @@ da_scala_test(
"//daml-lf/data",
"//daml-lf/language",
"//daml-lf/parser",
"@maven//:org_scalatest_scalatest_compatible",
],
)

Expand Down
8 changes: 6 additions & 2 deletions daml-lf/kv-transaction-support/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -29,14 +29,18 @@ da_scala_test_suite(
scala_deps = [
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalatestplus_scalacheck_1_15",
],
scalacopts = lf_scalacopts,
deps = [
":kv-transaction-support",
"//daml-lf/data",
"//daml-lf/transaction",
"//daml-lf/transaction-test-lib",
"@maven//:org_scalatest_scalatest_compatible",
],
)
2 changes: 1 addition & 1 deletion daml-lf/parser/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ da_scala_test(
srcs = glob(["src/test/**/*.scala"]),
scala_deps = [
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatestplus_scalacheck_1_15",
],
scalacopts = lf_scalacopts,
visibility = [
Expand Down
2 changes: 1 addition & 1 deletion daml-lf/transaction/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ da_scala_test(
scala_deps = [
"@maven//:com_chuusai_shapeless",
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatestplus_scalacheck_1_15",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_scalaz_scalaz_scalacheck_binding",
"@maven//:org_scala_lang_modules_scala_collection_compat",
Expand Down
6 changes: 5 additions & 1 deletion daml-script/export/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,10 @@ da_scala_test(
"//ledger/test-common/test-certificates",
],
scala_deps = [
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_freespec",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_typelevel_paiges_core",
],
visibility = ["//visibility:public"],
Expand All @@ -79,5 +82,6 @@ da_scala_test(
"//language-support/scala/bindings",
"//ledger/ledger-api-common",
"//libs-scala/auth-utils",
"@maven//:org_scalatest_scalatest_compatible",
],
)
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,10 @@ da_scala_library(
"@maven//:com_typesafe_akka_akka_stream",
"@maven//:io_spray_spray_json",
"@maven//:org_scalactic_scalactic",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_freespec",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalaz_scalaz_core",
],
deps = [
Expand Down Expand Up @@ -48,6 +51,7 @@ da_scala_library(
"//libs-scala/ports",
"@maven//:io_grpc_grpc_api",
"@maven//:io_netty_netty_handler",
"@maven//:org_scalatest_scalatest_compatible",
],
)

Expand All @@ -58,7 +62,10 @@ da_scala_test_suite(
"@maven//:com_typesafe_akka_akka_actor",
"@maven//:com_typesafe_akka_akka_stream",
"@maven//:io_spray_spray_json",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_freespec",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalaz_scalaz_core",
],
deps = [
Expand Down Expand Up @@ -88,5 +95,6 @@ da_scala_test_suite(
"//libs-scala/resources",
"@maven//:io_grpc_grpc_api",
"@maven//:io_netty_netty_handler",
"@maven//:org_scalatest_scalatest_compatible",
],
)
6 changes: 5 additions & 1 deletion daml-script/export/transaction-eq/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -26,11 +26,15 @@ da_scala_test(
name = "tests",
srcs = glob(["src/test/scala/**/*.scala"]),
scala_deps = [
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_freespec",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
],
visibility = ["//visibility:public"],
deps = [
":transaction-eq",
"//language-support/scala/bindings",
"@maven//:org_scalatest_scalatest_compatible",
],
)
6 changes: 5 additions & 1 deletion daml-script/test/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,10 @@ da_scala_library(
"@maven//:com_typesafe_akka_akka_stream",
"@maven//:io_spray_spray_json",
"@maven//:org_scalactic_scalactic",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalaz_scalaz_core",
],
deps = [
Expand Down Expand Up @@ -149,6 +152,7 @@ da_scala_library(
"//libs-scala/ports",
"//libs-scala/resources",
"@maven//:com_auth0_java_jwt",
"@maven//:org_scalatest_scalatest_compatible",
],
)

Expand Down
13 changes: 10 additions & 3 deletions extractor/BUILD.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,9 @@ da_scala_library(
"@maven//:io_circe_circe_parser",
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalactic_scalactic",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_tpolecat_doobie_core",
"@maven//:org_tpolecat_doobie_free",
Expand Down Expand Up @@ -198,6 +200,7 @@ da_scala_library(
"//libs-scala/postgresql-testing",
"@maven//:io_netty_netty_handler",
"@maven//:org_postgresql_postgresql",
"@maven//:org_scalatest_scalatest_compatible",
"@maven//:org_slf4j_slf4j_api",
],
)
Expand Down Expand Up @@ -229,8 +232,11 @@ da_scala_test_suite(
"@maven//:io_circe_circe_parser",
"@maven//:org_scalacheck_scalacheck",
"@maven//:org_scalactic_scalactic",
"@maven//:org_scalatest_scalatest",
"@maven//:org_scalatestplus_scalacheck_1_14",
"@maven//:org_scalatest_scalatest_core",
"@maven//:org_scalatest_scalatest_matchers_core",
"@maven//:org_scalatest_scalatest_shouldmatchers",
"@maven//:org_scalatest_scalatest_wordspec",
"@maven//:org_scalatestplus_scalacheck_1_15",
"@maven//:org_scalaz_scalaz_core",
"@maven//:org_scalaz_scalaz_scalacheck_binding",
"@maven//:org_tpolecat_doobie_core",
Expand Down Expand Up @@ -279,6 +285,7 @@ da_scala_test_suite(
"//libs-scala/timer-utils",
"@maven//:ch_qos_logback_logback_classic",
"@maven//:io_netty_netty_handler",
"@maven//:org_scalatest_scalatest_compatible",
"@maven//:org_slf4j_slf4j_api",
],
)
Expand Down
Loading

0 comments on commit 4b8b67a

Please sign in to comment.