He-Pin opened a new pull request, #3082: URL: https://github.com/apache/pekko/pull/3082
### Motivation Scala 3.9.0-RC1 introduces breaking changes: 1. **Context bound desugaring**: `[T: ClassTag]` now desugars differently, making `method(args)(ClassTag(clazz))` fail with "No ClassTag available for T" 2. **Trait field bytecode**: `private val` in traits generates abstract setter methods with generic type signatures that mismatch between trait and implementing class, causing Java subclass compilation failures ### Modification - **actor-typed/Behaviors.scala**: Use `implicit val ct: ClassTag[T] = ClassTag(clazz)` + implicit resolution instead of explicit `ClassTag(clazz)` passing for `monitor`, `transformMessages`, and `withMdc` methods - **stream/Ops.scala**: Use `implicit val ls: LogSource[Materializer] = fromMaterializer` + implicit resolution instead of explicit passing for `Log` and `LogWithMarker` preStart methods - **actor/FSM.scala**, **persistence/PersistentFSMBase.scala**: Change `private val handleEventDefault` to `private def handleEventDefault` to avoid abstract setter generation for this specific field ### Result - ClassTag and LogSource context bound errors in actor-typed and stream modules are fully resolved - `handleEventDefault` setter issue is partially mitigated; remaining trait setter issues are tracked in scala/scala3#26372 as a Scala 3.9 compiler regression ### Tests - `sbt "++3.9.0-RC1!; compile"` — ClassTag/LogSource errors resolved ### References - scala/scala3#26372 — Trait `private val` setter generates generic signature that Java subclasses cannot implement (Scala 3.9 regression) - Related to #3073 which fixed similar ClassTag context bound issues for Scala 3.8 -- 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]
