pjfanning opened a new pull request, #3651:
URL: https://github.com/apache/pekko/pull/3651

   ### Motivation
   
   `ProtobufSerializer` can serialize ScalaPB generated messages and the 
protobuf allow list already contains
   `scalapb.GeneratedMessageCompanion`, but users had to add a 
`scalapb.GeneratedMessage` serialization binding
   themselves.
   
   ### Modification
   
   - Add an optional `"scalapb.GeneratedMessage" = proto` serialization binding 
to the remote `reference.conf`.
   - `Serialization` only uses that binding when `scalapb.GeneratedMessage` can 
be loaded, in the same way as the
     optional `com.google.protobuf` binding.
   - Mention the binding in the serialization docs.
   - Test in `ProtobufSerializerSpec` that the binding is configured but 
skipped when ScalaPB is not on the classpath.
   
   ### Result
   
   ScalaPB messages are serialized with `ProtobufSerializer` out of the box 
when ScalaPB is on the classpath.
   Nothing changes for applications without ScalaPB.
   
   ### Tests
   
   Not run locally - left to CI
   
   ### References
   Ported from (Apache-2.0 since 2026-10-23):
   - https://github.com/akka/akka-core/pull/32070
   
   ### Notes for reviewers
   - Rolling upgrade: applications that have ScalaPB on the classpath and 
relied on another binding for ScalaPB
     messages (for example a binding on a shared marker trait) may now pick 
`ProtobufSerializer`, because
     `scalapb.GeneratedMessage` can be the more specific match (or an ambiguity 
warning is logged). During a rolling
     upgrade, old and new nodes could then use different serializers for the 
same messages. Such applications can opt
     out with `"scalapb.GeneratedMessage" = none` in 
`pekko.actor.serialization-bindings`. Worth a line in the
     release notes / migration guide.
   - No MiMa excludes; only a private method was added to `Serialization`.
   - ScalaPB is not a Pekko dependency; the positive case (ScalaPB on the 
classpath) is not covered by a test.
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to