This is an automated email from the ASF dual-hosted git repository.
pjfanning pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko-grpc.git
The following commit(s) were added to refs/heads/main by this push:
new d9b08593 Codegen fix (#713)
d9b08593 is described below
commit d9b0859308565509829c8f4fd2760eb7fe697a4d
Author: PJ Fanning <[email protected]>
AuthorDate: Fri May 29 23:28:25 2026 +0100
Codegen fix (#713)
* try to fix build
* Update build.sbt
* revert ci change
* maven-plugin issue
* Update AbstractGenerateMojo.scala
---
.github/workflows/publish-nightly.yml | 1 +
.github/workflows/stage-release-candidate.yml | 1 +
build.sbt | 1 -
codegen/src/main/scala/org/apache/pekko/grpc/gen/Main.scala | 3 +++
.../main/scala/org/apache/pekko/grpc/maven/AbstractGenerateMojo.scala | 4 ++++
project/Dependencies.scala | 4 +++-
6 files changed, 12 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/publish-nightly.yml
b/.github/workflows/publish-nightly.yml
index dce9b3ea..caee80d2 100644
--- a/.github/workflows/publish-nightly.yml
+++ b/.github/workflows/publish-nightly.yml
@@ -38,6 +38,7 @@ jobs:
run: |-
cp .jvmopts-ci .jvmopts
sbt +publish
+ sbt ++2.12.21! maven-plugin/publish
sbt ++2.13.18! codegen/publish
sbt ++3.3.7! codegen/publish
env:
diff --git a/.github/workflows/stage-release-candidate.yml
b/.github/workflows/stage-release-candidate.yml
index f9375d34..0ee34ff0 100644
--- a/.github/workflows/stage-release-candidate.yml
+++ b/.github/workflows/stage-release-candidate.yml
@@ -229,6 +229,7 @@ jobs:
echo "$PEKKO_GPG_SECRET_KEY" | gpg --batch --import --import-options
import-show
sbt "set ThisBuild / version := \"$VERSION\"; +publishSigned"
+ sbt "set ThisBuild / version := \"$VERSION\"; ++2.12.21!
maven-plugin/publishSigned"
sbt "set ThisBuild / version := \"$VERSION\"; ++2.13.18!
codegen/publishSigned"
sbt "set ThisBuild / version := \"$VERSION\"; ++3.3.7!
codegen/publishSigned"
sbt "set ThisBuild / version := \"$VERSION\"; sonatypePrepare; set
ThisBuild / version := \"$VERSION\"; sonatypeBundleUpload; sonatypeClose"
diff --git a/build.sbt b/build.sbt
index 477c60e4..05e401cd 100644
--- a/build.sbt
+++ b/build.sbt
@@ -168,7 +168,6 @@ lazy val sbtPlugin = Project(id = "sbt-plugin", base =
file("sbt-plugin"))
.settings(
name := s"$pekkoPrefix-sbt-plugin",
sbtPluginPublishLegacyMavenStyle := true,
- addSbtPlugin("com.github.sbt" % "sbt2-compat" % "0.1.0"),
pluginCrossBuild / sbtVersion := {
scalaBinaryVersion.value match {
case "2.12" => "1.12.11"
diff --git a/codegen/src/main/scala/org/apache/pekko/grpc/gen/Main.scala
b/codegen/src/main/scala/org/apache/pekko/grpc/gen/Main.scala
index bfe29ea8..b50d4648 100644
--- a/codegen/src/main/scala/org/apache/pekko/grpc/gen/Main.scala
+++ b/codegen/src/main/scala/org/apache/pekko/grpc/gen/Main.scala
@@ -16,12 +16,15 @@ package org.apache.pekko.grpc.gen
import java.io.ByteArrayOutputStream
import java.net.URLDecoder
+import scala.annotation.nowarn
+
import com.google.protobuf.compiler.PluginProtos.CodeGeneratorRequest
import org.apache.pekko
import pekko.grpc.gen.javadsl.{ JavaClientCodeGenerator,
JavaInterfaceCodeGenerator, JavaServerCodeGenerator }
import pekko.grpc.gen.scaladsl.{ ScalaClientCodeGenerator,
ScalaServerCodeGenerator, ScalaTraitCodeGenerator }
// This is the protoc plugin that the gradle plugin uses
+@nowarn("msg=deprecated")
object Main extends App {
val inBytes: Array[Byte] = {
val baos = new ByteArrayOutputStream(math.max(64, System.in.available()))
diff --git
a/maven-plugin/src/main/scala/org/apache/pekko/grpc/maven/AbstractGenerateMojo.scala
b/maven-plugin/src/main/scala/org/apache/pekko/grpc/maven/AbstractGenerateMojo.scala
index 81f574e7..8f3cb45c 100644
---
a/maven-plugin/src/main/scala/org/apache/pekko/grpc/maven/AbstractGenerateMojo.scala
+++
b/maven-plugin/src/main/scala/org/apache/pekko/grpc/maven/AbstractGenerateMojo.scala
@@ -14,6 +14,7 @@
package org.apache.pekko.grpc.maven
import java.io.{ ByteArrayOutputStream, File, PrintStream }
+
import org.apache.pekko
import pekko.grpc.gen.{ CodeGenerator, Logger, ProtocSettings }
import pekko.grpc.gen.javadsl.{ JavaClientCodeGenerator,
JavaInterfaceCodeGenerator, JavaServerCodeGenerator }
@@ -26,9 +27,11 @@ import org.sonatype.plexus.build.incremental.BuildContext
import protocbridge.{ JvmGenerator, ProtocRunner, Target }
import scalapb.ScalaPbCodeGenerator
+import scala.annotation.nowarn
import scala.beans.BeanProperty
import scala.util.control.NoStackTrace
+@nowarn("msg=deprecated")
object AbstractGenerateMojo {
case class ProtocError(file: String, line: Int, pos: Int, message: String)
private val ProtocErrorRegex = """(\w+\.\w+):(\d+):(\d+):\s(.*)""".r
@@ -94,6 +97,7 @@ object AbstractGenerateMojo {
}
}
+@nowarn("msg=deprecated")
abstract class AbstractGenerateMojo @Inject() (buildContext: BuildContext)
extends AbstractMojo {
import AbstractGenerateMojo._
diff --git a/project/Dependencies.scala b/project/Dependencies.scala
index 10e6dc51..cb3e58c4 100644
--- a/project/Dependencies.scala
+++ b/project/Dependencies.scala
@@ -88,6 +88,7 @@ object Dependencies {
object Plugins {
val sbtProtoc = "com.thesamet" % "sbt-protoc" % BuildInfo.sbtProtocVersion
+ val sbt2Compat = "com.github.sbt" % "sbt2-compat" % "0.1.0"
}
private lazy val l = libraryDependencies
@@ -119,7 +120,8 @@ object Dependencies {
lazy val sbtPlugin = Seq(
l += Compile.scalapbCompilerPlugin,
// we depend on it in the settings of the plugin since we set keys of the
sbt-protoc plugin
- addSbtPlugin(Plugins.sbtProtoc))
+ addSbtPlugin(Plugins.sbtProtoc),
+ addSbtPlugin(Plugins.sbt2Compat))
lazy val interopTests = l ++= Seq(
Compile.grpcInteropTesting,
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]