Skip to content

Commit

Permalink
Add Scala 3.6.2 support (bazelbuild#1672)
Browse files Browse the repository at this point in the history
  • Loading branch information
WojciechMazur authored Dec 16, 2024
1 parent 6a97ace commit 719f353
Show file tree
Hide file tree
Showing 8 changed files with 950 additions and 4 deletions.
2 changes: 2 additions & 0 deletions dt_patches/dt_patch_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,7 @@ run_test_local test_compiler_patch 3.2.2
run_test_local test_compiler_patch 3.3.4
run_test_local test_compiler_patch 3.4.3
run_test_local test_compiler_patch 3.5.2
run_test_local test_compiler_patch 3.6.2

run_test_local test_compiler_srcjar_error 2.12.11
run_test_local test_compiler_srcjar_error 2.12.12
Expand Down Expand Up @@ -152,3 +153,4 @@ run_test_local test_compiler_srcjar 3.2.2
run_test_local test_compiler_srcjar_nonhermetic 3.3.4
run_test_local test_compiler_srcjar 3.4.3
run_test_local test_compiler_srcjar_nonhermetic 3.5.2
run_test_local test_compiler_srcjar_nonhermetic 3.6.2
3 changes: 3 additions & 0 deletions dt_patches/test_dt_patches_user_srcjar/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,9 @@ srcjars_by_version = {
"3.5.2": {
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.5.2/scala3-compiler_3-3.5.2-sources.jar",
},
"3.6.2": {
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.6.2/scala3-compiler_3-3.6.2-sources.jar",
},
}

load("@io_bazel_rules_scala//scala:scala.bzl", "scala_toolchains")
Expand Down
2 changes: 1 addition & 1 deletion examples/scala3/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ local_repository(

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

scala_config(scala_version = "3.5.2")
scala_config(scala_version = "3.6.2")

load("@io_bazel_rules_scala//scala:scala.bzl", "scala_toolchains")

Expand Down
1 change: 1 addition & 0 deletions scripts/create_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
"3.3.4",
"3.4.3",
"3.5.2",
"3.6.2"
]
PARSER_COMBINATORS_VERSION = '1.1.2'
SBT_COMPILER_INTERFACE_VERSION = '1.10.4'
Expand Down
9 changes: 7 additions & 2 deletions test/shell/test_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,15 @@ function scala3_3_example() {

function scala3_4_example() {
test_example examples/scala3 "bazel build --repo_env=SCALA_VERSION=3.4.3 //..."
}
}

function scala3_5_example() {
test_example examples/scala3 "bazel build --repo_env=SCALA_VERSION=3.5.2 //..."
}
}

function scala3_6_example() {
test_example examples/scala3 "bazel build --repo_env=SCALA_VERSION=3.6.2 //..."
}

function semanticdb_example() {

Expand All @@ -72,4 +76,5 @@ $runner scala3_2_example
$runner scala3_3_example
$runner scala3_4_example
$runner scala3_5_example
$runner scala3_6_example
$runner cross_build_example
2 changes: 1 addition & 1 deletion test_thirdparty_version.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ runner=$(get_test_runner "${1:-local}")


# Latest version of each major version
$runner test_scala_version "3.5.2" # Latest Next version
$runner test_scala_version "3.6.2" # Latest Next version
$runner test_scala_version "3.3.4" # Latest LTS version
$runner test_scala_version "3.1.3" # First supported major for Scala 3, max supported JDK=18
$runner test_scala_version "2.13.15"
Expand Down
7 changes: 7 additions & 0 deletions third_party/repositories/repositories.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@ load(
_artifacts_3_5 = "artifacts",
_scala_version_3_5 = "scala_version",
)
load(
"//third_party/repositories:scala_3_6.bzl",
_artifacts_3_6 = "artifacts",
_scala_version_3_6 = "scala_version",
)
load(
"@io_bazel_rules_scala//scala:scala_cross_version.bzl",
"default_maven_server_urls",
Expand All @@ -59,6 +64,7 @@ artifacts_by_major_scala_version = {
"3.3": _artifacts_3_3,
"3.4": _artifacts_3_4,
"3.5": _artifacts_3_5,
"3.6": _artifacts_3_6,
}

scala_version_by_major_scala_version = {
Expand All @@ -70,6 +76,7 @@ scala_version_by_major_scala_version = {
"3.3": _scala_version_3_3,
"3.4": _scala_version_3_4,
"3.5": _scala_version_3_5,
"3.6": _scala_version_3_6,
}

def repositories(
Expand Down
Loading

0 comments on commit 719f353

Please sign in to comment.