-
Notifications
You must be signed in to change notification settings - Fork 221
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs2 support #1042
fs2 support #1042
Conversation
b6fc90c
to
5869a46
Compare
Codecov Report
@@ Coverage Diff @@
## master #1042 +/- ##
=========================================
+ Coverage 83.95% 84.1% +0.15%
=========================================
Files 50 53 +3
Lines 941 969 +28
Branches 56 57 +1
=========================================
+ Hits 790 815 +25
- Misses 151 154 +3
Continue to review full report at Codecov.
|
Hey @sergeykolbasov! I see this is WIP - let me know whey you think this is ready for review. |
@vkostyukov It's good to go |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only looked at the big picture. As usual, this is an amazing work @sergeykolbasov!
My big questions are:
- Can we get rid of
StreamFromReader
- Can we provide missing instances to make
streamBody[Reader, ???, Buf]
work (would really like that; in future this could be available via an aliasstreamBodyReader[???, Buf]
). - Can we provide missing instances to make
streamBody[AsyncStream, ???, Buf]
work (less concerned about that - want to rip off anyAsyncStream
bits from Finch in the long run,Reader
is fine though).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
More comments from my side. I still need to think about wether we need to merge those type-classes together.
9e86108
to
94bf793
Compare
Hey @sergeykolbasov! I was thinking we could ship this in 0.27, before the NY. What's your plan with this? |
485777c
to
39bf504
Compare
I'm in the process of polishing things |
@vkostyukov it should be fine by now |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks just great @sergeykolbasov! Just some nits from me. I feel it's pretty much ready to. The biggest concern I have is about backwards compatibility.
@@ -45,6 +45,11 @@ sealed abstract class EndpointResult[F[_], +A] { | |||
case _ => None | |||
} | |||
|
|||
final def map[B](fn: A => B)(implicit F: Effect[F]): EndpointResult[F, B] = this match { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why this is needed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried to make streamJsonBody
simpler. We still need the access to Input.request.charsetOrUtf8
to run the decoder, so it's impossible to just use streamBody.map(a => b)
.
Check implementation of this endpoint.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Did one more run which raised more questions - nothing major but we should try to address them.
13b9380
to
93eb837
Compare
@vkostyukov mind to give it another look? Let's make this PR a New Year resolution 😄 |
Going to look tonight @sergeykolbasov! What's your opinion on this vs #1056. Which one should go first? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like all of this! Just couple of nits and this is ready to go!
Remove futureToEffect in favor of F.defer Remove EndpointStreamModule Make ToEffect call-by-value again
e4c4525
to
4c5b350
Compare
4c5b350
to
cb3f907
Compare
That's creepy. I can't reproduce the build error on my machine. Assume, there is a conflict in circe-jawn between 0.11.0 and 0.10.0 as circe-fs2 still depends on the old one. |
@sergeykolbasov Hoping to have circe-fs2 published soon—its tests turned up a bug in Jawn 0.14.0 that I thought we could merged pretty quickly: typelevel/jawn#144 |
Thanks for the info, Travis! Waiting for the resolution then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@travisbrown Thanks for the details!
@sergeykolbasov I'm happy when CI is happy! Appreciate your hard work on this. When it's merged, I can rebase #1056 so we can take another look at it.
Related to #1001
Idea is to have
streamBody
andjsonStreamBody
endpoints in core, along withStreamingLaws
, so modules like iteratee and fs2 could implement only neccessary type classes and couple of specs while the rest of machinery is done inside of the core.