From cc501b11052c59b8ae94010173b15abdbcb8f19b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Piotr=20Sowi=C5=84ski?= Date: Sun, 22 Sep 2024 20:39:35 +0200 Subject: [PATCH] Update scalapb to 0.11.17 (#155) I've also removed the restrictions on updating it only when updating Pekko, that didn't make any sense... --- .scala-steward.conf | 4 ---- build.sbt | 6 ++---- project/Transform1.scala | 4 ++-- project/plugins.sbt | 2 +- 4 files changed, 5 insertions(+), 11 deletions(-) diff --git a/.scala-steward.conf b/.scala-steward.conf index 1525b245..a719d136 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -1,7 +1,3 @@ -updates.ignore = [ - { groupId = "com.thesamet.scalapb" } -] - pullRequests.grouping = [ { name = "pekko", diff --git a/build.sbt b/build.sbt index a10d4755..65c488d5 100644 --- a/build.sbt +++ b/build.sbt @@ -25,10 +25,8 @@ lazy val pekkoV = "1.1.1" lazy val pekkoGrpcV = "1.0.2" lazy val jenaV = "5.1.0" lazy val rdf4jV = "5.0.2" -// Must be synchronized to the version used by Pekko gRPC -// See: https://mvnrepository.com/artifact/org.apache.pekko/pekko-grpc-runtime_3 -// When updating also change the version in plugins.sbt -lazy val scalapbV = "0.11.13" +// !! When updating ScalaPB also change the version of the plugin in plugins.sbt +lazy val scalapbV = "0.11.17" lazy val protobufV = "3.25.5" // List of exclusions for the grpc module and its dependencies diff --git a/project/Transform1.scala b/project/Transform1.scala index 6279d4e9..e7cddc3e 100644 --- a/project/Transform1.scala +++ b/project/Transform1.scala @@ -15,8 +15,8 @@ object Transform1 { override def apply(tree: Tree): Tree = tree match { case Template.After_4_4_0(_, _, _, stats, _) => tree.asInstanceOf[Template].copy( stats = stats.flatMap { stat => stat match { - // Remove def asRecognized - case Defn.Def.After_4_7_3(_, Term.Name("asRecognized"), _, _, _) => None + // Keep def asRecognized as-is + case Defn.Def.After_4_7_3(_, Term.Name("asRecognized"), _, _, _) => Some(stat) // Transform def ... => Option[T] to def ... => T case Defn.Def.After_4_7_3(_, _, _, Some(Type.Apply.After_4_6_0(tpe, typeArgs)), term) if tpe.syntax == "_root_.scala.Option" => Some(stat.asInstanceOf[Defn.Def].copy( diff --git a/project/plugins.sbt b/project/plugins.sbt index 2c8e718c..d83b616d 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -4,6 +4,6 @@ addSbtPlugin("com.github.sbt" % "sbt-ci-release" % "1.6.1") addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "2.2.0") addDependencyTreePlugin -lazy val scalapbV = "0.11.13" +lazy val scalapbV = "0.11.17" libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % scalapbV