This is an automated email from the ASF dual-hosted git repository.

hepin pushed a commit to branch ccFutures
in repository https://gitbox.apache.org/repos/asf/pekko.git

commit 9b62fc0edf1f34b8d8326a865a469f67ac8cc877
Author: He-Pin <[email protected]>
AuthorDate: Sun Sep 14 00:18:06 2025 +0800

    chore: Remove compat Future
---
 .../remove-scala-2.12-support.excludes             |  2 +
 .../scala/org/apache/pekko/compat/Future.scala     | 59 ----------------------
 .../scala/org/apache/pekko/remote/Remoting.scala   |  2 +-
 3 files changed, 3 insertions(+), 60 deletions(-)

diff --git 
a/actor/src/main/mima-filters/2.0.x.backwards.excludes/remove-scala-2.12-support.excludes
 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/remove-scala-2.12-support.excludes
index 8f0cad9a35..c1818cb74f 100644
--- 
a/actor/src/main/mima-filters/2.0.x.backwards.excludes/remove-scala-2.12-support.excludes
+++ 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/remove-scala-2.12-support.excludes
@@ -19,3 +19,5 @@
 
ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.compat.PartialFunction")
 
ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.compat.PartialFunction$")
 
ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.util.ccompat.ccompatUsedUntil213")
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.compat.Future")
+ProblemFilters.exclude[MissingClassProblem]("org.apache.pekko.compat.Future$")
diff --git a/actor/src/main/scala/org/apache/pekko/compat/Future.scala 
b/actor/src/main/scala/org/apache/pekko/compat/Future.scala
deleted file mode 100644
index 1d962d5d93..0000000000
--- a/actor/src/main/scala/org/apache/pekko/compat/Future.scala
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * license agreements; and to You under the Apache License, version 2.0:
- *
- *   https://www.apache.org/licenses/LICENSE-2.0
- *
- * This file is part of the Apache Pekko project, which was derived from Akka.
- */
-
-/*
- * Copyright (C) 2009-2022 Lightbend Inc. <https://www.lightbend.com>
- */
-
-package org.apache.pekko.compat
-
-import scala.collection.immutable
-import scala.concurrent.{ ExecutionContext, Future => SFuture }
-
-import org.apache.pekko.annotation.InternalApi
-
-/**
- * INTERNAL API
- *
- * Compatibility wrapper for `scala.concurrent.Future` to be able to compile 
the same code
- * against Scala 2.12, 2.13
- *
- * Remove these classes as soon as support for Scala 2.12 is dropped!
- */
-@InternalApi private[pekko] object Future {
-  def fold[T, R](futures: IterableOnce[SFuture[T]])(zero: R)(op: (R, T) => R)(
-      implicit executor: ExecutionContext): SFuture[R] = {
-    // This will have performance implications since the elements are copied 
to a Vector
-    SFuture.foldLeft[T, 
R](futures.iterator.to(immutable.Iterable))(zero)(op)(executor)
-  }
-
-  def fold[T, R](futures: immutable.Iterable[SFuture[T]])(zero: R)(op: (R, T) 
=> R)(
-      implicit executor: ExecutionContext): SFuture[R] =
-    SFuture.foldLeft[T, R](futures)(zero)(op)(executor)
-
-  def reduce[T, R >: T](futures: IterableOnce[SFuture[T]])(op: (R, T) => R)(
-      implicit executor: ExecutionContext): SFuture[R] = {
-    // This will have performance implications since the elements are copied 
to a Vector
-    SFuture.reduceLeft[T, 
R](futures.iterator.to(immutable.Iterable))(op)(executor)
-  }
-
-  def reduce[T, R >: T](futures: immutable.Iterable[SFuture[T]])(op: (R, T) => 
R)(
-      implicit executor: ExecutionContext): SFuture[R] =
-    SFuture.reduceLeft[T, R](futures)(op)(executor)
-
-  def find[T](futures: IterableOnce[SFuture[T]])(p: T => Boolean)(
-      implicit executor: ExecutionContext): SFuture[Option[T]] = {
-    // This will have performance implications since the elements are copied 
to a Vector
-    SFuture.find[T](futures.iterator.to(immutable.Iterable))(p)(executor)
-  }
-
-  def find[T](futures: immutable.Iterable[SFuture[T]])(p: T => Boolean)(
-      implicit executor: ExecutionContext): SFuture[Option[T]] =
-    SFuture.find[T](futures)(p)(executor)
-}
diff --git a/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala 
b/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala
index 51a7deae0f..629eeb3c5e 100644
--- a/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala
+++ b/remote/src/main/scala/org/apache/pekko/remote/Remoting.scala
@@ -677,7 +677,7 @@ private[remote] class EndpointManager(conf: Config, log: 
LoggingAdapter)
     case ManagementCommand(cmd) =>
       val allStatuses: immutable.Seq[Future[Boolean]] =
         transportMapping.values.iterator.map(transport => 
transport.managementCommand(cmd)).to(immutable.IndexedSeq)
-      pekko.compat.Future.fold(allStatuses)(true)(_ && 
_).map(ManagementCommandAck.apply).pipeTo(sender())
+      Future.foldLeft(allStatuses)(true)(_ && 
_).map(ManagementCommandAck.apply).pipeTo(sender())
 
     case Quarantine(address, uidToQuarantineOption) =>
       // Stop writers


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

Reply via email to