From 2842813ee627176ca1f91c0bc862cf0e5daceee8 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 22 Sep 2024 01:48:00 +0100 Subject: [PATCH 1/9] protobuf 4.28.2 --- .scala-steward.conf | 3 --- .../apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy | 2 +- maven-plugin/src/main/maven/plugin.xml | 4 ++-- project/Dependencies.scala | 4 ++-- 4 files changed, 5 insertions(+), 8 deletions(-) diff --git a/.scala-steward.conf b/.scala-steward.conf index afb66961..056620aa 100644 --- a/.scala-steward.conf +++ b/.scala-steward.conf @@ -15,9 +15,6 @@ updates.pin = [ # Scala 3.3 is a LTS { groupId = "org.scala-lang", artifactId = "scala3-library", version = "3.3." } - # when we update to protobuf 4.x we probably need to update a bunch of libraries - # in tandem, and possibly schedule this for a major pekko-grpc release - { groupId = "com.google.protobuf", version = "3." } # Issues when using GRPC 1.68+ - https://github.com/apache/pekko-grpc/pull/397 { groupId = "io.grpc", version = "1.67." } diff --git a/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy b/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy index 74d4a12c..3fa6b8c6 100644 --- a/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy +++ b/gradle-plugin/src/main/groovy/org/apache/pekko/grpc/gradle/PekkoGrpcPluginExtension.groovy @@ -14,7 +14,7 @@ import org.gradle.api.Project class PekkoGrpcPluginExtension { - static final String PROTOC_VERSION = "3.25.5" // checked synced by VersionSyncCheckPlugin + static final String PROTOC_VERSION = "4.28.2" // checked synced by VersionSyncCheckPlugin static final String PROTOC_PLUGIN_SCALA_VERSION = "2.12" diff --git a/maven-plugin/src/main/maven/plugin.xml b/maven-plugin/src/main/maven/plugin.xml index 18a8bc38..9bf1470f 100644 --- a/maven-plugin/src/main/maven/plugin.xml +++ b/maven-plugin/src/main/maven/plugin.xml @@ -95,7 +95,7 @@ ${pekko-grpc.protoPaths} ${pekko-grpc.outputDirectory} - ${pekko-grpc.protoc-version} + ${pekko-grpc.protoc-version} @@ -187,7 +187,7 @@ ${pekko-grpc.protoPaths} ${pekko-grpc.outputDirectory} - ${pekko-grpc.protoc-version} + ${pekko-grpc.protoc-version} diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 319b5480..23fe01cb 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -36,8 +36,8 @@ object Dependencies { // Even referenced explicitly in the sbt-plugin's sbt-tests // If changing this, remember to update protoc plugin version to align in // maven-plugin/src/main/maven/plugin.xml and org.apache.pekko.grpc.sbt.PekkoGrpcPlugin - val googleProtoc = "3.25.5" // checked synced by VersionSyncCheckPlugin - val googleProtobufJava = "3.25.5" + val googleProtobufJava = "4.28.2" + val googleProtoc = googleProtobufJava // checked synced by VersionSyncCheckPlugin val scalaTest = "3.2.19" From 4203bf1da49b7bb13d21424ed9659410f019c010 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 22 Sep 2024 11:20:55 +0100 Subject: [PATCH 2/9] try scalapb snapshot --- build.sbt | 1 + project/plugins.sbt | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/build.sbt b/build.sbt index 4986ba78..f727acd0 100644 --- a/build.sbt +++ b/build.sbt @@ -20,6 +20,7 @@ sourceDistName := "apache-pekko-grpc" sourceDistIncubating := false ThisBuild / versionScheme := Some(VersionScheme.SemVerSpec) ThisBuild / resolvers += Resolver.ApacheMavenStagingRepo +ThisBuild / resolvers += Resolver.sonatypeOssRepos("snapshots") commands := commands.value.filterNot { command => command.nameOption.exists { name => diff --git a/project/plugins.sbt b/project/plugins.sbt index fbb8be43..d2b96e70 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,6 +7,8 @@ * This file is part of the Apache Pekko project, derived from Akka. */ +resolvers += Resolver.sonatypeOssRepos("snapshots") + enablePlugins(BuildInfoPlugin) val sbtProtocV = "1.0.7" @@ -41,4 +43,4 @@ libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.3.2024011 // scripted testing libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value -libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.17" +libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.15+82-a1dd2d6c-SNAPSHOT" From 751ce4a68645bbda7059b8a510a13041111c3713 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 22 Sep 2024 11:23:40 +0100 Subject: [PATCH 3/9] resolvers --- build.sbt | 2 +- project/plugins.sbt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/build.sbt b/build.sbt index f727acd0..bad9d379 100644 --- a/build.sbt +++ b/build.sbt @@ -20,7 +20,7 @@ sourceDistName := "apache-pekko-grpc" sourceDistIncubating := false ThisBuild / versionScheme := Some(VersionScheme.SemVerSpec) ThisBuild / resolvers += Resolver.ApacheMavenStagingRepo -ThisBuild / resolvers += Resolver.sonatypeOssRepos("snapshots") +ThisBuild / resolvers ++= Resolver.sonatypeOssRepos("snapshots") commands := commands.value.filterNot { command => command.nameOption.exists { name => diff --git a/project/plugins.sbt b/project/plugins.sbt index d2b96e70..127dd91f 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,7 +7,7 @@ * This file is part of the Apache Pekko project, derived from Akka. */ -resolvers += Resolver.sonatypeOssRepos("snapshots") +resolvers ++= Resolver.sonatypeOssRepos("snapshots") enablePlugins(BuildInfoPlugin) From 76e46d94f61dd1401f1c96ff316e9ecd2b7ac7cf Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 22 Sep 2024 11:30:49 +0100 Subject: [PATCH 4/9] try sbt-protoc snapshot --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 127dd91f..21dc1b6c 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,7 +11,7 @@ resolvers ++= Resolver.sonatypeOssRepos("snapshots") enablePlugins(BuildInfoPlugin) -val sbtProtocV = "1.0.7" +val sbtProtocV = "0.0.0+1-4f4f3b1e-SNAPSHOT" buildInfoKeys := Seq[BuildInfoKey]("sbtProtocVersion" -> sbtProtocV) From 48c77868d71eb40fd6d8819d978bfcc18f607cc0 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 1 Oct 2024 16:14:42 +0100 Subject: [PATCH 5/9] Update plugins.sbt --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index 21dc1b6c..f73fecfc 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -43,4 +43,4 @@ libraryDependencies += "org.eclipse.jgit" % "org.eclipse.jgit" % "5.13.3.2024011 // scripted testing libraryDependencies += "org.scala-sbt" %% "scripted-plugin" % sbtVersion.value -libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "0.11.15+82-a1dd2d6c-SNAPSHOT" +libraryDependencies += "com.thesamet.scalapb" %% "compilerplugin" % "1.0.0-alpha.1" From 1ab8468988f092b7bcc2c67613d19a6985ad077a Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 1 Oct 2024 16:56:02 +0100 Subject: [PATCH 6/9] Revert "try sbt-protoc snapshot" This reverts commit 377839ffd4dc76ed2fc168553944b70302b2020a. --- project/plugins.sbt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/project/plugins.sbt b/project/plugins.sbt index f73fecfc..8812c896 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -11,7 +11,7 @@ resolvers ++= Resolver.sonatypeOssRepos("snapshots") enablePlugins(BuildInfoPlugin) -val sbtProtocV = "0.0.0+1-4f4f3b1e-SNAPSHOT" +val sbtProtocV = "1.0.7" buildInfoKeys := Seq[BuildInfoKey]("sbtProtocVersion" -> sbtProtocV) From 42cdd916b9fdc8b70cca53698128f4cce94e2936 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 1 Oct 2024 17:11:02 +0100 Subject: [PATCH 7/9] try to fix plugin tests --- plugin-tester-scala/build.gradle | 1 + plugin-tester-scala/pom.xml | 5 +++++ project/plugins.sbt | 2 -- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugin-tester-scala/build.gradle b/plugin-tester-scala/build.gradle index 42edf46a..67b1ed60 100644 --- a/plugin-tester-scala/build.gradle +++ b/plugin-tester-scala/build.gradle @@ -26,6 +26,7 @@ def scalaBinaryVersion = "${scalaVersion.major}.${scalaVersion.minor}" dependencies { implementation "org.apache.pekko:pekko-http-cors_${scalaBinaryVersion}:1.1.0" implementation "org.scala-lang:scala-library:${scalaFullVersion}" + implementation 'com.google.protobuf:protobuf-java:4.28.2' testImplementation "org.apache.pekko:pekko-stream-testkit_${scalaBinaryVersion}:1.1.2" testImplementation "org.scalatest:scalatest_${scalaBinaryVersion}:3.2.19" testImplementation "org.scalatestplus:junit-4-13_${scalaBinaryVersion}:3.2.19.0" diff --git a/plugin-tester-scala/pom.xml b/plugin-tester-scala/pom.xml index 359b6b03..525c7fd4 100644 --- a/plugin-tester-scala/pom.xml +++ b/plugin-tester-scala/pom.xml @@ -39,6 +39,11 @@ pekko-http-cors_2.12 ${pekko.http.version} + + com.google.protobuf + protobuf-java + 4.28.2 + org.apache.pekko diff --git a/project/plugins.sbt b/project/plugins.sbt index 8812c896..8afc8f49 100644 --- a/project/plugins.sbt +++ b/project/plugins.sbt @@ -7,8 +7,6 @@ * This file is part of the Apache Pekko project, derived from Akka. */ -resolvers ++= Resolver.sonatypeOssRepos("snapshots") - enablePlugins(BuildInfoPlugin) val sbtProtocV = "1.0.7" From 5eb89d7ed060b67ed9d01157e1ad868cd84ab24d Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Tue, 1 Oct 2024 17:21:22 +0100 Subject: [PATCH 8/9] try again --- plugin-tester-scala/pom.xml | 5 ----- project/Dependencies.scala | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/plugin-tester-scala/pom.xml b/plugin-tester-scala/pom.xml index 525c7fd4..359b6b03 100644 --- a/plugin-tester-scala/pom.xml +++ b/plugin-tester-scala/pom.xml @@ -39,11 +39,6 @@ pekko-http-cors_2.12 ${pekko.http.version} - - com.google.protobuf - protobuf-java - 4.28.2 - org.apache.pekko diff --git a/project/Dependencies.scala b/project/Dependencies.scala index 23fe01cb..ad6f05ca 100644 --- a/project/Dependencies.scala +++ b/project/Dependencies.scala @@ -130,5 +130,6 @@ object Dependencies { Compile.grpcStub, Test.scalaTest, Test.scalaTestPlusJunit, + Protobuf.protobufJava, Protobuf.googleCommonProtos) } From 38b33cf282cc03d880a9422368e13ee557e714f7 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Sun, 10 Nov 2024 20:52:52 +0100 Subject: [PATCH 9/9] Update build.sbt --- build.sbt | 1 + 1 file changed, 1 insertion(+) diff --git a/build.sbt b/build.sbt index bad9d379..d1a70bf9 100644 --- a/build.sbt +++ b/build.sbt @@ -292,6 +292,7 @@ lazy val pluginTesterScala = Project(id = "plugin-tester-scala", base = file("pl fork := true, crossScalaVersions := Dependencies.Versions.CrossScalaForLib, scalaVersion := scala212, + PB.protocVersion := Dependencies.Versions.googleProtoc, ReflectiveCodeGen.codeGeneratorSettings ++= Seq("flat_package", "server_power_apis")) .pluginTestingSettings .enablePlugins(NoPublish)