The GitHub Actions job "Binary Compatibility" on 
pekko.git/java-dsl-wildcard-bounds-typed has failed.
Run started by GitHub user pjfanning (triggered by pjfanning).

Head commit for run:
56fb668dbd080176ce747a6da5283004b077c0b7 / PJ Fanning 
<[email protected]>
Widen typed Java DSL function parameters with wildcard bounds

Motivation:
Java generics are invariant, so the javadsl APIs of the typed modules
reject pre-typed function values a Java user would reasonably pass, such
as a Function<Object, Behavior<String>> for Behaviors.receiveMessage, a
handler over CharSequence for onMessage(String.class, ...) or a
BiFunction over a supertype of the state for an event sourced command
handler. #3713, #3714, #3717 and #3719 cover the stream javadsl and
#3718 covers stream-typed; this covers the remaining modules.

Modification:
- Widen function-typed parameters (japi Function/Function2/Creator/
  Predicate/Procedure and java.util.function Function/BiFunction/
  Supplier/Consumer/BiConsumer/Predicate) of the javadsl in actor-typed,
  actor-testkit-typed, cluster-typed, cluster-sharding-typed,
  persistence-typed and persistence-testkit: inputs take ? >: and results
  ? <:, except on final types such as Boolean or String.
- Only final classes, objects and @DoNotInherit types are changed, so no
  user subclass can be broken; the internal implementations are updated
  to match. User-implemented types are left alone: the classic TestKit
  and EventFilter, coordination Lease and the persistence-query plugin
  query traits.
- The persistence-typed handler builders keep their internal invariant
  storage; the widened handlers and predicates are narrowed where they
  are stored.
- Add MiMa excludes for the generic signature changes.

Result:
Java callers can pass function values typed over a supertype of the
input or a subtype of the result without casts. Erasure is unchanged, so
the change is binary compatible.

Tests:
- sbt compile for the changed modules on Scala 2.13 and 3.3.8 - passed
- sbt Test/compile for actor-typed-tests, actor-testkit-typed,
  cluster-typed, cluster-sharding-typed, persistence-typed,
  persistence-typed-tests and persistence-testkit (Scala 2.13) - passed
- sbt mimaReportBinaryIssues for the changed modules - passed with the
  added excludes
- New directional tests (FunctionWildcardBoundsTest,
  EventSourcedBehaviorJavaDslTest.acceptHandlersTypedOverSupertypes) not
  run locally - left to CI

References:
Refs #3712, #3718

Report URL: https://github.com/apache/pekko/actions/runs/40557916601

With regards,
GitHub Actions via GitBox


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

Reply via email to