Skip to content

Commit 73719cb

Browse files
authored
Upgrade scala 2.12.x and 2.13.x versions (#1515)
* Upgrade to Scala 2.13.11 * Upgrade to Scala 2.12.18 * Rename org_spire_math_kind_projector to org_typelevel_kind_projector * Fix expected-coverage.dat files
1 parent b17e9e0 commit 73719cb

File tree

18 files changed

+68
-64
lines changed

18 files changed

+68
-64
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,7 @@ scalatest_toolchain()
9090
```
9191

9292
This will load the `rules_scala` repository at the commit sha
93-
`rules_scala_version` into your Bazel project and register a [scala_toolchain](docs/scala_toolchain.md) at the default Scala version (2.12.14)
93+
`rules_scala_version` into your Bazel project and register a [scala_toolchain](docs/scala_toolchain.md) at the default Scala version (2.12.18)
9494

9595
Then in your BUILD file just add the following so the rules will be available:
9696
```starlark
@@ -145,13 +145,13 @@ Previous minor versions may work but are supported only on a best effort basis.
145145
To configure Scala version you must call `scala_config(scala_version = "2.xx.xx")` and configure
146146
dependencies by declaring [scala_toolchain](docs/scala_toolchain.md).
147147
For a quick start you can use `scala_repositories()` and `scala_register_toolchains()`, which have
148-
dependency providers configured for `2.11.12`, `2.12.14` and `2.13.6` versions.
148+
dependency providers configured for `2.11.12`, `2.12.18` and `2.13.11` versions.
149149

150150

151151
```starlark
152152
# WORKSPACE
153153
load("@io_bazel_rules_scala//:scala_config.bzl", "scala_config")
154-
scala_config(scala_version = "2.13.6")
154+
scala_config(scala_version = "2.13.11")
155155

156156
load("@rules_proto//proto:repositories.bzl", "rules_proto_dependencies", "rules_proto_toolchains")
157157
rules_proto_dependencies()

WORKSPACE

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ repositories(
197197
# validated against it
198198
"org_springframework_spring_core",
199199
"org_springframework_spring_tx",
200-
"org_spire_math_kind_projector",
200+
"org_typelevel_kind_projector",
201201
# For testing that we don't include sources jars to the classpath
202202
"org_typelevel__cats_core",
203203
],

dt_patches/dt_patch_test.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ run_test_local test_compiler_patch 2.12.13
9595
run_test_local test_compiler_patch 2.12.14
9696
run_test_local test_compiler_patch 2.12.15
9797
run_test_local test_compiler_patch 2.12.16
98+
run_test_local test_compiler_patch 2.12.17
99+
run_test_local test_compiler_patch 2.12.18
98100

99101
run_test_local test_compiler_patch 2.13.0
100102
run_test_local test_compiler_patch 2.13.1
@@ -105,6 +107,8 @@ run_test_local test_compiler_patch 2.13.5
105107
run_test_local test_compiler_patch 2.13.6
106108
run_test_local test_compiler_patch 2.13.7
107109
run_test_local test_compiler_patch 2.13.8
110+
run_test_local test_compiler_patch 2.13.10
111+
run_test_local test_compiler_patch 2.13.11
108112

109113
run_test_local test_compiler_srcjar_error 2.12.11
110114
run_test_local test_compiler_srcjar_error 2.12.12
@@ -115,4 +119,5 @@ run_test_local test_compiler_srcjar_error 2.12.13
115119
run_test_local test_compiler_srcjar 2.12.14
116120
run_test_local test_compiler_srcjar 2.12.15
117121
run_test_local test_compiler_srcjar 2.12.16
118-
run_test_local test_compiler_srcjar_nonhermetic 2.12.17
122+
run_test_local test_compiler_srcjar_nonhermetic 2.12.17
123+
run_test_local test_compiler_srcjar_nonhermetic 2.12.18

dt_patches/test_dt_patches_user_srcjar/WORKSPACE

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ srcjars_by_version = {
8888
"2.12.17": {
8989
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.17/scala-compiler-2.12.17-sources.jar?foo",
9090
},
91+
"2.12.18": {
92+
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala-compiler/2.12.18/scala-compiler-2.12.18-sources.jar?foo",
93+
},
9194
}
9295

9396
rules_scala_setup(scala_compiler_srcjar = srcjars_by_version[SCALA_VERSION])

scala_config.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ load("//scala:scala_cross_version.bzl", "extract_major_version", "extract_minor_
22

33
def _default_scala_version():
44
"""return the scala version for use in maven coordinates"""
5-
return "2.12.14"
5+
return "2.12.18"
66

77
def _validate_supported_scala_version(scala_major_version, scala_minor_version):
88
if scala_major_version == "2.11" and int(scala_minor_version) != 12:

test/coverage_filename_encoding/expected-coverage.dat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,14 +9,14 @@ FNDA:1,coverage_filename_encoding/A1$::a1 (Z)Ljava/lang/String;
99
FNDA:0,coverage_filename_encoding/A1::a1 (Z)Ljava/lang/String;
1010
FNF:4
1111
FNH:3
12-
BRDA:5,0,0,0
13-
BRDA:5,0,1,1
12+
BRDA:5,0,0,1
13+
BRDA:5,0,1,0
1414
BRF:2
1515
BRH:1
1616
DA:3,1
1717
DA:5,1
18-
DA:6,1
18+
DA:6,0
1919
DA:7,1
20-
LH:4
20+
LH:3
2121
LF:4
2222
end_of_record

test/coverage_scalatest/expected-coverage.dat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ FNDA:1,coverage_scalatest/A1$::a1 (Z)Lcoverage_scalatest/B1$;
99
FNDA:0,coverage_scalatest/A1::a1 (Z)Lcoverage_scalatest/B1$;
1010
FNF:4
1111
FNH:3
12-
BRDA:5,0,0,0
13-
BRDA:5,0,1,1
12+
BRDA:5,0,0,1
13+
BRDA:5,0,1,0
1414
BRF:2
1515
BRH:1
1616
DA:3,1
1717
DA:5,1
18-
DA:6,1
18+
DA:6,0
1919
DA:7,1
20-
LH:4
20+
LH:3
2121
LF:4
2222
end_of_record
2323
SF:test/coverage_scalatest/A2.scala

test/coverage_specs2_with_junit/expected-coverage.dat

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ FNDA:1,coverage_specs2_with_junit/A1$::a1 (Z)Lcoverage_specs2_with_junit/B1$;
99
FNDA:0,coverage_specs2_with_junit/A1::a1 (Z)Lcoverage_specs2_with_junit/B1$;
1010
FNF:4
1111
FNH:3
12-
BRDA:5,0,0,0
13-
BRDA:5,0,1,1
12+
BRDA:5,0,0,1
13+
BRDA:5,0,1,0
1414
BRF:2
1515
BRH:1
1616
DA:3,1
1717
DA:5,1
18-
DA:6,1
18+
DA:6,0
1919
DA:7,1
20-
LH:4
20+
LH:3
2121
LF:4
2222
end_of_record
2323
SF:test/coverage_specs2_with_junit/A2.scala

test/shell/test_scala_config.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@ runner=$(get_test_runner "${1:-local}")
66

77
test_classpath_contains_2_12() {
88
bazel aquery 'mnemonic("Javac", //src/java/io/bazel/rulesscala/scalac:scalac)' \
9-
--repo_env=SCALA_VERSION=2.12.14 \
9+
--repo_env=SCALA_VERSION=2.12.18 \
1010
| grep scala-library-2.12
1111
}
1212

1313
test_classpath_contains_2_13() {
1414
bazel aquery 'mnemonic("Javac", //src/java/io/bazel/rulesscala/scalac:scalac)' \
15-
--repo_env=SCALA_VERSION=2.13.6 \
15+
--repo_env=SCALA_VERSION=2.13.11 \
1616
| grep scala-library-2.13
1717
}
1818

test/src/main/scala/scalarules/test/compiler_plugin/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ scala_library(
44
name = "compiler_plugin",
55
testonly = True,
66
srcs = ["KindProjected.scala"],
7-
plugins = ["@org_spire_math_kind_projector//jar"],
7+
plugins = ["@org_typelevel_kind_projector//jar"],
88
visibility = ["//visibility:public"],
99
)

0 commit comments

Comments
 (0)