-
Notifications
You must be signed in to change notification settings - Fork 176
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
fix: get rid of flush #1052
fix: get rid of flush #1052
Conversation
cohttp/src/response.ml
Outdated
let make ?(version = `HTTP_1_1) ?(status = `OK) ?(flush = false) | ||
?(encoding = Transfer.Chunked) ?(headers = Header.init ()) () = | ||
ignore flush; |
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.
let make ?(version = `HTTP_1_1) ?(status = `OK) ?(flush = false) | |
?(encoding = Transfer.Chunked) ?(headers = Header.init ()) () = | |
ignore flush; | |
let make ?(version = `HTTP_1_1) ?(status = `OK) | |
?(encoding = Transfer.Chunked) ?(headers = Header.init ()) () = |
Why not dropping flush
also from here?
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 think this would be a bigger breaking change. Since this make
function has been around for a long time in many released versions. I'm honestly happy to get rid of it as well though if you prefer.
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 think at this point why not. Removing the flush field is already breaking, we may as well do it once and for all
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.
If we're talking about the 6.0 major version upgrade, I think the point is precisely to allow API breakage? One has to do some cleanup at some point, and major versions are the only opportunity we have of doing so.
300b29f
to
651ef43
Compare
We haven't yet released [Http] so it's ok to change things. It doesn't seem right to release the library with a deprecated feature. It's easy enough to just drop this field in [Http] Signed-off-by: Rudi Grinberg <[email protected]> <!-- ps-id: adbceded-c111-4ce6-8083-96c5a8a7ca26 -->
651ef43
to
6101a53
Compare
@mefyl do you want to have a look? |
LGTM ! |
Cohttp 6 introduced a breaking change to the `Response` API dropping `flush` in mirage/ocaml-cohttp#1052 This updates our usage to be compatible.
Cohttp 6 introduced a breaking change to the `Response` API dropping `flush` in mirage/ocaml-cohttp#1052 This updates our usage to be compatible.
We haven't yet released [Http] so it's ok to change things. It doesn't seem right to release the library with a deprecated feature.
It's easy enough to just drop this field in [Http]
Signed-off-by: Rudi Grinberg [email protected]