Skip to content
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

Streaming request body for servant-client-core #913

Merged
merged 6 commits into from Mar 23, 2018

Conversation

Projects
None yet
3 participants
@jkarni
Copy link
Member

commented Feb 27, 2018

Fixes #886.

I also added tests to check that Stream ran in constant memory while I was at it.

@jkarni

This comment has been minimized.

Copy link
Member Author

commented Mar 6, 2018

Tests are failing on 7.8.4 for reasons that don't have anything to do with the PR. I tried reproducing it locally but can't. @phadej any ideas?

@jkarni jkarni force-pushed the jkarni/expose-more-request-constructors branch from bb49f90 to e3158d7 Mar 8, 2018

@jkarni

This comment has been minimized.

Copy link
Member Author

commented Mar 11, 2018

@phadej @alpmestan can I merge?

@phadej

This comment has been minimized.

Copy link
Member

commented Mar 11, 2018

@phadej

This comment has been minimized.

Copy link
Member

commented Mar 12, 2018

I took a quick glance and I'm not particularly fond of replicating http-client API in the servant-client-core. It feels like a step back. I'Il think a little harder tomorrow

@jkarni

This comment has been minimized.

Copy link
Member Author

commented Mar 13, 2018

I took a quick glance and I'm not particularly fond of replicating http-client API in the servant-client-core

I thought that was what we had come up with over IRC. But if there are nicer alternatives I'm all for them. The only constructor in RequestBody that didn't seem necessary/logical was RequestBodyIO (but funnily I ended up using it in servant-streaming, and now am in favor of it).

@jkarni

This comment has been minimized.

Copy link
Member Author

commented Mar 14, 2018

Any updates?

where
lotsGenerator f r = do
f ""
withFile "/dev/urandom" ReadMode $

This comment has been minimized.

Copy link
@phadej

phadej Mar 15, 2018

Member

can we use random / tf-random etc. and not drain the (somewhat slow) secure random device?

This comment has been minimized.

Copy link
@jkarni

jkarni Mar 19, 2018

Author Member

Tried random and bytestring-random, but they used a lot more CPU and failed (without clear error messages) on CI.

I can remove this test entirely, though

@phadej

phadej approved these changes Mar 15, 2018

Copy link
Member

left a comment

I have one unrelated to streaming change request, otherwise this is ok. We can change the servant-client-core RequestBody again when we are wiser.

Also, does it work with servant-client-ghcjs, if there is an easy way to check, it would be great.

EDIT s/Request/RequestBody/

@jkarni

This comment has been minimized.

Copy link
Member Author

commented Mar 18, 2018

Good call on testing GHCJS. I'm trying to do that but keep running into problems. Will update here when it works.

@jkarni jkarni force-pushed the jkarni/expose-more-request-constructors branch from 672ff4a to ba33b61 Mar 19, 2018

jkarni added some commits Feb 27, 2018

Expose more constructors for RequestBody.
    Mimicking http-client's RequestBody.
Implement new constructors for GHCJS.
    Streaming is not actually performed - instead the whole object is
    held in memory.

@jkarni jkarni force-pushed the jkarni/expose-more-request-constructors branch from ba33b61 to 41ca5ad Mar 19, 2018

jkarni added some commits Mar 19, 2018

Re-review changes.
    Using random packages mysteriously fail on CI, and also uses a lot
    more CPU.

@jkarni jkarni force-pushed the jkarni/expose-more-request-constructors branch from 41ca5ad to 7c901dc Mar 19, 2018

@domenkozar

This comment has been minimized.

Copy link
Contributor

commented Mar 23, 2018

@jkarni how can I help get this finalized?

@jkarni jkarni merged commit 3750f22 into master Mar 23, 2018

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@jkarni jkarni deleted the jkarni/expose-more-request-constructors branch Mar 23, 2018

@jkarni

This comment has been minimized.

Copy link
Member Author

commented Mar 23, 2018

@domenkozar finalized :)

Well, at least, modulo releasing it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.