This is an automated email from the ASF dual-hosted git repository.
He-Pin pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/pekko.git
The following commit(s) were added to refs/heads/main by this push:
new 4973f2e6e9 chore(stream): remove internal FanOut Unzip (#2873)
4973f2e6e9 is described below
commit 4973f2e6e91df124bda44511e5910f5805e80c99
Author: He-Pin(kerr) <[email protected]>
AuthorDate: Sun Apr 19 16:49:09 2026 +0800
chore(stream): remove internal FanOut Unzip (#2873)
Motivation:
Public Unzip is already GraphStage-based, while stream.impl.FanOut still
carried an unused internal actor-backed Unzip implementation. Keeping that dead
code makes issue #2860 harder to reason about and still leaves binary-visible
legacy symbols behind on the 2.0.x line.
Modification:
Remove the internal impl.Unzip object/class from FanOut.scala and add a
2.0.x MiMa exclude file for the deleted binary-visible symbols.
Result:
The dead internal Unzip cleanup now stands alone as a small, reviewable
slice with unchanged public Unzip behavior and green compile/MiMa/spec
validation.
References:
apache/pekko#2860
---
.../remove-internal-unzip.excludes | 20 +++++++++++++
.../org/apache/pekko/stream/impl/FanOut.scala | 34 ----------------------
2 files changed, 20 insertions(+), 34 deletions(-)
diff --git
a/stream/src/main/mima-filters/2.0.x.backwards.excludes/remove-internal-unzip.excludes
b/stream/src/main/mima-filters/2.0.x.backwards.excludes/remove-internal-unzip.excludes
new file mode 100644
index 0000000000..c3d8231dec
--- /dev/null
+++
b/stream/src/main/mima-filters/2.0.x.backwards.excludes/remove-internal-unzip.excludes
@@ -0,0 +1,20 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements. See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership. The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License. You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied. See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# Remove internal legacy Unzip implementation
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.stream.impl.Unzip")
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.stream.impl.Unzip$")
diff --git a/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala
b/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala
index f3265f76ad..c8b2a12e48 100644
--- a/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala
+++ b/stream/src/main/scala/org/apache/pekko/stream/impl/FanOut.scala
@@ -313,37 +313,3 @@ import org.reactivestreams.Subscription
def receive = primaryInputs.subreceive.orElse[Any,
Unit](outputBunch.subreceive)
}
-
-/**
- * INTERNAL API
- */
-@InternalApi private[pekko] object Unzip {
- def props(attributes: Attributes): Props =
- Props(new Unzip(attributes)).withDeploy(Deploy.local)
-}
-
-/**
- * INTERNAL API
- */
-@InternalApi private[pekko] class Unzip(attributes: Attributes) extends
FanOut(attributes, outputCount = 2) {
- outputBunch.markAllOutputs()
-
- initialPhase(
- 1,
- TransferPhase(primaryInputs.NeedsInput && outputBunch.AllOfMarkedOutputs)
{ () =>
- primaryInputs.dequeueInputElement() match {
- case (a, b) =>
- outputBunch.enqueue(0, a)
- outputBunch.enqueue(1, b)
-
- case t: pekko.japi.Pair[_, _] =>
- outputBunch.enqueue(0, t.first)
- outputBunch.enqueue(1, t.second)
-
- case t =>
- throw new IllegalArgumentException(
- s"Unable to unzip elements of type ${t.getClass.getName}, " +
- s"can only handle Tuple2 and org.apache.pekko.japi.Pair!")
- }
- })
-}
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]