Comments (8)
You raised a good point, so I went to a scratch sheet to test it out. It looks like, if there's both a T* and a more specific apply function available, it will use the more specific one over the T* one. Not shown in this screenshot is the final test I did where I did not explicitly define the result type (val result5 = Result(testPublisher)
). It still ran the Publisher apply method.
The test I added on #34 also passed successfully
from reactor-scala-extensions.
@zackman0010 the ScalaConverters class adds implicit asScala methods to JFlux and JMono, so you can do like:
import reactor.core.scala.publisher.ScalaConverters
JFlux.just("whatever").asScala
from reactor-scala-extensions.
Or another shortcut is
val sFlux = SFlux.fromPublisher(jFlux)
from reactor-scala-extensions.
Thank you, I somehow missed that one when I was looking through SFlux last night.
from reactor-scala-extensions.
@sinwe If I submitted a merge request to add another apply method to SFlux that simply calls the fromPublisher method, which is the same thing that SMono's apply does, would it be accepted?
from reactor-scala-extensions.
@zackman0010 You can try and raise PR. I'm not sure if that would be working because of below
object SFlux {
def apply[T](elements: T*): SFlux[T] = SFlux.fromIterable(elements)
}
When you do SFlux(jFlux)
it might be treated as an SFlux
with elements on single JFlux
instead of converting the JFlux
to SFlux
.
But I might be wrong. That's just on top of my head.
But it'd be nice if it works because that'll make it consistent with SMono(jMono)
from reactor-scala-extensions.
Thanks... I’ll merge your PR soon and I’ll cut a release soon as we’ve got couple of PRs merged to master
from reactor-scala-extensions.
Released on v0.4.6
from reactor-scala-extensions.
Related Issues (20)
- Flux.name does not work with Scannable
- Upgrade reactor-core to 3.1.8.RELEASE
- Emtpy implementation for reactor.core.scala.publisher.ParallelFlux HOT 6
- Upgrade reactor-core to 3.2.x HOT 2
- Target Scala release 2.13 HOT 5
- Remove Deprecated Flux and Mono HOT 9
- Convert the build using sbt HOT 1
- SFlux.mergeSequentialPublisher(SFlux[SFlux[T]]) has compilation error HOT 1
- Operator merge is missed in SFlux. (It was available in Flux) HOT 1
- Travis CI keeps hanging with gradle 5.x
- ./gradlew clean build_2.12.10 failed with gradle 6.x HOT 1
- Uploading to bintray stop working with gradle > 4.x HOT 1
- FindBugs dependency is causing a Black Duck 'High Risk' assessment for the library HOT 4
- Usage of idomatic scala operators for scan, reduce, fold etc. HOT 2
- SFlux Element Type Should be Declared as Covariant Type HOT 4
- Align fold, reduce and scan ops with scala idoms
- Drop support for 2.11
- Remove Cats Effect HOT 1
- Switch to Github Actions for CI HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from reactor-scala-extensions.