Skip to content

Upgrade Scala 3.7 to 3.7.2 (was 3.7.1) #1757

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Aug 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ SCALA_3_VERSIONS = [
"3.3.6",
"3.5.2",
"3.6.4",
"3.7.1",
"3.7.2",
]

SCALA_VERSIONS = SCALA_2_VERSIONS + SCALA_3_VERSIONS
Expand Down
4 changes: 2 additions & 2 deletions dt_patches/dt_patch_test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ $runner test_compiler_patch 3.3.6
$runner test_compiler_patch 3.4.3
$runner test_compiler_patch 3.5.2
$runner test_compiler_patch 3.6.4
$runner test_compiler_patch 3.7.1
$runner test_compiler_patch 3.7.2

$runner test_compiler_srcjar_error 2.12.11
$runner test_compiler_srcjar_error 2.12.12
Expand Down Expand Up @@ -151,4 +151,4 @@ $runner test_compiler_srcjar_nonhermetic 3.3.6
$runner test_compiler_srcjar 3.4.3
$runner test_compiler_srcjar_nonhermetic 3.5.2
$runner test_compiler_srcjar_nonhermetic 3.6.4
$runner test_compiler_srcjar_nonhermetic 3.7.1
$runner test_compiler_srcjar_nonhermetic 3.7.2
4 changes: 2 additions & 2 deletions dt_patches/test_dt_patches_user_srcjar/MODULE.bazel
Original file line number Diff line number Diff line change
Expand Up @@ -170,8 +170,8 @@ scala_deps.compiler_srcjar(
version = "3.6.4",
)
scala_deps.compiler_srcjar(
url = "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.1/scala3-compiler_3-3.7.1-sources.jar",
version = "3.7.1",
url = "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.2/scala3-compiler_3-3.7.2-sources.jar",
version = "3.7.2",
)

scala_protoc = use_extension(
Expand Down
4 changes: 2 additions & 2 deletions dt_patches/test_dt_patches_user_srcjar/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ srcjars_by_version = {
"3.6.4": {
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.6.4/scala3-compiler_3-3.6.4-sources.jar",
},
"3.7.1": {
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.1/scala3-compiler_3-3.7.1-sources.jar",
"3.7.2": {
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.2/scala3-compiler_3-3.7.2-sources.jar",
},
}

Expand Down
2 changes: 1 addition & 1 deletion examples/scala3/WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ scala_protoc_toolchains(name = "rules_scala_protoc_toolchains")

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

scala_config(scala_version = "3.7.1")
scala_config(scala_version = "3.7.2")

load(
"@rules_scala//scala:toolchains.bzl",
Expand Down
4 changes: 4 additions & 0 deletions scala/private/macros/compiler_sources_integrity.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -273,4 +273,8 @@ COMPILER_SOURCES = {
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.1/scala3-compiler_3-3.7.1-sources.jar",
"integrity": "sha256-C6oxezCyv4+ESER5pl8qPcPhrHv4BEAtmUQ8P+5A/MU=",
},
"3.7.2": {
"url": "https://repo1.maven.org/maven2/org/scala-lang/scala3-compiler_3/3.7.2/scala3-compiler_3-3.7.2-sources.jar",
"integrity": "sha256-OTs9ZH2xRRy074xVBiFgxnm56RmOQ+gfnyv3BiL1JDQ=",
},
}
2 changes: 1 addition & 1 deletion scripts/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ options:
Scala version for which to update repository
information; if not provided, updates all supported
versions: 2.11.12, 2.12.20, 2.13.16, 3.1.3, 3.2.2,
3.3.6, 3.4.3, 3.5.2, 3.6.4, 3.7.1
3.3.6, 3.4.3, 3.5.2, 3.6.4, 3.7.2
--output_dir OUTPUT_DIR
Directory in which to generate or update repository
files (default: .../third_party/repositories)
Expand Down
2 changes: 1 addition & 1 deletion scripts/create_repository.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"3.4.3",
"3.5.2",
"3.6.4",
"3.7.1",
"3.7.2",
]
PARSER_COMBINATORS_VERSION = '1.1.2'
SBT_COMPILER_INTERFACE_VERSION = '1.10.8'
Expand Down
2 changes: 1 addition & 1 deletion scripts/update_compiler_sources_integrity.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
] + [
f'3.6.{patch}' for patch in range(0, 5) # 3.6.0 to 3.6.4
] + [
f'3.7.{patch}' for patch in range(0, 2) # 3.7.0 to 3.7.1
f'3.7.{patch}' for patch in range(0, 3) # 3.7.0 to 3.7.2
]

DATA_MARKER = "COMPILER_SOURCES = "
Expand Down
7 changes: 5 additions & 2 deletions src/java/io/bazel/rulesscala/scalac/reporter/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,11 @@ java_library(
between_3_0_and_3_3 = glob(["scala_3/*.java"]) + [
"since_3_before_3_3/CompilerCompat.java",
],
since_3_3 = glob(["scala_3/*.java"]) + [
"since_3_3/CompilerCompat.java",
between_3_3_and_3_7_2 = glob(["scala_3/*.java"]) + [
"since_3_3_before_3_7_2/CompilerCompat.java",
],
since_3_7_2 = glob(["scala_3/*.java"]) + [
"since_3_7_2/CompilerCompat.java",
],
) + ["//src/java/io/bazel/rulesscala/scalac/deps_tracking_reporter"],
visibility = ["//visibility:public"],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,9 @@

public class CompilerCompat {
static Message toMessage(String msg) {
return new NoExplanation((ctx) -> msg, Contexts.NoContext());
return new NoExplanation(
ctx -> msg, // msgFn : Context ⇒ String
Contexts.NoContext() // using : Context, added in 3.3.0
);
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
package io.bazel.rulesscala.scalac.reporter;

import dotty.tools.dotc.core.Contexts;
import dotty.tools.dotc.reporting.Message;
import dotty.tools.dotc.reporting.NoExplanation;
import scala.collection.immutable.List$;

public class CompilerCompat {
static Message toMessage(String msg) {
return new NoExplanation(
ctx -> msg, // msgFn : Context ⇒ String
List$.MODULE$.empty(), // actions : List[CodeAction] (= List.empty), added in 3.7.2
Contexts.NoContext() // using : Context, added in 3.3.0
);
}
}
2 changes: 1 addition & 1 deletion test/shell/test_examples.sh
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ test_scala3_6_example() {
}

test_scala3_7_example() {
run_in_example_dir scala3 bazel build --repo_env=SCALA_VERSION=3.7.1 //...
run_in_example_dir scala3 bazel build --repo_env=SCALA_VERSION=3.7.2 //...
}

test_semanticdb_example() {
Expand Down
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.7.1" # Latest Next version
$runner test_scala_version "3.7.2" # Latest Next version
$runner test_scala_version "3.3.6" # 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.16"
Expand Down
18 changes: 9 additions & 9 deletions third_party/repositories/scala_3_7.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Mostly generated and updated by scripts/create_repository.py.
"""

scala_version = "3.7.1"
scala_version = "3.7.2"

artifacts = {
"com_github_jnr_jffi_native": {
Expand Down Expand Up @@ -190,8 +190,8 @@ artifacts = {
"sha256": "86af037580bdf9ce9c05f8b2afd734daf1a8564c38cd10ca5d08bf81508ad2e4",
},
"io_bazel_rules_scala_scala_compiler": {
"artifact": "org.scala-lang:scala3-compiler_3:3.7.1",
"sha256": "3ad6529be3723d342a56b0283f41044fa539b51308d0ceb4b2f1ca1161fc4fd0",
"artifact": "org.scala-lang:scala3-compiler_3:3.7.2",
"sha256": "3ecbe87d6b0f8d86cccc8eb6ad83b62126ad714a4cc8eb00afa3e7b481518303",
"deps": [
"@io_bazel_rules_scala_scala_asm",
"@io_bazel_rules_scala_scala_interfaces",
Expand All @@ -214,12 +214,12 @@ artifacts = {
],
},
"io_bazel_rules_scala_scala_interfaces": {
"artifact": "org.scala-lang:scala3-interfaces:3.7.1",
"sha256": "273f477c705cbd31fee764ffb3434af7b50af8613d5246bfb76febb317cd95d4",
"artifact": "org.scala-lang:scala3-interfaces:3.7.2",
"sha256": "d151e52bfcc44c071e32baaca73f2d73dc7eca3f942ec5ce16f221d1a7b69ef2",
},
"io_bazel_rules_scala_scala_library": {
"artifact": "org.scala-lang:scala3-library_3:3.7.1",
"sha256": "09b95af8163e6a81c8ce9bf0aad9547a982effa15067cc8d71fa763317117233",
"artifact": "org.scala-lang:scala3-library_3:3.7.2",
"sha256": "241209cceff9876f491865e683109d02f32cf90bdff5cc6c2034661f56145e95",
"deps": [
"@io_bazel_rules_scala_scala_library_2",
],
Expand Down Expand Up @@ -250,8 +250,8 @@ artifacts = {
],
},
"io_bazel_rules_scala_scala_tasty_core": {
"artifact": "org.scala-lang:tasty-core_3:3.7.1",
"sha256": "ae6b3e3d22fa2da81ef200cf59c66daa935e9991eb2402a66a0e294236066117",
"artifact": "org.scala-lang:tasty-core_3:3.7.2",
"sha256": "125b791d4ddcf5a187afae1de5158067dfbbfe96f7eaea73400d97cc60e74ad1",
"deps": [
"@io_bazel_rules_scala_scala_library",
],
Expand Down