Skip to content

Fix revdeps from #17571#17577

Merged
mseri merged 1 commit into
ocaml:masterfrom
mseri:fix-cohttp-3-deps
Nov 5, 2020
Merged

Fix revdeps from #17571#17577
mseri merged 1 commit into
ocaml:masterfrom
mseri:fix-cohttp-3-deps

Conversation

@mseri
Copy link
Copy Markdown
Member

@mseri mseri commented Nov 5, 2020

@camelus
Copy link
Copy Markdown
Contributor

camelus commented Nov 5, 2020

Commit: df6cf79

A pull request by opam-seasoned @mseri.

☀️ All lint checks passed df6cf79
  • These packages passed lint tests: azblob-async.0.1.0, cohttp-lwt.2.0.0, cohttp-lwt.2.1.3, cohttp-mirage.2.2.0, cohttp-mirage.2.3.0, cohttp-mirage.2.4.0, cohttp-mirage.2.5.0, cohttp-mirage.2.5.1, cohttp-mirage.2.5.2-1, cohttp-mirage.2.5.2, cohttp-mirage.2.5.3, cohttp-mirage.2.5.4, curly.0.1.0, curly.0.2.0, current_github.0.2, current_github.0.3, current_web.0.1, current_web.0.2, current_web.0.3, git-http.2.0.0, git-http.2.1.0, git-http.2.1.1, git-http.2.1.2, git-http.2.1.3, git-unix.2.0.0, git-unix.2.1.0, git-unix.2.1.1, git-unix.2.1.2, git-unix.2.1.3, github-jsoo.3.0.1, github-jsoo.3.1.0, github-jsoo.4.0.0, github-jsoo.4.3.0, github-jsoo.4.3.1, github-jsoo.4.3.2, kappa-server.4.1.0, letsencrypt.0.1.0, letsencrypt.0.1.1, ocsigen-start.2.18.0, opium.0.17.0, opium.0.17.1, opium.0.18.0, oraft.0.1.0, prof_spacetime.0.3.0, prometheus-app.0.5, prometheus-app.0.6, prometheus-app.0.7, resto-cohttp-server.0.2, resto-cohttp-server.0.3, resto-cohttp-server.0.4, resto-cohttp-server.0.5, sihl.0.1.4, sihl.0.1.5, sihl.0.1.6, sihl.0.1.7

☀️ Installability check (+0)

@mseri mseri merged commit e4a6fe9 into ocaml:master Nov 5, 2020
@mseri mseri deleted the fix-cohttp-3-deps branch November 5, 2020 07:33
@mseri
Copy link
Copy Markdown
Member Author

mseri commented Nov 5, 2020

Ping, upcoming breakage from the cohttp 3.0.0 release:

@hannesm
Copy link
Copy Markdown
Member

hannesm commented Nov 5, 2020

Thanks @mseri for your headsup and release engineering. For letsencrypt (@mmaker), the most recent release is already compatible with cohttp 3 (this PR did not add an upper bound for letsencrypt 0.2.2).

@mseri
Copy link
Copy Markdown
Member Author

mseri commented Nov 5, 2020

Oh, indeed @hannesm, thanks for pointing it out, and sorry @mmaker I thought I had checked them carefully

@tmattio
Copy link
Copy Markdown
Contributor

tmattio commented Nov 5, 2020

Thanks for the ping @mseri! 🙌 Will add an upper bound to Opium.

@Aaylor
Copy link
Copy Markdown
Contributor

Aaylor commented Nov 6, 2020

Thanks for the ping, I'll add the upper bound for github-jsoo !

@dinosaure
Copy link
Copy Markdown
Contributor

Just a note about the server side the update of the API. Due to conduit.3.0.0, the way to launch an HTTP server is a bit different and it was explained here:

(** [create ?timeout ?backlog ?stop ?on_exn cfg protocol service t] is a new
   HTTP server.

    The user can decide to start a simple HTTP server (without encryption)
   or one with TLS encryption. It depends on what the user gives as [cfg],
   [protocol] and [service]. Using [conduit-lwt-tls], the end-user is able
   to make an encrypted HTTP server with:

    {[
      let run =
        create cfg Conduit_lwt_tls.TCP.protocol Conduit_lwt_tls.TCP.service
    ]}

    A simple HTTP server (with [conduit-lwt]) is:

    {[
      let run =
        create cfg Conduit_lwt.TCP.protocol Conduit_lwt.TCP.service
    ]}

    [cfg] depends on the given [service] - and let the user to define which
   port the server use, and, in the case of {!Conduit_lwt_tls.TCP.service},
   which TLS certificate it uses. See [Conduit] for more information about
   {i protocol} and {i service}.

    When provided, the [stop] thread will terminate the server if it
   ever becomes determined.

    When provided, [backlog] will limit the number of open
   connections.

    Every connection will be served in a new lightweight thread that
   is invoked via the callback defined in [t]. If the callback raises
   an exception, it is passed to [on_exn] (by default, to a function
   that logs the exception using the {!Logs} library). *)
val create :
  ?timeout:int ->
  ?backlog:int ->
  ?stop:unit Lwt.t ->
  ?on_exn:(exn -> unit) ->
  'cfg ->
  (_, 'flow) Conduit_lwt.protocol ->
  ('cfg, 't, 'flow) Conduit_lwt.Service.service -> t -> (unit -> unit Lwt.t)

cfg depends on what you give as a Conduit's service - if it's a TLS service, you must pass a certificate and TCP/IP configuration for example. This is the biggest breaking change of this release. In the case of ocurrent for example where the server is launch here, the line should be updated with:

let default_mode =
  { Conduit_lwt.TCP.sockaddr= Unix.PF_INET (Unix.inet_addr_loopback, 8080)
  ; capacity= 40 }

let run ?(mode= default_mode):cfg site =
   let config = ... in
   create cfg Conduit_lwt.TCP.protocol Conduit_lwt.TCP.service config

If someone need any help about migration process, feel free to open an issue in the cohttp repository and I will happy to help you.

@mseri
Copy link
Copy Markdown
Member Author

mseri commented Nov 6, 2020

Also let me mention that Cohttp_lwt_jsoo.Cohttp_lwt_Xhr is now just Cohttp_lwt_jsoo

@joseferben
Copy link
Copy Markdown
Contributor

Thanks @mseri for the heads up, will add an upper bound to Sihl 🙂

@komamitsu
Copy link
Copy Markdown
Contributor

Thanks for the ping @mseri. I'll take care of it.

mseri added a commit to mseri/opam-repository that referenced this pull request Mar 25, 2021
Signed-off-by: Marcello Seri <marcello.seri@gmail.com>
avsm added a commit that referenced this pull request Mar 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants