mirage / ocaml-cohttp

An OCaml library for HTTP clients and servers using Lwt or Async
Other
703 stars 173 forks source link

Can't install with opam on ocaml 4.05.0 #567

Closed ghost closed 7 years ago

ghost commented 7 years ago
$ opam switch
--     -- 3.07    Official 3.07 release
--     -- 3.08.0  Official 3.08.0 release
--     -- 3.08.1  Official 3.08.1 release
--     -- 3.08.2  Official 3.08.2 release
--     -- 3.08.3  Official 3.08.3 release
--     -- 3.08.4  Official 3.08.4 release
--     -- 3.09.0  Official 3.09.0 release
--     -- 3.09.1  Official 3.09.1 release
--     -- 3.09.2  Official 3.09.2 release
--     -- 3.09.3  Official 3.09.3 release
--     -- 3.10.0  Official 3.10.0 release
--     -- 3.10.1  Official 3.10.1 release
--     -- 3.10.2  Official 3.10.2 release
--     -- 3.11.0  Official 3.11.0 release
--     -- 3.11.1  Official 3.11.1 release
--     -- 3.11.2  Official 3.11.2 release
--     -- 3.12.0  Official 3.12.0 release
--     -- 3.12.1  Official 3.12.1 release
--     -- 4.00.0  Official 4.00.0 release
--     -- 4.00.1  Official 4.00.1 release
--     -- 4.01.0  Official 4.01.0 release
--     -- 4.02.0  Official 4.02.0 release
4.02.1  I 4.02.1  Official 4.02.1 release
--     -- 4.02.2  Official 4.02.2 release
--     -- 4.02.3  Official 4.02.3 release
4.03.0  I 4.03.0  Official 4.03.0 release
4.04.0  I 4.04.0  Official 4.04.0 release
--     -- 4.04.1  Official 4.04.1 release
--     -- 4.04.2  Official 4.04.2 release
4.05.0  C 4.05.0  Official 4.05.0 release
# 275 more patched or experimental compilers, use '--all' to show
$ opam search cohttp
# Existing packages for 4.05.0:
cohttp               --  HTTP(S) library for Lwt, Async and Mirage
facebook-sdk         --  Facebook Graph API SDK for OCaml
http_router          --  Simple http router for cohttp and async.
mechaml              --  A Mechanize-like web scraping library
mirage-http          --  MirageOS-compatible implementation of the Cohttp interfaces
multipart-form-data  --  multipart/form-data (RFC2388) parser
opium                --  Sinatra like web toolkit based on Lwt + Cohttp
podge                --  Shortcuts and helpers for common tasks in OCaml ecosystem
prometheus           --  Client library for Prometheus monitoring
prometheus-app       --  Client library for Prometheus monitoring
session              --  A session manager for your everyday needs
telegraml            --  Telegram Bot API for OCaml
webmachine           --  A REST toolkit for OCaml
yurt                 --  An HTTP microframework for OCaml
$ opam install cohttp
Your request can't be satisfied:
  - No package matches cohttp.

No solution found, exiting
ghost commented 7 years ago

Can you install conduit (cohttp depends on conduit)? Probably related to https://github.com/mirage/ocaml-conduit/issues/225.

ghost commented 7 years ago

Thanks for the response.

I can't install conduit either - exact same story. Let me know if there's anything else you want me to try to confirm it's not a cohttp issue- my gut feeling tells that it's an opam issue on my end.

ghost commented 7 years ago

I just did some further investigation with the help of the ocaml IRC channel:

conduit requires ppx_deriving, and ppx_deriving is not available for ocaml 4.05

$ opam install ppx_deriving
[ERROR] ppx_deriving is not available because your system doesn't comply with ocaml-version >= "4.02.1" &
        ocaml-version < "4.05" & opam-version >= "1.2".

Which I think means cohttp and 4.05 won't mix?

ghost commented 7 years ago

You can try: opam pin add conduit --dev-repo opam pin add cohttp --dev-repo --dev-repo Pin to the upstream package source for the latest development version It worked for me (with the current state of conduit and cohttp repositories).

rgrinberg commented 7 years ago

It means that ppx_deriving and ocaml 4.05.0 don't mix unfortunately. Luckily, as @alrev alluded to, cohttp in master no longer uses ppx_deriving so I will close this as fixed in master.