diff --git a/MODULE.bazel b/MODULE.bazel index c32f597f1..bb37dc1d8 100644 --- a/MODULE.bazel +++ b/MODULE.bazel @@ -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 diff --git a/dt_patches/dt_patch_test.sh b/dt_patches/dt_patch_test.sh index cb1122d2a..573be5393 100755 --- a/dt_patches/dt_patch_test.sh +++ b/dt_patches/dt_patch_test.sh @@ -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 @@ -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 diff --git a/dt_patches/test_dt_patches_user_srcjar/MODULE.bazel b/dt_patches/test_dt_patches_user_srcjar/MODULE.bazel index 42ce269ca..aebd2237b 100644 --- a/dt_patches/test_dt_patches_user_srcjar/MODULE.bazel +++ b/dt_patches/test_dt_patches_user_srcjar/MODULE.bazel @@ -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( diff --git a/dt_patches/test_dt_patches_user_srcjar/WORKSPACE b/dt_patches/test_dt_patches_user_srcjar/WORKSPACE index 2b942685e..71ea10f25 100644 --- a/dt_patches/test_dt_patches_user_srcjar/WORKSPACE +++ b/dt_patches/test_dt_patches_user_srcjar/WORKSPACE @@ -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", }, } diff --git a/examples/scala3/WORKSPACE b/examples/scala3/WORKSPACE index a5bdade74..272805686 100644 --- a/examples/scala3/WORKSPACE +++ b/examples/scala3/WORKSPACE @@ -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", diff --git a/scala/private/macros/compiler_sources_integrity.bzl b/scala/private/macros/compiler_sources_integrity.bzl index 9c690f2ef..057f16496 100644 --- a/scala/private/macros/compiler_sources_integrity.bzl +++ b/scala/private/macros/compiler_sources_integrity.bzl @@ -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=", + }, } diff --git a/scripts/README.md b/scripts/README.md index 654165e95..666caff5b 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -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) diff --git a/scripts/create_repository.py b/scripts/create_repository.py index 0b98b54b9..8738758c0 100755 --- a/scripts/create_repository.py +++ b/scripts/create_repository.py @@ -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' diff --git a/scripts/update_compiler_sources_integrity.py b/scripts/update_compiler_sources_integrity.py index f5eaba951..c462a80f7 100755 --- a/scripts/update_compiler_sources_integrity.py +++ b/scripts/update_compiler_sources_integrity.py @@ -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 = " diff --git a/src/java/io/bazel/rulesscala/scalac/reporter/BUILD b/src/java/io/bazel/rulesscala/scalac/reporter/BUILD index 814a183d9..e72f5e268 100644 --- a/src/java/io/bazel/rulesscala/scalac/reporter/BUILD +++ b/src/java/io/bazel/rulesscala/scalac/reporter/BUILD @@ -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"], diff --git a/src/java/io/bazel/rulesscala/scalac/reporter/since_3_3/CompilerCompat.java b/src/java/io/bazel/rulesscala/scalac/reporter/since_3_3_before_3_7_2/CompilerCompat.java similarity index 58% rename from src/java/io/bazel/rulesscala/scalac/reporter/since_3_3/CompilerCompat.java rename to src/java/io/bazel/rulesscala/scalac/reporter/since_3_3_before_3_7_2/CompilerCompat.java index c5cbf262d..a08e564f3 100644 --- a/src/java/io/bazel/rulesscala/scalac/reporter/since_3_3/CompilerCompat.java +++ b/src/java/io/bazel/rulesscala/scalac/reporter/since_3_3_before_3_7_2/CompilerCompat.java @@ -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 + ); } } diff --git a/src/java/io/bazel/rulesscala/scalac/reporter/since_3_7_2/CompilerCompat.java b/src/java/io/bazel/rulesscala/scalac/reporter/since_3_7_2/CompilerCompat.java new file mode 100644 index 000000000..a28f321fb --- /dev/null +++ b/src/java/io/bazel/rulesscala/scalac/reporter/since_3_7_2/CompilerCompat.java @@ -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 + ); + } +} diff --git a/test/shell/test_examples.sh b/test/shell/test_examples.sh index 2df5f1830..a9449fa31 100755 --- a/test/shell/test_examples.sh +++ b/test/shell/test_examples.sh @@ -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() { diff --git a/test_thirdparty_version.sh b/test_thirdparty_version.sh index 2faf9cf76..915e029fa 100755 --- a/test_thirdparty_version.sh +++ b/test_thirdparty_version.sh @@ -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" diff --git a/third_party/repositories/scala_3_7.bzl b/third_party/repositories/scala_3_7.bzl index 67581b03c..378fcb5a7 100644 --- a/third_party/repositories/scala_3_7.bzl +++ b/third_party/repositories/scala_3_7.bzl @@ -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": { @@ -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", @@ -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", ], @@ -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", ],