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

Head commit for run:
472e62983dcf2676e501530191326eb88327cfa6 / PJ Fanning 
<[email protected]>
Widen Java DSL parameters with wildcard bounds and Iterable

Motivation:
Java generics are invariant, so several javadsl parameters reject values a
Java user would reasonably pass: a List<Source<T, NotUsed>> variable where a
List<Source<T, ?>> is expected, a List<ItemAdded> where List<Event> is
expected, a Function<Out, List<T>> where Function<Out, Iterable<T>> is
expected, or a PartialFunction built by PFBuilder with a concrete Source
result. The same operators were also bounded inconsistently across Source,
Flow, SubFlow and SubSource.

Modification:
- Take java.lang.Iterable[? <: Graph[...]] instead of java.util.List for the
  javadsl collections of graphs: Source.combine, zipN, zipWithN,
  mergePrioritizedN (Iterable[? <: Pair[? <: Graph[...], Integer]]),
  Sink.combine, and mergeAll / interleaveAll on Source, Flow, SubFlow and
  SubSource.
- Take java.lang.Iterable[? <: Event] in javadsl Effect.persist.
- Add ? <: bounds to the function results of mapConcat, statefulMapConcat,
  recoverWith, recoverWithRetries and the combine fan-in / fan-out
  strategies where sibling operators already had them.
- Add MiMa excludes for the changed signatures.

Result:
Java callers can pass any Iterable and pre-typed values with narrower
generic types without casts or explicit re-typing. Java source
compatibility is preserved; the List -> Iterable change alters the erased
descriptors, so code compiled against 1.x must be recompiled.

Tests:
- sbt "stream-tests/testOnly org.apache.pekko.stream.javadsl.SourceTest 
org.apache.pekko.stream.javadsl.SinkTest 
org.apache.pekko.stream.javadsl.FlowTest" - 235 passed
- sbt "persistence-typed-tests/testOnly 
org.apache.pekko.persistence.typed.javadsl.EventSourcedBehaviorJavaDslTest" - 
15 passed
- sbt "stream/mimaReportBinaryIssues" 
"persistence-typed/mimaReportBinaryIssues" - passed with the added excludes
- The new Java tests fail to compile against the main sources (40 errors in 
stream-tests, 1 in persistence-typed-tests)

References:
Refs #3712

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

With regards,
GitHub Actions via GitBox


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

Reply via email to