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-projection.git
The following commit(s) were added to refs/heads/main by this push:
new 7d2a05f4 upgrade to protobuf 4.35.0 (#513)
7d2a05f4 is described below
commit 7d2a05f4f2c206c11f458b88dbdb420f7937c7ee
Author: PJ Fanning <[email protected]>
AuthorDate: Tue Jun 16 14:23:07 2026 +0100
upgrade to protobuf 4.35.0 (#513)
* protobuf 4
* Update ProtoAnySerialization.scala
* remove staging repo resolver
* Update plugins.sbt
---
.../projection/grpc/internal/ProtoAnySerialization.scala | 14 ++++++++++++--
project/plugins.sbt | 2 +-
2 files changed, 13 insertions(+), 3 deletions(-)
diff --git
a/grpc/src/main/scala/org/apache/pekko/projection/grpc/internal/ProtoAnySerialization.scala
b/grpc/src/main/scala/org/apache/pekko/projection/grpc/internal/ProtoAnySerialization.scala
index 23d8b2ac..a9a0dc4f 100644
---
a/grpc/src/main/scala/org/apache/pekko/projection/grpc/internal/ProtoAnySerialization.scala
+++
b/grpc/src/main/scala/org/apache/pekko/projection/grpc/internal/ProtoAnySerialization.scala
@@ -245,13 +245,23 @@ import scalapb.options.Scalapb
}
}
+ private def hasExtension[ContainerT <:
com.google.protobuf.GeneratedMessage.ExtendableMessage[ContainerT], T](
+ msg:
com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder[ContainerT],
+ ext: com.google.protobuf.GeneratedMessage.GeneratedExtension[ContainerT,
T]
+ ): Boolean = msg.hasExtension(ext)
+
+ private def getExtension[ContainerT <:
com.google.protobuf.GeneratedMessage.ExtendableMessage[ContainerT], T](
+ msg:
com.google.protobuf.GeneratedMessage.ExtendableMessageOrBuilder[ContainerT],
+ ext: com.google.protobuf.GeneratedMessage.GeneratedExtension[ContainerT,
T]
+ ): T = msg.getExtension(ext)
+
private def tryResolveScalaPbType(typeDescriptor: Descriptors.Descriptor):
Option[ScalaPbResolvedType[Nothing]] = {
// todo - attempt to load the package.proto file for this package to get
default options from there
val fileDescriptor = typeDescriptor.getFile
val options = fileDescriptor.getOptions
val scalaOptions: Scalapb.ScalaPbOptions =
- if (options.hasExtension(Scalapb.options)) {
- options.getExtension(Scalapb.options)
+ if (hasExtension(options, Scalapb.options)) {
+ getExtension(options, Scalapb.options)
} else Scalapb.ScalaPbOptions.getDefaultInstance
// Firstly, determine the java package
diff --git a/project/plugins.sbt b/project/plugins.sbt
index 8b160e47..fabebcdc 100644
--- a/project/plugins.sbt
+++ b/project/plugins.sbt
@@ -28,4 +28,4 @@ addSbtPlugin("com.lightbend.paradox" % "sbt-paradox" %
"0.10.7")
addSbtPlugin("com.typesafe" % "sbt-mima-plugin" % "1.1.5")
addSbtPlugin("com.lightbend.sbt" % "sbt-bill-of-materials" % "1.0.2")
-addSbtPlugin("org.apache.pekko" % "pekko-grpc-sbt-plugin" % "2.0.0-M1")
+addSbtPlugin("org.apache.pekko" % "pekko-grpc-sbt-plugin" % "2.0.0-M2")
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]