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

Revert conduit 3 changes #741

Merged
merged 2 commits into from
Feb 1, 2021
Merged

Revert conduit 3 changes #741

merged 2 commits into from
Feb 1, 2021

Conversation

samoht
Copy link
Member

@samoht samoht commented Jan 29, 2021

As we are delaying the release of conduit 3.0 again (because we are still not fully happy with the complexity added by the new API) I am temporary reverting #692. As a few changes have been made to master since then, I had to do it manually. Hopefully I haven't broken anything.

/cc @dinosaure and @lyrm

@avsm
Copy link
Member

avsm commented Jan 29, 2021

I'm fine with this. We'll revisit the conduit changes (which were very much heading in the right direction) once we have the maintainer bandwidth to figure out the revdeps cost to the community. Since cohttp 3.x has been tagged already, we cannot re-release, so lets bump to cohttp 4 for future API changes, and conduit2 can come back in cohttp 5.

@samoht we need to make the CI pass. I can take a quick look at that in a few hours and push to your branch.

@mseri -- this ok with you?

@samoht
Copy link
Member Author

samoht commented Jan 29, 2021

I'll fix the CI.

I also haven't realised that cohttp 3 was released (but it has available: false in its opam metadata so I guess nobody is using it yet?)

@avsm
Copy link
Member

avsm commented Jan 29, 2021

That's right -- it got marked as available:false fairly soon after because of the revdeps changes, but it's there. Unfortunately the new package names will show up as a result on searches. We'll need to edit the opam metadata.

@mseri
Copy link
Collaborator

mseri commented Jan 29, 2021

I think it will be hard to cherrypick all the fixes that went in during the preparation for 3.0.0 and would be a pity to lose them. Why don't we just wait and update the code once the new conduit is released?

Do we really need to sync the version numbers of conduit and cohttp? 3.0.0 is tagged but not released... we could always tag 3.0.1 and release that as the official 3.0.0 once appropriate.

(In fact, since it is unavailable on opam-repository, we could really remove it there -- still preserving the 3.0.0 tag and release here unofficially). Or release 3.0.0~alpha and leave it there for people that want to try the current API, with a huge warning that there are further upcoming breaking changes.

@samoht
Copy link
Member Author

samoht commented Jan 29, 2021

I think it will be hard to cherrypick the fixes that went in during the preparation for 3.0.0 and would be a pity to lose them. Why don't we just wait and update the code once the new conduit is released?

Nobody has time right now to focus on the new conduit, so let's not block ourselves on this and let's continue to improve (and release) cohttp. For instance @lyrm is interested to contribute to improve cohttp headers, so my motivation is to unblock her asap :-)

Also while doing this I noticed a few clean-up that I'd like to do next (use ocamlformat, move src and tests around).

@samoht
Copy link
Member Author

samoht commented Jan 29, 2021

(also I'll double check but I think I've cherry-picked everything that needed to be cherry-picked :p)

@mseri
Copy link
Collaborator

mseri commented Jan 29, 2021

In that case, go ahead!

@mseri
Copy link
Collaborator

mseri commented Jan 29, 2021

I think we can release this as 3.0.1 no matter what, keeping 3.0.0 unavailable or completely removing it from opam.

@mseri
Copy link
Collaborator

mseri commented Jan 29, 2021

I think we will need to fix the server examples in the README, we should probably use mdx to compile them and keep them updated (I was doing it manually by also having them in the examples folder)

@samoht
Copy link
Member Author

samoht commented Jan 29, 2021

I think it will be hard to cherrypick the fixes that went in during the preparation for 3.0.0 and would be a pity to lose them.

Ok I actually missed a few renaming commits. Fixing that now.

@avsm
Copy link
Member

avsm commented Jan 29, 2021

I'm fine with this being 3.x, but make it 3.1.0 at least. It really isn't a point release over what 3.0.0 was tagged as ;-)

@mseri
Copy link
Collaborator

mseri commented Jan 29, 2021

I have no preference really, just wanted to avoid skipping 3 since it is effectively unreleased 😜
It's the first uneven prime!

@avsm
Copy link
Member

avsm commented Jan 29, 2021

Skipping the atomic number of lithium does seem like a pity! Let's go with 3.1.0 @samoht

Copy link
Collaborator

@mseri mseri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you also fix the two linting issues in the CI?

@samoht
Copy link
Member Author

samoht commented Jan 29, 2021

Ok I think I've cherry-picked everything that I could do now. Please check that the diff looks ok.

The one that makes me very sad is reverting support for client-side TLS certificates. I am so sad that I might make a small patch to conduit to restore this...

@samoht samoht force-pushed the revert-conduit3 branch 2 times, most recently from 32173ef to 0e7ef77 Compare January 29, 2021 18:55
@samoht
Copy link
Member Author

samoht commented Jan 29, 2021

Ok all fixed now -- I think it's ready to be merged once everyone is happy with the revert.

Copy link
Collaborator

@mseri mseri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

cohttp-lwt-unix/src/server.mli Outdated Show resolved Hide resolved
@samoht
Copy link
Member Author

samoht commented Jan 30, 2021

The client-side CA cert patch has been backported to conduit 2: mirage/ocaml-conduit#374

@mseri
Copy link
Collaborator

mseri commented Jan 30, 2021

Fantastic! I went over the changes again, it looks fine to me. @avsm do you also give the green light for a merge?

Copy link
Member

@avsm avsm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a minor expansion to the CHANGES file to explain the PR

CHANGES.md Outdated Show resolved Hide resolved
@samoht samoht merged commit 4f8a73f into mirage:master Feb 1, 2021
@samoht samoht deleted the revert-conduit3 branch February 1, 2021 09:46
mseri added a commit to mseri/opam-repository that referenced this pull request Mar 24, 2021
…ohttp-top, cohttp-async and cohttp-mirage (4.0.0)

CHANGES:

- cohttp.response: fix malformed status header for custom status codes (@mseri @aalekseyev mirage/ocaml-cohttp#752)
- Remove dependency to base (@samoht mirage/ocaml-cohttp#745)
- fix opam files and dependencies
- add GitHub Actions workflow (@smorimoto mirage/ocaml-cohttp#739)
- lwt_jsoo: Forward exceptions to caller when response is null (@mefyl mirage/ocaml-cohttp#738)
- Remove wrapped false (@rgrinberg mirage/ocaml-cohttp#734)
- Use implicit executable dependency for generate.exe (@TheLortex mirage/ocaml-cohttp#735)
- cohttp: update HTTP codes (@emillon mirage/ocaml-cohttp#711)
- cohttp: add Uti.t to uri scheme (@brendanlong mirage/ocaml-cohttp#707)
- cohttp: fix chunked encoding of empty body (@mefyl mirage/ocaml-cohttp#715)
- cohttp-async: fix body not being uploaded with unchunked Async.Pipe (@mefyl mirage/ocaml-cohttp#706)
- cohttp-{async, lwt}: fix suprising behaviours of Body.is_empty (@anuragsoni mirage/ocaml-cohttp#714 mirage/ocaml-cohttp#712 mirage/ocaml-cohttp#713)
- cohttp-lwt-jsoo: rename Cohttp_lwt_xhr to Cohttp_lwt_jsoo for consistency (@mseri mirage/ocaml-cohttp#717)
- refactoring of tests (@mseri mirage/ocaml-cohttp#709, @dinosaure mirage/ocaml-cohttp#692)
- update documentation (@dinosaure mirage/ocaml-cohttp#716, @mseri mirage/ocaml-cohttp#720)
- cohttp: fix transfer-encoding ordering in headers (@mseri mirage/ocaml-cohttp#721)
- lower-level support for long-running cohttp-async connections (@brendanlong mirage/ocaml-cohttp#704)
- fix deadlock in logging (@dinosaure mirage/ocaml-cohttp#722)
- add of_form and to_form functions to body (@seliopou mirage/ocaml-cohttp#440, @mseri mirage/ocaml-cohttp#723)
- cohttp-lwt: partly inline read_response, fix body stream leak (@madroach @dinosaure mirage/ocaml-cohttp#696)
- improve media type parsing (@seliopou mirage/ocaml-cohttp#542, @dinosaure mirage/ocaml-cohttp#725)
- add comparison functions for Request.t and Response.t via ppx_compare (@msaffer-js @dinosaure mirage/ocaml-cohttp#686)
- [reverted] breaking changes to client and server API to use conduit
  3.0.0 (@dinosaure mirage/ocaml-cohttp#692). However, as the design discussion did not reach
  consensus, these changes were reverted to preserve better compatibility with
  existing cohttp users. (mirage/ocaml-cohttp#741,  @samoht)
mseri added a commit to mseri/opam-repository that referenced this pull request Mar 25, 2021
…ohttp-top, cohttp-async and cohttp-mirage (4.0.0)

CHANGES:

- cohttp.response: fix malformed status header for custom status codes (@mseri @aalekseyev mirage/ocaml-cohttp#752)
- Remove dependency to base (@samoht mirage/ocaml-cohttp#745)
- fix opam files and dependencies
- add GitHub Actions workflow (@smorimoto mirage/ocaml-cohttp#739)
- lwt_jsoo: Forward exceptions to caller when response is null (@mefyl mirage/ocaml-cohttp#738)
- Remove wrapped false (@rgrinberg mirage/ocaml-cohttp#734)
- Use implicit executable dependency for generate.exe (@TheLortex mirage/ocaml-cohttp#735)
- cohttp: update HTTP codes (@emillon mirage/ocaml-cohttp#711)
- cohttp: add Uti.t to uri scheme (@brendanlong mirage/ocaml-cohttp#707)
- cohttp: fix chunked encoding of empty body (@mefyl mirage/ocaml-cohttp#715)
- cohttp-async: fix body not being uploaded with unchunked Async.Pipe (@mefyl mirage/ocaml-cohttp#706)
- cohttp-{async, lwt}: fix suprising behaviours of Body.is_empty (@anuragsoni mirage/ocaml-cohttp#714 mirage/ocaml-cohttp#712 mirage/ocaml-cohttp#713)
- cohttp-lwt-jsoo: rename Cohttp_lwt_xhr to Cohttp_lwt_jsoo for consistency (@mseri mirage/ocaml-cohttp#717)
- refactoring of tests (@mseri mirage/ocaml-cohttp#709, @dinosaure mirage/ocaml-cohttp#692)
- update documentation (@dinosaure mirage/ocaml-cohttp#716, @mseri mirage/ocaml-cohttp#720)
- cohttp: fix transfer-encoding ordering in headers (@mseri mirage/ocaml-cohttp#721)
- lower-level support for long-running cohttp-async connections (@brendanlong mirage/ocaml-cohttp#704)
- fix deadlock in logging (@dinosaure mirage/ocaml-cohttp#722)
- add of_form and to_form functions to body (@seliopou mirage/ocaml-cohttp#440, @mseri mirage/ocaml-cohttp#723)
- cohttp-lwt: partly inline read_response, fix body stream leak (@madroach @dinosaure mirage/ocaml-cohttp#696)
- improve media type parsing (@seliopou mirage/ocaml-cohttp#542, @dinosaure mirage/ocaml-cohttp#725)
- add comparison functions for Request.t and Response.t via ppx_compare (@msaffer-js @dinosaure mirage/ocaml-cohttp#686)
- [reverted] breaking changes to client and server API to use conduit
  3.0.0 (@dinosaure mirage/ocaml-cohttp#692). However, as the design discussion did not reach
  consensus, these changes were reverted to preserve better compatibility with
  existing cohttp users. (mirage/ocaml-cohttp#741,  @samoht)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants