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

mdedetrich 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 8ba5e48a1e Add back Scala 3 inline
8ba5e48a1e is described below

commit 8ba5e48a1e39e91325c9c7a1723217e70c438fd7
Author: Matthew de Detrich <[email protected]>
AuthorDate: Thu Jul 31 10:19:24 2025 +0200

    Add back Scala 3 inline
---
 .../future-converters.excludes                     | 22 +++++++++++++
 .../java-duration-converters.excludes              | 22 +++++++++++++
 .../option-converters.excludes                     | 38 ++++++++++++++++++++++
 .../org/apache/pekko/compat/PartialFunction.scala  |  2 +-
 .../internal/SameThreadExecutionContext.scala      |  2 +-
 .../org/apache/pekko/util/FutureConverters.scala   |  4 +--
 .../apache/pekko/util/JavaDurationConverters.scala |  4 +--
 .../org/apache/pekko/util/OptionConverters.scala   | 20 ++++++------
 8 files changed, 98 insertions(+), 16 deletions(-)

diff --git 
a/actor/src/main/mima-filters/2.0.x.backwards.excludes/future-converters.excludes
 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/future-converters.excludes
new file mode 100644
index 0000000000..7e7d8dc784
--- /dev/null
+++ 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/future-converters.excludes
@@ -0,0 +1,22 @@
+# 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.
+
+# Result of adding the Scala 3 inline keyword, these methods are no longer 
visible as ordinary callable methods
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.FutureConverters#CompletionStageOps.asScala$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.FutureConverters#CompletionStageOps.asScala")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.FutureConverters#FutureOps.asJava$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.FutureConverters#FutureOps.asJava")
diff --git 
a/actor/src/main/mima-filters/2.0.x.backwards.excludes/java-duration-converters.excludes
 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/java-duration-converters.excludes
new file mode 100644
index 0000000000..0cefb38664
--- /dev/null
+++ 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/java-duration-converters.excludes
@@ -0,0 +1,22 @@
+# 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.
+
+# Result of adding the Scala 3 inline keyword, these methods are no longer 
visible as ordinary callable methods
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.JavaDurationConverters#JavaDurationOps.asScala$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.JavaDurationConverters#JavaDurationOps.asScala")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.JavaDurationConverters#ScalaDurationOps.asJava$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.JavaDurationConverters#ScalaDurationOps.asJava")
diff --git 
a/actor/src/main/mima-filters/2.0.x.backwards.excludes/option-converters.excludes
 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/option-converters.excludes
new file mode 100644
index 0000000000..158ab8a5d9
--- /dev/null
+++ 
b/actor/src/main/mima-filters/2.0.x.backwards.excludes/option-converters.excludes
@@ -0,0 +1,38 @@
+# 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.
+
+# Result of adding the Scala 3 inline keyword, these methods are no longer 
visible as ordinary callable methods
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOption.toJava$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOption.toJavaPrimitive$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOption.toJava")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOption.toJavaPrimitive")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptional.toJavaPrimitive$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptional.toScala$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptional.toScala")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptional.toJavaPrimitive")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalDouble.toJavaGeneric$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalDouble.toScala$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalDouble.toScala")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalDouble.toJavaGeneric")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalInt.toJavaGeneric$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalInt.toScala$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalInt.toScala")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalInt.toJavaGeneric")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalLong.toJavaGeneric$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalLong.toScala$extension")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalLong.toScala")
+ProblemFilters.exclude[DirectMissingMethodProblem]("org.apache.pekko.util.OptionConverters#RichOptionalLong.toJavaGeneric")
diff --git 
a/actor/src/main/scala-3/org/apache/pekko/compat/PartialFunction.scala 
b/actor/src/main/scala-3/org/apache/pekko/compat/PartialFunction.scala
index 354ed1a87c..a05afc17bd 100644
--- a/actor/src/main/scala-3/org/apache/pekko/compat/PartialFunction.scala
+++ b/actor/src/main/scala-3/org/apache/pekko/compat/PartialFunction.scala
@@ -25,7 +25,7 @@ import org.apache.pekko.annotation.InternalApi
  */
 @InternalApi private[pekko] object PartialFunction {
 
-  def fromFunction[A, B](f: A => B): scala.PartialFunction[A, B] =
+  inline def fromFunction[A, B](f: A => B): scala.PartialFunction[A, B] =
     scala.PartialFunction.fromFunction(f)
 
 }
diff --git 
a/actor/src/main/scala-3/org/apache/pekko/dispatch/internal/SameThreadExecutionContext.scala
 
b/actor/src/main/scala-3/org/apache/pekko/dispatch/internal/SameThreadExecutionContext.scala
index 922f2c41b4..7cf421236d 100644
--- 
a/actor/src/main/scala-3/org/apache/pekko/dispatch/internal/SameThreadExecutionContext.scala
+++ 
b/actor/src/main/scala-3/org/apache/pekko/dispatch/internal/SameThreadExecutionContext.scala
@@ -25,6 +25,6 @@ import pekko.annotation.InternalApi
  */
 @InternalApi
 private[dispatch] object SameThreadExecutionContext {
-  def apply(): ExecutionContext = ExecutionContext.parasitic
+  inline def apply(): ExecutionContext = ExecutionContext.parasitic
 
 }
diff --git 
a/actor/src/main/scala-3/org/apache/pekko/util/FutureConverters.scala 
b/actor/src/main/scala-3/org/apache/pekko/util/FutureConverters.scala
index f603f2c2e3..45abd4a6fe 100644
--- a/actor/src/main/scala-3/org/apache/pekko/util/FutureConverters.scala
+++ b/actor/src/main/scala-3/org/apache/pekko/util/FutureConverters.scala
@@ -28,7 +28,7 @@ private[pekko] object FutureConverters {
   def asJava[T](f: Future[T]): CompletionStage[T] = 
javaapi.FutureConverters.asJava(f)
 
   implicit final class FutureOps[T](private val f: Future[T]) extends AnyVal {
-    def asJava: CompletionStage[T] = javaapi.FutureConverters.asJava(f)
+    inline def asJava: CompletionStage[T] = javaapi.FutureConverters.asJava(f)
   }
 
   // Ideally this should have the Scala 3 inline keyword but then Java sources 
are
@@ -36,6 +36,6 @@ private[pekko] object FutureConverters {
   def asScala[T](cs: CompletionStage[T]): Future[T] = 
javaapi.FutureConverters.asScala(cs)
 
   implicit final class CompletionStageOps[T](private val cs: 
CompletionStage[T]) extends AnyVal {
-    def asScala: Future[T] = javaapi.FutureConverters.asScala(cs)
+    inline def asScala: Future[T] = javaapi.FutureConverters.asScala(cs)
   }
 }
diff --git 
a/actor/src/main/scala-3/org/apache/pekko/util/JavaDurationConverters.scala 
b/actor/src/main/scala-3/org/apache/pekko/util/JavaDurationConverters.scala
index d8f941dcc3..6188286fc7 100644
--- a/actor/src/main/scala-3/org/apache/pekko/util/JavaDurationConverters.scala
+++ b/actor/src/main/scala-3/org/apache/pekko/util/JavaDurationConverters.scala
@@ -30,10 +30,10 @@ private[pekko] object JavaDurationConverters {
   def asFiniteDuration(duration: JDuration): FiniteDuration = duration.asScala
 
   final implicit class JavaDurationOps(val self: JDuration) extends AnyVal {
-    def asScala: FiniteDuration = Duration.fromNanos(self.toNanos)
+    inline def asScala: FiniteDuration = Duration.fromNanos(self.toNanos)
   }
 
   final implicit class ScalaDurationOps(val self: Duration) extends AnyVal {
-    def asJava: JDuration = JDuration.ofNanos(self.toNanos)
+    inline def asJava: JDuration = JDuration.ofNanos(self.toNanos)
   }
 }
diff --git 
a/actor/src/main/scala-3/org/apache/pekko/util/OptionConverters.scala 
b/actor/src/main/scala-3/org/apache/pekko/util/OptionConverters.scala
index 6ead358e19..eb977d2518 100644
--- a/actor/src/main/scala-3/org/apache/pekko/util/OptionConverters.scala
+++ b/actor/src/main/scala-3/org/apache/pekko/util/OptionConverters.scala
@@ -35,45 +35,45 @@ private[pekko] object OptionConverters {
   final def toJava[A](o: Option[A]): Optional[A] = 
scala.jdk.javaapi.OptionConverters.toJava(o)
 
   implicit final class RichOptional[A](private val o: java.util.Optional[A]) 
extends AnyVal {
-    def toScala: Option[A] = scala.jdk.OptionConverters.RichOptional(o).toScala
+    inline def toScala: Option[A] = 
scala.jdk.OptionConverters.RichOptional(o).toScala
 
-    def toJavaPrimitive[O](implicit shape: OptionShape[A, O]): O =
+    inline def toJavaPrimitive[O](implicit shape: OptionShape[A, O]): O =
       scala.jdk.OptionConverters.RichOptional(o).toJavaPrimitive
   }
 
   implicit final class RichOption[A](private val o: Option[A]) extends AnyVal {
-    def toJava: Optional[A] = scala.jdk.OptionConverters.RichOption(o).toJava
+    inline def toJava: Optional[A] = 
scala.jdk.OptionConverters.RichOption(o).toJava
 
-    def toJavaPrimitive[O](implicit shape: OptionShape[A, O]): O =
+    inline def toJavaPrimitive[O](implicit shape: OptionShape[A, O]): O =
       scala.jdk.OptionConverters.RichOption(o).toJavaPrimitive
   }
 
   implicit class RichOptionalDouble(private val o: OptionalDouble) extends 
AnyVal {
 
     /** Convert a Java `OptionalDouble` to a Scala `Option` */
-    def toScala: Option[Double] = 
scala.jdk.OptionConverters.RichOptionalDouble(o).toScala
+    inline def toScala: Option[Double] = 
scala.jdk.OptionConverters.RichOptionalDouble(o).toScala
 
     /** Convert a Java `OptionalDouble` to a generic Java `Optional` */
-    def toJavaGeneric: Optional[Double] = 
scala.jdk.OptionConverters.RichOptionalDouble(o).toJavaGeneric
+    inline def toJavaGeneric: Optional[Double] = 
scala.jdk.OptionConverters.RichOptionalDouble(o).toJavaGeneric
   }
 
   /** Provides conversions from `OptionalInt` to Scala `Option` and the 
generic `Optional` */
   implicit class RichOptionalInt(private val o: OptionalInt) extends AnyVal {
 
     /** Convert a Java `OptionalInt` to a Scala `Option` */
-    def toScala: Option[Int] = 
scala.jdk.OptionConverters.RichOptionalInt(o).toScala
+    inline def toScala: Option[Int] = 
scala.jdk.OptionConverters.RichOptionalInt(o).toScala
 
     /** Convert a Java `OptionalInt` to a generic Java `Optional` */
-    def toJavaGeneric: Optional[Int] = 
scala.jdk.OptionConverters.RichOptionalInt(o).toJavaGeneric
+    inline def toJavaGeneric: Optional[Int] = 
scala.jdk.OptionConverters.RichOptionalInt(o).toJavaGeneric
   }
 
   /** Provides conversions from `OptionalLong` to Scala `Option` and the 
generic `Optional` */
   implicit class RichOptionalLong(private val o: OptionalLong) extends AnyVal {
 
     /** Convert a Java `OptionalLong` to a Scala `Option` */
-    def toScala: Option[Long] = 
scala.jdk.OptionConverters.RichOptionalLong(o).toScala
+    inline def toScala: Option[Long] = 
scala.jdk.OptionConverters.RichOptionalLong(o).toScala
 
     /** Convert a Java `OptionalLong` to a generic Java `Optional` */
-    def toJavaGeneric: Optional[Long] = 
scala.jdk.OptionConverters.RichOptionalLong(o).toJavaGeneric
+    inline def toJavaGeneric: Optional[Long] = 
scala.jdk.OptionConverters.RichOptionalLong(o).toJavaGeneric
   }
 }


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

Reply via email to