He-Pin opened a new pull request, #3073: URL: https://github.com/apache/pekko/pull/3073
### Motivation In Scala 3.8, `[T: ClassTag]` context bounds desugar to `using` clauses, making explicit `ClassTag` passing positional-incompatible. Code patterns like `method(args)(ClassTag(clazz))` break when the method uses a context bound. ### Modification - Replace explicit `ClassTag` passing with `implicit val ct: ClassTag[T] = ClassTag(clazz)` followed by method calls that rely on implicit resolution, in `Behavior.scala`, `ProducerController.scala`, `WorkPullingProducerController.scala`, `Topic.scala`, `ConsistentHash.scala`, `ShardingProducerController.scala`, `EventSourcedBehaviorTestKit.scala`, `StreamTestKit.scala` - Use `.apply()` trick in `ActorContextSpec.scala`: `decoration[T].apply(behavior)` to separate implicit resolution from function application - Convert context bound `[T: ClassTag]` to explicit implicit parameter `(implicit ev: ClassTag[T])` in `Supervision.scala` - Merge context bound with separate implicit parameter list in `PersistencePlugin.scala`: `(implicit ct: ClassTag[T], ev: PluginProvider[...])` - Refactor `ShardedDaemonProcessImpl.scala` Java API methods to avoid explicit classTag passing - Fix `EventStream.scala` secondary constructor formatting ### Result All ClassTag-dependent code compiles with both Scala 2.13.18 and Scala 3.8.4. No behavioral changes. ### Tests - Not run - compilation fix, verified by cross-compilation ### References None - proactive Scala 3.8 forward compatibility -- 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]
