Skip to content

Commit e63ba1e

Browse files
authored
Add support for Scala 3.2.1 (#1465)
- Add the build and repository definitions for Scala 3.2.1 - Add an extra set of tests for Scala 3.2.1 The current stable version of Scala is 3.2.1: https://github.com/lampepfl/dotty/releases/tag/3.2.1 Fixes #1464
1 parent f674f8f commit e63ba1e

File tree

4 files changed

+560
-3
lines changed

4 files changed

+560
-3
lines changed

scala/support/BUILD

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,17 @@ scala_library(
55
name = "test_reporter",
66
srcs = ["JUnitXmlReporter.scala"],
77
scalacopts = {
8+
"3.2": [
9+
"-deprecation:true",
10+
"-encoding",
11+
"UTF-8",
12+
"-feature",
13+
"-language:existentials",
14+
"-language:higherKinds",
15+
"-language:implicitConversions",
16+
"-unchecked",
17+
"-Xfatal-warnings",
18+
],
819
"3.1": [
920
"-deprecation:true",
1021
"-encoding",

test/shell/test_examples.sh

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,16 @@ function multi_framework_toolchain_example() {
1616
(cd examples/testing/multi_frameworks_toolchain; bazel test //...)
1717
}
1818

19-
function scala3_example() {
20-
(cd examples/scala3; bazel build //...)
19+
function scala3_1_example() {
20+
(cd examples/scala3; bazel build --repo_env=SCALA_VERSION=3.1.0 //...)
21+
}
22+
23+
function scala3_2_example() {
24+
(cd examples/scala3; bazel build --repo_env=SCALA_VERSION=3.2.1 //...)
2125
}
2226

2327
$runner scalatest_repositories_example
2428
$runner specs2_junit_repositories_example
2529
$runner multi_framework_toolchain_example
26-
$runner scala3_example
30+
$runner scala3_1_example
31+
$runner scala3_2_example

third_party/repositories/repositories.bzl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,11 @@ load(
1818
_artifacts_3_1 = "artifacts",
1919
_scala_version_3_1 = "scala_version",
2020
)
21+
load(
22+
"//third_party/repositories:scala_3_2.bzl",
23+
_artifacts_3_2 = "artifacts",
24+
_scala_version_3_2 = "scala_version",
25+
)
2126
load(
2227
"@io_bazel_rules_scala//scala:scala_cross_version.bzl",
2328
"default_maven_server_urls",
@@ -33,13 +38,15 @@ artifacts_by_major_scala_version = {
3338
"2.12": _artifacts_2_12,
3439
"2.13": _artifacts_2_13,
3540
"3.1": _artifacts_3_1,
41+
"3.2": _artifacts_3_2,
3642
}
3743

3844
scala_version_by_major_scala_version = {
3945
"2.11": _scala_version_2_11,
4046
"2.12": _scala_version_2_12,
4147
"2.13": _scala_version_2_13,
4248
"3.1": _scala_version_3_1,
49+
"3.2": _scala_version_3_2,
4350
}
4451

4552
def repositories(

0 commit comments

Comments
 (0)