Skip to content

Commit

Permalink
Upgrade to Scala 2.12.14 and 2.13.6. (#10573)
Browse files Browse the repository at this point in the history
* Upgrade to Scala 2.12.14.

* Upgrade Scala to 2.13.6.

CHANGELOG_BEGIN
CHANGELOG_END

* compability: Re-pin the Maven dependencies.
  • Loading branch information
SamirTalwar authored Aug 12, 2021
1 parent c447898 commit 41e60f7
Show file tree
Hide file tree
Showing 15 changed files with 3,164 additions and 3,155 deletions.
8 changes: 4 additions & 4 deletions .bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ build:darwin --repository_cache=.bazel-cache/repo
fetch:darwin --repository_cache=.bazel-cache/repo
sync:darwin --repository_cache=.bazel-cache/repo

build:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
fetch:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
query:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
sync:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
build:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14
fetch:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14
query:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14
sync:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14

test:oracle --repo_env DAML_ORACLE_TESTING=true --test_env ORACLE_USERNAME --test_env ORACLE_PORT --test_env ORACLE_PWD

Expand Down
2 changes: 1 addition & 1 deletion BAZEL-JVM.md
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ First, you need to modify the `artifacts` attribute to
also run `@unpinned_maven//:pin` if you change other attributes to
`maven_install`. You need to run this once per Scala version with the
default being 2.13 so run it again for 2.12:
``DAML_SCALA_VERSION=2.12.13 bazel run @unpinned_maven//:pin``.
``DAML_SCALA_VERSION=2.12.14 bazel run @unpinned_maven//:pin``.

Refer to the [`rules_jvm_external` documentation][rules_jvm_external] for
further information.
Expand Down
2 changes: 1 addition & 1 deletion BAZEL.md
Original file line number Diff line number Diff line change
Expand Up @@ -1013,7 +1013,7 @@ resolution and import the required artifacts into the Bazel build.
The resolved versions are pinned in the file `maven_install.json`. Execute
`bazel run @unpinned_maven//:pin` when you wish to update or add a new
dependency. You also need to run this a second time to update the deps for 2.12
`DAML_SCALA_VERSION=2.12.13 bazel run @unpinned_maven//:pin`.
`DAML_SCALA_VERSION=2.12.14 bazel run @unpinned_maven//:pin`.
See [`rules_jvm_external`][rules_jvm_external] for details.
[rules_jvm_external]: https://github.com/bazelbuild/rules_jvm_external#updating-maven_installjson
Expand Down
8 changes: 4 additions & 4 deletions bazel-java-deps.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# SPDX-License-Identifier: Apache-2.0

# When adding, removing or changing a dependency in this file, update the pinned dependencies by executing
# $ bazel run @unpinned_maven//:pin && DAML_SCALA_VERSION=2.12.13 bazel run @unpinned_maven//:pin
# $ bazel run @unpinned_maven//:pin && DAML_SCALA_VERSION=2.12.14 bazel run @unpinned_maven//:pin
# See https://github.com/bazelbuild/rules_jvm_external#updating-maven_installjson

load("@rules_jvm_external//:defs.bzl", "maven_install")
Expand Down Expand Up @@ -48,7 +48,7 @@ def install_java_deps():
"com.auth0:jwks-rsa:0.11.0",
"com.chuusai:shapeless_{}:2.3.3".format(scala_major_version),
"com.github.ben-manes.caffeine:caffeine:2.8.0",
"com.github.ghik:silencer-plugin_{}:1.7.3".format(scala_version),
"com.github.ghik:silencer-plugin_{}:1.7.5".format(scala_version),
"com.github.pureconfig:pureconfig_{}:0.14.0".format(scala_major_version),
"com.github.pureconfig:pureconfig-core_{}:0.14.0".format(scala_major_version),
"com.github.pureconfig:pureconfig-generic_{}:0.14.0".format(scala_major_version),
Expand Down Expand Up @@ -182,12 +182,12 @@ def install_java_deps():
"org.seleniumhq.selenium:selenium-java:3.12.0",
"org.slf4j:slf4j-api:1.7.26",
"org.slf4j:slf4j-simple:1.7.26",
"org.typelevel:kind-projector_{}:0.11.3".format(scala_version),
"org.typelevel:kind-projector_{}:0.13.0".format(scala_version),
"org.tpolecat:doobie-core_{}:0.13.4".format(scala_major_version),
"org.tpolecat:doobie-hikari_{}:0.13.4".format(scala_major_version),
"org.tpolecat:doobie-postgres_{}:0.13.4".format(scala_major_version),
"org.typelevel:paiges-core_{}:0.3.2".format(scala_major_version),
"org.wartremover:wartremover_{}:2.4.13".format(scala_version),
"org.wartremover:wartremover_{}:2.4.16".format(scala_version),
"org.xerial:sqlite-jdbc:3.36.0.1",
"com.fasterxml.jackson.core:jackson-core:2.12.0",
"com.fasterxml.jackson.core:jackson-databind:2.12.0",
Expand Down
37 changes: 19 additions & 18 deletions bazel_tools/scala_version.bzl
Original file line number Diff line number Diff line change
@@ -1,36 +1,37 @@
# Copyright (c) 2021 Digital Asset (Switzerland) GmbH and/or its affiliates. All rights reserved.
# SPDX-License-Identifier: Apache-2.0

# Keep in sync with /nix/nixpkgs.nix and /release/src/Main.hs
default_scala_version = "2.13.5"
# Keep the Scala versions in sync with /nix/nixpkgs.nix and /release/src/Options.hs.

default_scala_version = "2.13.6"

scala_artifacts = {
"2.12.13": {
"2.12.14": {
"io_bazel_rules_scala_scala_compiler": {
"artifact": "org.scala-lang:scala-compiler:2.12.13",
"sha256": "ea971e004e2f15d3b7569eee8b559f220e23b9993e688bbe986f97938d1dc9f9",
"artifact": "org.scala-lang:scala-compiler:2.12.14",
"sha256": "2a1b3fbf9c956073c8c5374098a6f987e3b8d76e34756ab985fc7d2ca37ee113",
},
"io_bazel_rules_scala_scala_library": {
"artifact": "org.scala-lang:scala-library:2.12.13",
"sha256": "1bb415cff43f792636556a1137b213b192ab0246be003680a3b006d01235dd89",
"artifact": "org.scala-lang:scala-library:2.12.14",
"sha256": "0451dce8322903a6c2aa7d31232b54daa72a61ced8ade0b4c5022442a3f6cb57",
},
"io_bazel_rules_scala_scala_reflect": {
"artifact": "org.scala-lang:scala-reflect:2.12.13",
"sha256": "2bd46318d87945e72eb186a7b5ea496c43cf8f0aabc6ff11b3e7962f8635e669",
"artifact": "org.scala-lang:scala-reflect:2.12.14",
"sha256": "497f4603e9d19dc4fa591cd467de5e32238d240bbd955d3dac6390b270889522",
},
},
"2.13.5": {
"io_bazel_rules_scala_scala_library": {
"artifact": "org.scala-lang:scala-library:2.13.5",
"sha256": "52aafeef8e0d104433329b1bc31463d1b4a9e2b8f24f85432c8cfaed9fad2587",
},
"2.13.6": {
"io_bazel_rules_scala_scala_compiler": {
"artifact": "org.scala-lang:scala-compiler:2.13.5",
"sha256": "ea7423f3bc3673845d6d1c64335a4645abba0b0478ae00e15979915826ff6116",
"artifact": "org.scala-lang:scala-compiler:2.13.6",
"sha256": "310d263d622a3d016913e94ee00b119d270573a5ceaa6b21312d69637fd9eec1",
},
"io_bazel_rules_scala_scala_library": {
"artifact": "org.scala-lang:scala-library:2.13.6",
"sha256": "f19ed732e150d3537794fd3fe42ee18470a3f707efd499ecd05a99e727ff6c8a",
},
"io_bazel_rules_scala_scala_reflect": {
"artifact": "org.scala-lang:scala-reflect:2.13.5",
"sha256": "808c44b8adb3205e91d417bf57406715ca2508ad6952f6e2132ff8099b78bd73",
"artifact": "org.scala-lang:scala-reflect:2.13.6",
"sha256": "f713593809b387c60935bb9a940dfcea53bd0dbf8fdc8d10739a2896f8ac56fa",
},
},
}
Expand Down
2 changes: 1 addition & 1 deletion ci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ jobs:
release_tag: $(release_tag)
name: 'linux-scala-2.12'
is_release: variables.is_release
scala_version: "2.12.13"
scala_version: "2.12.14"
- template: upload-bazel-metrics.yml
- template: tell-slack-failed.yml
parameters:
Expand Down
8 changes: 4 additions & 4 deletions compatibility/.bazelrc
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,10 @@ build:darwin --repository_cache=.bazel-cache/repo
fetch:darwin --repository_cache=.bazel-cache/repo
sync:darwin --repository_cache=.bazel-cache/repo

build:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
fetch:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
query:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
sync:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.13
build:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14
fetch:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14
query:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14
sync:scala_2_12 --repo_env=DAML_SCALA_VERSION=2.12.14

test:oracle --repo_env DAML_ORACLE_TESTING=true --test_env ORACLE_USERNAME --test_env ORACLE_PORT --test_env ORACLE_PWD

Expand Down
9 changes: 5 additions & 4 deletions compatibility/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -302,6 +302,8 @@ load("@rules_jvm_external//:defs.bzl", "maven_install")

grpc_version = "1.35.0"

load("@scala_version//:index.bzl", "scala_artifacts", "scala_major_version", "scala_version")

# We base our Maven artifacts on the latest stable release
# for now. In principle, we could setup one Maven workspace
# per SDK version but that is a bit painful to setup and
Expand All @@ -320,9 +322,9 @@ maven_install(
"io.grpc:grpc-protobuf:{}".format(grpc_version),
"io.grpc:grpc-services:{}".format(grpc_version),
"io.grpc:grpc-stub:{}".format(grpc_version),
"com.github.scopt:scopt_2.13:3.7.1",
"org.wartremover:wartremover_2.13.5:2.4.13",
"io.spray:spray-json_2.13:1.3.5",
"com.github.scopt:scopt_{}:3.7.1".format(scala_major_version),
"org.wartremover:wartremover_{}:2.4.16".format(scala_version),
"io.spray:spray-json_{}:1.3.5".format(scala_major_version),
],
maven_install_json = "@compatibility//:maven_install.json",
repositories = [
Expand All @@ -336,7 +338,6 @@ load("@maven//:defs.bzl", "pinned_maven_install")
pinned_maven_install()

load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
load("@scala_version//:index.bzl", "scala_artifacts", "scala_version")

scala_config(scala_version)

Expand Down
Loading

0 comments on commit 41e60f7

Please sign in to comment.