From 3c220f66bd90ed377bd8c2f7b400ad2fff78ab42 Mon Sep 17 00:00:00 2001 From: scala-steward <162267+scala-steward-for-moia[bot]@users.noreply.github.com> Date: Mon, 4 Mar 2024 10:30:37 +0000 Subject: [PATCH 1/3] Upgrade scala-library from 2.13.11 to 2.13.13 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 15bfe2c..44cfa21 100644 --- a/build.sbt +++ b/build.sbt @@ -68,7 +68,7 @@ lazy val commonSettings = Seq.concat( lazy val compilerSettings = Seq( scalaVersion := crossScalaVersions.value.head, - crossScalaVersions := List("2.13.11", "2.12.18"), + crossScalaVersions := List("2.13.13", "2.12.18"), Compile / packageBin / mappings += (ThisBuild / baseDirectory).value / "LICENSE" -> "LICENSE", scalacOptions ++= (CrossVersion.partialVersion(scalaVersion.value) match { case Some((2, 12)) => scalacOptions_2_12 From cc2eb91b79c55179acb2201feb5f91b92169d8df Mon Sep 17 00:00:00 2001 From: saeltz Date: Mon, 4 Mar 2024 14:58:28 +0100 Subject: [PATCH 2/3] Update scapegoat to 2.1.5 --- build.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 44cfa21..54c7e8e 100644 --- a/build.sbt +++ b/build.sbt @@ -39,7 +39,7 @@ lazy val library = new { val scalaCheck = "1.17.0" val scalaTest = "3.2.18" val scalaTestPlusCheck = "3.2.14.0" - val scapeGoat = "2.1.4" + val scapeGoat = "2.1.5" val scalaCollectionCompat = "2.11.0" } From cf54160a932b2538f83c645a080c9b4d304412e3 Mon Sep 17 00:00:00 2001 From: saeltz Date: Tue, 5 Mar 2024 08:44:30 +0100 Subject: [PATCH 3/3] Pass boolean literals using named arguments --- .../teleproto/ProtocolBuffersMigrationHierarchyTest.scala | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/test/scala/io/moia/protos/teleproto/ProtocolBuffersMigrationHierarchyTest.scala b/src/test/scala/io/moia/protos/teleproto/ProtocolBuffersMigrationHierarchyTest.scala index 487cb90..9826537 100644 --- a/src/test/scala/io/moia/protos/teleproto/ProtocolBuffersMigrationHierarchyTest.scala +++ b/src/test/scala/io/moia/protos/teleproto/ProtocolBuffersMigrationHierarchyTest.scala @@ -34,7 +34,7 @@ object ProtocolBuffersMigrationHierarchyTest { ProtocolBuffers.migration[UnmatchingSubProtoV1, UnmatchingSubProtoV2](_.foo.toString) implicit val protoV1toV2: Migration[ProtoV1, ProtoV2] = - ProtocolBuffers.migration[ProtoV1, ProtoV2](pb => List.fill(pb.passengers)(PassengerV2(true))) + ProtocolBuffers.migration[ProtoV1, ProtoV2](pb => List.fill(pb.passengers)(PassengerV2(adult = true))) } class ProtocolBuffersMigrationHierarchyTest extends UnitTest { @@ -46,13 +46,13 @@ class ProtocolBuffersMigrationHierarchyTest extends UnitTest { "construct a migration from generated and manual nested migrations" in { protoV1toV2.migrate(ProtoV1(Some(MatchingSubProtoV1("same")), UnmatchingSubProtoV1(42, ThirdLevelV1("ok")), 1)) shouldBe - ProtoV2(Some(MatchingSubProtoV2("same")), UnmatchingSubProtoV2("42", ThirdLevelV2("ok")), List(PassengerV2(true))) + ProtoV2(Some(MatchingSubProtoV2("same")), UnmatchingSubProtoV2("42", ThirdLevelV2("ok")), List(PassengerV2(adult = true))) protoV1toV2.migrate(ProtoV1(Some(MatchingSubProtoV1("same")), UnmatchingSubProtoV1(42, ThirdLevelV1("ok")), 2)) shouldBe ProtoV2( Some(MatchingSubProtoV2("same")), UnmatchingSubProtoV2("42", ThirdLevelV2("ok")), - List(PassengerV2(true), PassengerV2(true)) + List(PassengerV2(adult = true), PassengerV2(adult = true)) ) protoV1toV2.migrate(ProtoV1(None, UnmatchingSubProtoV1(42, ThirdLevelV1("ok")), 0)) shouldBe @@ -66,7 +66,7 @@ class ProtocolBuffersMigrationHierarchyTest extends UnitTest { Migration[MatchingSubProtoV1, MatchingSubProtoV2](src => MatchingSubProtoV2(src.same.toUpperCase)) val customProtoV1toV2: Migration[ProtoV1, ProtoV2] = - ProtocolBuffers.migration[ProtoV1, ProtoV2](pb => List.fill(pb.passengers)(PassengerV2(true))) + ProtocolBuffers.migration[ProtoV1, ProtoV2](pb => List.fill(pb.passengers)(PassengerV2(adult = true))) customProtoV1toV2.migrate(ProtoV1(Some(MatchingSubProtoV1("same")), UnmatchingSubProtoV1(42, ThirdLevelV1("ok")), 0)) shouldBe ProtoV2(Some(MatchingSubProtoV2("SAME")), UnmatchingSubProtoV2("42", ThirdLevelV2("ok")), Nil)