From 3637ed982f07c3ede5a3d44c0947576d84a94784 Mon Sep 17 00:00:00 2001 From: Brice Jaglin Date: Thu, 7 Sep 2023 23:22:52 +0200 Subject: [PATCH] use scala 2.13.12 --- bin/test-release.sh | 6 +++--- project/Dependencies.scala | 2 +- project/ScalafixBuild.scala | 1 + .../scala-2/scalafix/internal/reflect/RuleCompiler.scala | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/bin/test-release.sh b/bin/test-release.sh index 2a1d1045bc..1f0615c9e7 100755 --- a/bin/test-release.sh +++ b/bin/test-release.sh @@ -8,9 +8,9 @@ cs resolve \ ch.epfl.scala:scalafix-core_2.12:$version \ ch.epfl.scala:scalafix-core_2.13:$version \ ch.epfl.scala:scalafix-reflect_2.12.18:$version \ - ch.epfl.scala:scalafix-reflect_2.13.11:$version \ + ch.epfl.scala:scalafix-reflect_2.13.12:$version \ ch.epfl.scala:scalafix-cli_2.12.18:$version \ - ch.epfl.scala:scalafix-cli_2.13.11:$version \ + ch.epfl.scala:scalafix-cli_2.13.12:$version \ ch.epfl.scala:scalafix-testkit_2.12.18:$version \ - ch.epfl.scala:scalafix-testkit_2.13.11:$version \ + ch.epfl.scala:scalafix-testkit_2.13.12:$version \ -r sonatype:public diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 22ac9f56b9..d70146b5bf 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -8,7 +8,7 @@ import scala.util.Try object Dependencies { val scala212 = "2.12.18" - val scala213 = "2.13.11" + val scala213 = "2.13.12" val scala3 = "3.3.1-RC7" val buildScalaVersions = Seq(scala212, scala213, scala3) diff --git a/project/ScalafixBuild.scala b/project/ScalafixBuild.scala index fca405baab..bb068f0f28 100644 --- a/project/ScalafixBuild.scala +++ b/project/ScalafixBuild.scala @@ -203,6 +203,7 @@ object ScalafixBuild extends AutoPlugin with GhpagesKeys { ) private val PreviousScalaVersion: Map[String, String] = Map( + "2.13.12" -> "2.13.11" ) override def buildSettings: Seq[Setting[_]] = List( diff --git a/scalafix-reflect/src/main/scala-2/scalafix/internal/reflect/RuleCompiler.scala b/scalafix-reflect/src/main/scala-2/scalafix/internal/reflect/RuleCompiler.scala index a414ea48d6..5650d1eff9 100644 --- a/scalafix-reflect/src/main/scala-2/scalafix/internal/reflect/RuleCompiler.scala +++ b/scalafix-reflect/src/main/scala-2/scalafix/internal/reflect/RuleCompiler.scala @@ -43,11 +43,11 @@ class RuleCompiler( List(new BatchSourceFile(label, new String(input.chars))) ) val errors = reporter.infos.collect { - case reporter.Info(pos, msg, reporter.ERROR) => + case r: reporter.Info if r.severity == reporter.ERROR => ConfError - .message(msg) + .message(r.msg) .atPos( - if (pos.isDefined) Position.Range(input, pos.start, pos.end) + if (r.pos.isDefined) Position.Range(input, r.pos.start, r.pos.end) else Position.None ) .notOk