Akka 29784 stateful map concat relax f ret type (#29792)

* akka-29730__register_newshells_when_no_active_interpreters: unrelated warnings that act as compilation errors on my env.

* akka-29730__register_newshells_when_no_active_interpreters: introduce a reproduction for akka-29730. actor interpreter failed to register new shells introduced by flatMapPrefix when the current interpreter has completed.

* akka-29730__register_newshells_when_no_active_interpreters: fix akka-29730

* akka-29730__register_newshells_when_no_active_interpreters: scalafmtAll

* Update akka-stream-tests/src/test/scala/akka/stream/scaladsl/FlowFlatMapPrefixSpec.scala

* akka-29730__register_newshells_when_no_active_interpreters: style

* akka-29730__register_newshells_when_no_active_interpreters: fmt

* akka-29730__register_newshells_when_no_active_interpreters: scalafmt

* akka-29730__register_newshells_when_no_active_interpreters: simplify shortCircuitBatch's condition.

* akka-29730__register_newshells_when_no_active_interpreters: salfmt

* akka-29730__register_newshells_when_no_active_interpreters: println => log.debug

* Update akka-stream/src/main/scala/akka/stream/impl/fusing/ActorGraphInterpreter.scala

Co-authored-by: eyal farago <eyal.farago@gmail.com>

* Update akka-stream-tests/src/test/scala/akka/stream/scaladsl/FlowFlatMapPrefixSpec.scala

* akka-29730__register_newshells_when_no_active_interpreters: tailrec shortCircuitBatch

* akka-29784__statefulMapConcat_relax_f_ret_type: modify scala dsl's statefulMapConcat and mapConcat to take a function returning an IterableOnce.

* akka-29784__statefulMapConcat_relax_f_ret_type: scalafmtall

* akka-29784__statefulMapConcat_relax_f_ret_type: remove redundant import.

* akka-29784__statefulMapConcat_relax_f_ret_type: remove another unused import.

* akka-29784__statefulMapConcat_relax_f_ret_type: organize imports and annotations around ccompat

* akka-29784__statefulMapConcat_relax_f_ret_type: scalafmtall

* akka-29784__statefulMapConcat_relax_f_ret_type: filter false negative MIMA issues.

* akka-29784__statefulMapConcat_relax_f_ret_type: flowWithCtx

* akka-29784__statefulMapConcat_relax_f_ret_type: avoid deprecated methods in scala 2.13

Co-authored-by: Johannes Rudolph <johannes.rudolph@gmail.com>
This commit is contained in:
eyal farago 2020-11-09 10:19:23 +02:00 committed by GitHub
parent bcee56f4b9
commit 1aaa2fb6bf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 61 additions and 28 deletions

View file

@ -6,32 +6,31 @@ package akka.stream.impl.fusing
import java.util.concurrent.TimeUnit.NANOSECONDS
import akka.actor.{ ActorRef, Terminated }
import akka.annotation.{ DoNotInherit, InternalApi }
import akka.event.Logging.LogLevel
import akka.event._
import akka.stream.ActorAttributes.SupervisionStrategy
import akka.stream.Attributes.{ InputBuffer, LogLevels }
import akka.stream.OverflowStrategies._
import akka.stream.impl.Stages.DefaultAttributes
import akka.stream.impl.fusing.GraphStages.SimpleLinearGraphStage
import akka.stream.impl.{ ReactiveStreamsCompliance, Buffer => BufferImpl }
import akka.stream.scaladsl.{ DelayStrategy, Source }
import akka.stream.stage._
import akka.stream.{ Supervision, _ }
import akka.util.{ unused, OptionVal }
import com.github.ghik.silencer.silent
import scala.annotation.tailrec
import scala.collection.immutable
import scala.collection.immutable.VectorBuilder
import scala.concurrent.Future
import scala.concurrent.duration.{ FiniteDuration, _ }
import scala.util.{ Failure, Success, Try }
import scala.util.control.{ NoStackTrace, NonFatal }
import scala.util.control.Exception.Catcher
import com.github.ghik.silencer.silent
import akka.actor.{ ActorRef, Terminated }
import akka.annotation.{ DoNotInherit, InternalApi }
import akka.event.{ LogMarker, LogSource, Logging, LoggingAdapter, MarkerLoggingAdapter }
import akka.event.Logging.LogLevel
import akka.stream.{ Supervision, _ }
import akka.stream.ActorAttributes.SupervisionStrategy
import akka.stream.Attributes.{ InputBuffer, LogLevels }
import akka.stream.OverflowStrategies._
import akka.stream.impl.{ ReactiveStreamsCompliance, Buffer => BufferImpl }
import akka.stream.impl.Stages.DefaultAttributes
import akka.stream.impl.fusing.GraphStages.SimpleLinearGraphStage
import akka.stream.scaladsl.{ DelayStrategy, Source }
import akka.stream.stage._
import akka.util.OptionVal
import akka.util.unused
import scala.util.control.{ NoStackTrace, NonFatal }
import scala.util.{ Failure, Success, Try }
import akka.util.ccompat._
/**
* INTERNAL API
@ -2159,7 +2158,9 @@ private[stream] object Collect {
/**
* INTERNAL API
*/
@InternalApi private[akka] final class StatefulMapConcat[In, Out](val f: () => In => immutable.Iterable[Out])
@InternalApi
@ccompatUsedUntil213
private[akka] final class StatefulMapConcat[In, Out](val f: () => In => IterableOnce[Out])
extends GraphStage[FlowShape[In, Out]] {
val in = Inlet[In]("StatefulMapConcat.in")
val out = Outlet[Out]("StatefulMapConcat.out")