Git Product home page Git Product logo

Comments (9)

pjfanning avatar pjfanning commented on August 25, 2024 2

@pjfanning Yes, org.apache.pekko.japi.pf.PFBuilder.

Thanks - there seem to be some useful classes in the org.apache.pekko.japi.pf package.

https://pekko.apache.org/japi/pekko/current/org/apache/pekko/japi/pf/package-summary.html

from pekko.

pjfanning avatar pjfanning commented on August 25, 2024

@He-Pin what do you think we should do here? Should we document the issue we see in apache/pekko-persistence-cassandra#212 or is there a change we can make to stream-testkit to avoid the issue going forward?

from pekko.

He-Pin avatar He-Pin commented on August 25, 2024

I was expected to avoid a double evaluation, but that can only be done with 2.13, we may better go with 2.13 abd I expect drop the 2.12 support in 1.2.x anyway

from pekko.

pjfanning avatar pjfanning commented on August 25, 2024

@He-Pin This new method in https://github.com/He-Pin/incubator-pekko/blob/05248075bd13a336c9af079cb44a61986dc1f751/stream-testkit/src/main/scala/org/apache/pekko/stream/testkit/StreamTestKit.scala#L869 doesn't make sense to me. The PartialFunction is a Scala function, not a Java function. This seems like a not very useful Java API. The other changes in #1186 seem mainly ok to me but could we consider these?

  • removing the Java API expectNextWithTimeoutPF
  • or changing the Java API expectNextWithTimeoutPF to use a Java function.

When I say the other changes in #1186 are mainly ok, there are other new Java API methods that take Scala Partial Functions as inputs.

How do Java users even create a Scala Partial Function?

from pekko.

He-Pin avatar He-Pin commented on August 25, 2024

Yes, but a user can build a PartialFunction with the helper, such as the Receive builder.

from pekko.

pjfanning avatar pjfanning commented on August 25, 2024

Yes, but a user can build a PartialFunction with the helper, such as the Receive builder.

The ReceiveBuilder will not work for this stream-testkit use case. Unless we have a builder that can build a PartialFunction[Any, T] - does that exist?

from pekko.

He-Pin avatar He-Pin commented on August 25, 2024

@pjfanning Yes, org.apache.pekko.japi.pf.PFBuilder.

from pekko.

raboof avatar raboof commented on August 25, 2024

@He-Pin what do you think we should do here? Should we document the issue we see in apache/pekko-persistence-cassandra#212 or is there a change we can make to stream-testkit to avoid the issue going forward?

If I understand correctly this is only an issue when using Scala 2.12, right? In that case I think the note in #1403 seems sufficient and IMHO we can close this issue (or keep it open for if anyone is interested in looking into it, but remove it from the 1.1.0 milestone)

from pekko.

pjfanning avatar pjfanning commented on August 25, 2024

I'll close this. It is documented and I think the consensus is not to fix it.

from pekko.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.