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

Parameterize ChunkAggregator #1886

Merged
merged 3 commits into from May 30, 2018

Conversation

Projects
None yet
2 participants
@rossabaker
Member

rossabaker commented May 30, 2018

No description provided.

@@ -47,7 +48,7 @@ class ChunkAggregatorSpec extends Http4sSpec {
"handle a none" in {
val routes: HttpRoutes[IO] = HttpRoutes.empty
ChunkAggregator(routes).run(Request()).value must returnValue(None)
ChunkAggregator(OptionT.liftK[IO])(routes).run(Request()).value must returnValue(None)

This comment has been minimized.

@rossabaker

rossabaker May 30, 2018

Member

Do we need some partial application trick for this one? Ugh.

@rossabaker

This comment has been minimized.

Member

rossabaker commented May 30, 2018

Build will be broken because of #1887.

@jmcardon jmcardon referenced this pull request May 30, 2018

Closed

Generalize middlewares #1890

18 of 23 tasks complete
OptionT.liftF(
def apply[F[_], G[_], A](f: G ~> F)(@deprecatedName('service) http: Kleisli[F, A, Response[G]])(
implicit F: FlatMap[F],
G: Sync[G]): Kleisli[F, A, Response[G]] =

This comment has been minimized.

@aeons

aeons May 30, 2018

Member

Same as the other one, could/should these implicits be context bounds instead?

@aeons

This comment has been minimized.

Member

aeons commented May 30, 2018

I tried the partial application thing from cats, but that still crashes the compiler.
If you add the type ascription:

val nonStreamFileHttpEndpoint: HttpRoutes[F] = ChunkAggregator(OptionT.liftK[F])(fileHttpEndpoint)

it works as well.

@aeons

aeons approved these changes May 30, 2018

@aeons aeons merged commit d167a1c into http4s:master May 30, 2018

0 of 2 checks passed

continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment