From 0a64cf7d16540dc33ab0344752428bb206198f2e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 13 Jan 2023 15:55:12 +0100 Subject: [PATCH 1/2] Use `scala.jdk.CollectionConverters` instead of `JavaConverters`. The latter is deprecated in the latest 2.13.x versions of the library. --- tasty-mima/src/main/scala/tastymima/Analyzer.scala | 4 ++-- tasty-mima/src/main/scala/tastymima/TastyMiMa.scala | 2 +- tasty-mima/src/test/scala/tastymima/JavaAPISuite.scala | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tasty-mima/src/main/scala/tastymima/Analyzer.scala b/tasty-mima/src/main/scala/tastymima/Analyzer.scala index 3992c2c..e375aa9 100644 --- a/tasty-mima/src/main/scala/tastymima/Analyzer.scala +++ b/tasty-mima/src/main/scala/tastymima/Analyzer.scala @@ -19,11 +19,11 @@ private[tastymima] final class Analyzer(val config: Config, val oldCtx: Context, import Analyzer.* private val problemFilters: List[ProblemMatcher] = - import scala.collection.JavaConverters.* + import scala.jdk.CollectionConverters.* config.getProblemFilters().nn.asScala.toList private val artifactPrivatePackagePaths: List[List[SimpleName]] = - import scala.collection.JavaConverters.* + import scala.jdk.CollectionConverters.* for stringPath <- config.getArtifactPrivatePackages().nn.asScala.toList yield stringPath.split('.').toList.map(termName(_)) diff --git a/tasty-mima/src/main/scala/tastymima/TastyMiMa.scala b/tasty-mima/src/main/scala/tastymima/TastyMiMa.scala index b70e4bd..c0f1569 100644 --- a/tasty-mima/src/main/scala/tastymima/TastyMiMa.scala +++ b/tasty-mima/src/main/scala/tastymima/TastyMiMa.scala @@ -56,7 +56,7 @@ final class TastyMiMa(config: Config) extends ITastyMiMa: newClasspath: JList[Path], newClasspathEntry: Path ): JList[IProblem] = - import scala.collection.JavaConverters.* + import scala.jdk.CollectionConverters.* val problems = analyze(oldClasspath.asScala.toList, oldClasspathEntry, newClasspath.asScala.toList, newClasspathEntry) diff --git a/tasty-mima/src/test/scala/tastymima/JavaAPISuite.scala b/tasty-mima/src/test/scala/tastymima/JavaAPISuite.scala index dd5dd5f..1c9d293 100644 --- a/tasty-mima/src/test/scala/tastymima/JavaAPISuite.scala +++ b/tasty-mima/src/test/scala/tastymima/JavaAPISuite.scala @@ -7,7 +7,7 @@ import tastymima.intf.{Config, ProblemKind} class JavaAPISuite extends munit.FunSuite: def analyzeTestLib(tastyMiMa: intf.TastyMiMa): List[intf.Problem] = - import scala.collection.JavaConverters.* + import scala.jdk.CollectionConverters.* import TestClasspaths.* val javaProblems = From 90d4bdcb3c6a70ad8b30d22a0bd787eb4fe8f64b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Doeraene?= Date: Fri, 13 Jan 2023 15:55:59 +0100 Subject: [PATCH 2/2] Upgrade to Scala 3.2.2 and tasty-query 0.5.7. tasty-query 0.5.7 now supports TASTy failes generated by Scala 3.2.x, but also requires to be used from Scala 3.2.x, so they must be upgraded at the same time. --- build.sbt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index 153dfb3..79a9c23 100644 --- a/build.sbt +++ b/build.sbt @@ -3,7 +3,7 @@ val rtJarOpt = taskKey[Option[String]]("Path to rt.jar if it exists") val javalibEntry = taskKey[String]("Path to rt.jar or \"jrt:/\"") inThisBuild(Def.settings( - crossScalaVersions := Seq("3.1.0"), + crossScalaVersions := Seq("3.2.2"), scalaVersion := crossScalaVersions.value.head, scalacOptions ++= Seq( @@ -74,7 +74,7 @@ lazy val tastyMiMa = testFrameworks += new TestFramework("munit.Framework") ) .settings( - libraryDependencies += "ch.epfl.scala" %% "tasty-query" % "0.5.6", + libraryDependencies += "ch.epfl.scala" %% "tasty-query" % "0.5.7", Test / rtJarOpt := { for (bootClasspath <- Option(System.getProperty("sun.boot.class.path"))) yield {