From 2c56b9b23d3942643f622843218dbcbb0b875411 Mon Sep 17 00:00:00 2001 From: pierscin <30854591+pierscin@users.noreply.github.com> Date: Tue, 6 Oct 2026 10:18:59 +0200 Subject: [PATCH 1/2] Migrate to Scala 3.9.0 LTS Co-Authored-By: Claude Opus 5.5 --- .scala-steward.conf | 2 +- build.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.scala-steward.conf b/.scala-steward.conf index 9701ed9..9dcd585 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -3,5 +3,5 @@ updates.ignore = [ {groupId = "org.scala-lang", artifactId = "scala-compiler", version = "2.13."}, ] updates.pin = [ - {groupId = "org.scala-lang", artifactId = "scala3-library", version = "3.3."} + {groupId = "org.scala-lang", artifactId = "scala3-library", version = "3.9."} ] diff --git a/build.sbt b/build.sbt index 2ccb79b..585b9c3 100644 --- a/build.sbt +++ b/build.sbt @@ -4,7 +4,7 @@ import com.softwaremill.UpdateVersionInDocs val scala212 = "2.12.21" val scala213 = "2.13.18" -val scala3 = "3.3.8" +val scala3 = "3.9.0" val scalaIdeaVersion = scala3 // the version for which to import sources into intellij From 1a14f483cec6f12b9554bace4a6d93f06757c62f Mon Sep 17 00:00:00 2001 From: pierscin <30854591+pierscin@users.noreply.github.com> Date: Tue, 6 Oct 2026 10:18:59 +0200 Subject: [PATCH 2/2] Fix new Scala 3.9 warnings (infix alphanumeric methods, explicit implicit args) Co-Authored-By: Claude Opus 5.5 --- .../com/softwaremill/quicklens/QuicklensMacros.scala | 8 ++++---- .../scala/com/softwaremill/quicklens/LensLazyTest.scala | 2 +- .../test/scala/com/softwaremill/quicklens/LensTest.scala | 2 +- .../com/softwaremill/quicklens/SecondParamListTest.scala | 3 +-- 4 files changed, 7 insertions(+), 8 deletions(-) diff --git a/quicklens/src/main/scala-3/com/softwaremill/quicklens/QuicklensMacros.scala b/quicklens/src/main/scala-3/com/softwaremill/quicklens/QuicklensMacros.scala index f91b6c5..502efbf 100644 --- a/quicklens/src/main/scala-3/com/softwaremill/quicklens/QuicklensMacros.scala +++ b/quicklens/src/main/scala-3/com/softwaremill/quicklens/QuicklensMacros.scala @@ -77,10 +77,10 @@ object QuicklensMacros { symbols.toPathTree case (PathTree.Node(children), (symbol :: Nil)) => PathTree.Node { - if children.find(_._1 equiv symbol).isEmpty then children :+ (symbol -> Seq(PathTree.Empty)) + if children.find(_._1.equiv(symbol)).isEmpty then children :+ (symbol -> Seq(PathTree.Empty)) else children.map { - case (sym, trees) if sym equiv symbol => + case (sym, trees) if sym.equiv(symbol) => sym -> (trees :+ PathTree.Empty) case c => c } @@ -89,10 +89,10 @@ object QuicklensMacros { this case (PathTree.Node(children), (symbol :: tail)) => PathTree.Node { - if children.find(_._1 equiv symbol).isEmpty then children :+ (symbol -> Seq(tail.toPathTree)) + if children.find(_._1.equiv(symbol)).isEmpty then children :+ (symbol -> Seq(tail.toPathTree)) else children.map { - case (sym, trees) if sym equiv symbol => + case (sym, trees) if sym.equiv(symbol) => sym -> (trees.init ++ { trees.last match case PathTree.Empty => Seq(PathTree.Empty, tail.toPathTree) diff --git a/quicklens/src/test/scala/com/softwaremill/quicklens/LensLazyTest.scala b/quicklens/src/test/scala/com/softwaremill/quicklens/LensLazyTest.scala index 76a9f89..462050d 100644 --- a/quicklens/src/test/scala/com/softwaremill/quicklens/LensLazyTest.scala +++ b/quicklens/src/test/scala/com/softwaremill/quicklens/LensLazyTest.scala @@ -16,7 +16,7 @@ class LensLazyTest extends AnyFlatSpec with Matchers { val lens_a1_a3 = modifyLens[A1](_.a2.a3) val lens_a3_name = modifyLens[A3](_.a4.a5.name) - val lm = (lens_a1_a3 andThenModify lens_a3_name).using(duplicate) + val lm = lens_a1_a3.andThenModify(lens_a3_name).using(duplicate) lm(a1) should be(a1dup) } } diff --git a/quicklens/src/test/scala/com/softwaremill/quicklens/LensTest.scala b/quicklens/src/test/scala/com/softwaremill/quicklens/LensTest.scala index 8a004a0..bbaf58b 100644 --- a/quicklens/src/test/scala/com/softwaremill/quicklens/LensTest.scala +++ b/quicklens/src/test/scala/com/softwaremill/quicklens/LensTest.scala @@ -15,6 +15,6 @@ class LensTest extends AnyFlatSpec with Matchers { val lens_a1_a3 = modify(_: A1)(_.a2.a3) val lens_a3_name = modify(_: A3)(_.a4.a5.name) - (lens_a1_a3 andThenModify lens_a3_name)(a1).using(duplicate) should be(a1dup) + lens_a1_a3.andThenModify(lens_a3_name)(a1).using(duplicate) should be(a1dup) } } diff --git a/quicklens/src/test/scala/com/softwaremill/quicklens/SecondParamListTest.scala b/quicklens/src/test/scala/com/softwaremill/quicklens/SecondParamListTest.scala index 9cca121..8931f54 100644 --- a/quicklens/src/test/scala/com/softwaremill/quicklens/SecondParamListTest.scala +++ b/quicklens/src/test/scala/com/softwaremill/quicklens/SecondParamListTest.scala @@ -12,9 +12,8 @@ class SecondParamListTest extends AnyFlatSpec with Matchers { val d: Double = 1.0 - val state1 = State(true)(d) - implicit val dd: Double = d + val state1 = State(true) val state2 = state1.modify(_.inside).setTo(true) state1 should be(state2)