You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@pekko.apache.org by "pjfanning (via GitHub)" <gi...@apache.org> on 2025/09/26 10:10:47 UTC
[PR] use Scala FunctionConverter [pekko]
pjfanning opened a new pull request, #2274:
URL: https://github.com/apache/pekko/pull/2274
* with Scala 2.12 support removed for 2.0.0, we can use the Scala built-in converter
* also tidy up some other scala 2.12 leftovers and remove a few unnecessary binary excludes
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] use Scala FunctionConverter [pekko]
Posted by "ihostage (via GitHub)" <gi...@apache.org>.
ihostage commented on code in PR #2274:
URL: https://github.com/apache/pekko/pull/2274#discussion_r2401301041
##########
CONTRIBUTING.md:
##########
@@ -533,7 +533,7 @@ Scala has proven the most viable way to do it, as long as you keep the following
1. Use `scala.jdk.javaapi.OptionConverters` to translate `Option`s to Java `Optional`s (or vice versa).
-1. Use `org.apache.pekko.util.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
+1. Use `scala.jdk.javapi.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
Review Comment:
In this case, we need to change the package name from `scala.jdk.javapi` to `scala.jdk.javaapi` 😉
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] use Scala FunctionConverter [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #2274:
URL: https://github.com/apache/pekko/pull/2274#discussion_r2399093173
##########
CONTRIBUTING.md:
##########
@@ -533,7 +533,7 @@ Scala has proven the most viable way to do it, as long as you keep the following
1. Use `scala.jdk.javaapi.OptionConverters` to translate `Option`s to Java `Optional`s (or vice versa).
-1. Use `org.apache.pekko.util.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
+1. Use `scala.jdk.javapi.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
Review Comment:
thanks - I'll correct this
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] use Scala FunctionConverter [pekko]
Posted by "ihostage (via GitHub)" <gi...@apache.org>.
ihostage commented on code in PR #2274:
URL: https://github.com/apache/pekko/pull/2274#discussion_r2399056603
##########
CONTRIBUTING.md:
##########
@@ -533,7 +533,7 @@ Scala has proven the most viable way to do it, as long as you keep the following
1. Use `scala.jdk.javaapi.OptionConverters` to translate `Option`s to Java `Optional`s (or vice versa).
-1. Use `org.apache.pekko.util.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
+1. Use `scala.jdk.javapi.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
Review Comment:
`scala.jdk.FunctionConverters`? 🤔
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] use Scala FunctionConverter [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #2274:
URL: https://github.com/apache/pekko/pull/2274#discussion_r2381929892
##########
stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamConvertersSpec.scala:
##########
@@ -45,7 +45,7 @@ class StreamConvertersSpec extends StreamSpec with DefaultTimeout {
import java.util.stream.IntStream
import java.util.stream.Stream
- import pekko.util.FunctionConverters._
+ import scala.jdk.FunctionConverters._
Review Comment:
pekko.util.FunctionConverters is deleted in this PR
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] use Scala FunctionConverter [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning merged PR #2274:
URL: https://github.com/apache/pekko/pull/2274
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] use Scala FunctionConverter [pekko]
Posted by "He-Pin (via GitHub)" <gi...@apache.org>.
He-Pin commented on code in PR #2274:
URL: https://github.com/apache/pekko/pull/2274#discussion_r2381911403
##########
stream-tests/src/test/scala/org/apache/pekko/stream/scaladsl/StreamConvertersSpec.scala:
##########
@@ -45,7 +45,7 @@ class StreamConvertersSpec extends StreamSpec with DefaultTimeout {
import java.util.stream.IntStream
import java.util.stream.Stream
- import pekko.util.FunctionConverters._
+ import scala.jdk.FunctionConverters._
Review Comment:
we should remove FunctionConverters class too
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org
Re: [PR] use Scala FunctionConverter [pekko]
Posted by "pjfanning (via GitHub)" <gi...@apache.org>.
pjfanning commented on code in PR #2274:
URL: https://github.com/apache/pekko/pull/2274#discussion_r2399105608
##########
CONTRIBUTING.md:
##########
@@ -533,7 +533,7 @@ Scala has proven the most viable way to do it, as long as you keep the following
1. Use `scala.jdk.javaapi.OptionConverters` to translate `Option`s to Java `Optional`s (or vice versa).
-1. Use `org.apache.pekko.util.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
+1. Use `scala.jdk.javapi.FunctionConverters` to translate Scala Functions to Java Functions (or vice versa).
Review Comment:
actually https://www.scala-lang.org/api/2.13.16/scala/jdk/javaapi/FunctionConverters$.html does exist - this section is about people writing Java APIs and some of the Java APIs are written in Java (but some are in Scala) - so it sort of depends, Java users should use https://www.scala-lang.org/api/2.13.16/scala/jdk/javaapi/FunctionConverters$.html while Scala code should use scala.jdk.FunctionConverters implicits.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: notifications-unsubscribe@pekko.apache.org
For additional commands, e-mail: notifications-help@pekko.apache.org