Skip to content

Commit

Permalink
Update to cohttp 2.0
Browse files Browse the repository at this point in the history
Fixes #16
  • Loading branch information
brendanlong committed Mar 1, 2019
1 parent dbed098 commit 5217f00
Show file tree
Hide file tree
Showing 16 changed files with 250 additions and 270 deletions.
312 changes: 157 additions & 155 deletions esy.lock/index.json

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ binary data in an ASCII string format by translating it into a radix-64
representation. It is specified in RFC 4648.
"""
depends: [
"ocaml" {>="4.03.0"}
"base-bytes"
"dune" {build & >= "1.0.1"}
"bos" {with-test}
Expand All @@ -26,8 +27,12 @@ build: [
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name] {with-test}
]
conflicts: [
"extlib"
"extlib-compat"
]
url {
src:
"https://github.com/mirage/ocaml-base64/releases/download/v2.3.0/base64-v2.3.0.tbz"
checksum: "md5=f0b29524dbaff3ac6eb4d6c578b1b80d"
"https://github.com/mirage/ocaml-base64/releases/download/v3.1.0/base64-v3.1.0.tbz"
checksum: "md5=9847073feb4272e513d8c832904e1af7"
}
71 changes: 0 additions & 71 deletions esy.lock/opam/cohttp-async.1.2.0/opam

This file was deleted.

53 changes: 53 additions & 0 deletions esy.lock/opam/cohttp-async.2.0.0/opam
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
opam-version: "2.0"
maintainer: "[email protected]"
authors: [
"Anil Madhavapeddy"
"Stefano Zacchiroli"
"David Sheets"
"Thomas Gazagnaire"
"David Scott"
"Rudi Grinberg"
"Andy Ray"
]
synopsis: "CoHTTP implementation for the Async concurrency library"
description: """
An implementation of an HTTP client and server using the Async
concurrency library. See the `Cohttp_async` module for information
on how to use this. The package also installs `cohttp-curl-async`
and a `cohttp-server-async` binaries for quick uses of a HTTP(S)
client and server respectively.
"""
license: "ISC"
tags: ["org:mirage" "org:xapi-project"]
homepage: "https://github.com/mirage/ocaml-cohttp"
doc: "https://mirage.github.io/ocaml-cohttp/"
bug-reports: "https://github.com/mirage/ocaml-cohttp/issues"
depends: [
"ocaml" {>= "4.04.1"}
"dune" {build & >= "1.1.0"}
"async_kernel" {>= "v0.11.0" & < "v0.12"}
"async_unix" {>= "v0.11.0" & < "v0.12"}
"async_extra" {>= "v0.11.0" & < "v0.12"}
"base" {>= "v0.11.0" & < "v0.12"}
"core" {with-test & < "v0.12"}
"cohttp"
"conduit-async" {>="1.2.0"}
"magic-mime"
"logs"
"fmt" {>= "0.8.2"}
"sexplib0" {< "v0.12"}
"ppx_sexp_conv" {>= "v0.9.0" & < "v0.12"}
"ounit" {with-test}
"uri" {>= "2.0.0"}
]
build: [
["dune" "subst"] {pinned}
["dune" "build" "-p" name "-j" jobs]
["dune" "runtest" "-p" name "-j" jobs] {with-test}
]
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
url {
src:
"https://github.com/mirage/ocaml-cohttp/releases/download/v2.0.0/cohttp-v2.0.0.tbz"
checksum: "md5=c354599fdb4f2625b6510182de0fc86b"
}
43 changes: 17 additions & 26 deletions esy.lock/opam/cohttp.1.2.0/opam → esy.lock/opam/cohttp.2.0.0/opam
Original file line number Diff line number Diff line change
@@ -1,22 +1,23 @@
opam-version: "2.0"
maintainer: "[email protected]"
authors: [
"Anil Madhavapeddy"
"Stefano Zacchiroli"
"David Sheets"
"Thomas Gazagnaire"
"David Scott"
"Rudi Grinberg"
"Andy Ray"
]
synopsis: "An OCaml library for HTTP clients and servers"
description: """
[![Join the chat at https://gitter.im/mirage/ocaml-cohttp](https://badges.gitter.im/Join%20Chat.svg)](https://gitter.im/mirage/ocaml-cohttp?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge)

Cohttp is an OCaml library for creating HTTP daemons. It has a portable
HTTP parser, and implementations using various asynchronous programming
libraries:
libraries.

* `Cohttp_lwt_unix` uses the [Lwt](https://ocsigen.org/lwt/) library, and
specifically the UNIX bindings.
* `Cohttp_async` uses the [Async](https://realworldocaml.org/v1/en/html/concurrent-programming-with-async.html)
library.
* `Cohttp_lwt` exposes an OS-independent Lwt interface, which is used
by the [Mirage](https://mirage.io/) interface to generate standalone
microkernels (use the cohttp-mirage subpackage).
* `Cohttp_lwt_xhr` compiles to a JavaScript module that maps the Cohttp
calls to XMLHTTPRequests. This is used to compile OCaml libraries like
the GitHub bindings to JavaScript and still run efficiently.
See the cohttp-async, cohttp-lwt, cohttp-lwt-unix, cohttp-lwt-jsoo and
cohttp-mirage libraries for concrete implementations for particular
targets.

You can implement other targets using the parser very easily. Look at the `IO`
signature in `lib/s.mli` and implement that in the desired backend.
Expand All @@ -25,16 +26,6 @@ You can activate some runtime debugging by setting `COHTTP_DEBUG` to any
value, and all requests and responses will be written to stderr. Further
debugging of the connection layer can be obtained by setting `CONDUIT_DEBUG`
to any value."""
maintainer: "[email protected]"
authors: [
"Anil Madhavapeddy"
"Stefano Zacchiroli"
"David Sheets"
"Thomas Gazagnaire"
"David Scott"
"Rudi Grinberg"
"Andy Ray"
]
license: "ISC"
tags: ["org:mirage" "org:xapi-project"]
homepage: "https://github.com/mirage/ocaml-cohttp"
Expand All @@ -50,7 +41,7 @@ depends: [
"ppx_fields_conv" {>= "v0.9.0" & < "v0.12"}
"ppx_sexp_conv" {>= "v0.9.0" & < "v0.12"}
"stringext"
"base64" {>= "2.0.0" & < "3.0.0"}
"base64" {>= "3.1.0"}
"fmt" {with-test}
"jsonm" {build}
"alcotest" {with-test}
Expand All @@ -63,6 +54,6 @@ build: [
dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git"
url {
src:
"https://github.com/mirage/ocaml-cohttp/releases/download/v1.2.0/cohttp-v1.2.0.tbz"
checksum: "md5=7aa3d4582848afff9a62f866b23173e1"
"https://github.com/mirage/ocaml-cohttp/releases/download/v2.0.0/cohttp-v2.0.0.tbz"
checksum: "md5=c354599fdb4f2625b6510182de0fc86b"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,6 @@ structures directly from OCaml. It supports both reading and writing to these
structures, and they are accessed via the `Bigarray` module."""
url {
src:
"https://github.com/mirage/ocaml-cstruct/releases/download/v3.4.0/cstruct-v3.4.0.tbz"
checksum: "md5=f32544c90e5f6212977473895166d55b"
"https://github.com/mirage/ocaml-cstruct/releases/download/v3.5.0/cstruct-v3.5.0.tbz"
checksum: "md5=019c59aa18690fc05b80be1720efb6e5"
}
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,6 @@ packages across several versions of OCaml and gives cross-compilation
for free.
"""
url {
src: "https://github.com/ocaml/dune/releases/download/1.7.1/dune-1.7.1.tbz"
checksum: "md5=7b184c8d74ec5177f9bb2f4c4a035c4f"
src: "https://github.com/ocaml/dune/releases/download/1.7.3/dune-1.7.3.tbz"
checksum: "md5=644f0c1419d70b9daccac4b4e5664523"
}
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ conflicts: [
synopsis:
"OCamlbuild is a build system with builtin rules to easily build most OCaml projects."
depends: [
"ocaml" {>= "4.03" & < "4.08.0"}
"ocaml" {>= "4.03"}
]
url {
src: "https://github.com/ocaml/ocamlbuild/archive/0.12.0.tar.gz"
checksum: "md5=442baa19470bd49150f153122e22907b"
src: "https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz"
checksum: "sha256=87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78"
}
2 changes: 1 addition & 1 deletion esy.lock/opam/ounit.2.0.8/opam
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@ synopsis:
"Unit testing framework loosely based on HUnit. It is similar to JUnit, and other XUnit testing frameworks"
flags: light-uninstall
url {
src: "https://forge-static.ocamlcore.org/frs/download.php/1749/ounit-2.0.8.tar.gz"
src: "https://download.ocamlcore.org/ounit/ounit/2.0.8/ounit-2.0.8.tar.gz"
checksum: "md5=bd12d66c9dbd95a50570bb686b0f10f5"
}
4 changes: 2 additions & 2 deletions esy.lock/opam/ppxlib.0.5.0/opam
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ run-test: [
]
depends: [
"ocaml" {>= "4.04.1"}
"base" {>= "v0.11.0" & < "v0.12"}
"base" {>= "v0.11.0" & < "v0.13"}
"dune" {build}
"ocaml-compiler-libs" {>= "v0.11.0"}
"ocaml-migrate-parsetree" {>= "1.0.9"}
"ppx_derivers" {>= "1.0"}
"stdio" {>= "v0.11.0" & < "v0.12"}
"stdio" {>= "v0.11.0" & < "v0.13"}
"ocamlfind" {with-test}
]
synopsis: "Base library and tools for ppx rewriters"
Expand Down
4 changes: 2 additions & 2 deletions esy.lock/opam/uri.2.2.0/opam
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ depends: [
"ocaml" {>= "4.04.0"}
"dune" {build & >= "1.2.0"}
"ounit" {with-test & >= "1.0.2"}
"ppx_sexp_conv" {build & >= "v0.9.0" & < "v0.12"}
"ppx_sexp_conv" {build & >= "v0.9.0" & < "v0.13"}
"re" {>= "1.7.2"}
"sexplib0" {< "v0.12"}
"sexplib0" {< "v0.13"}
"stringext" {>= "1.4.0"}
]
build: [
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
[
"bash",
"-c",
"#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.12.0.patch' : 'true'}"
"#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}"
],
[
"make",
Expand Down
4 changes: 2 additions & 2 deletions sentry.opam
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ build-test: ["dune" "runtest" "-p" name "-j" jobs]
depends: [
"async" {>= "v0.10"}
"atdgen"
"cohttp" {< "2.0.0"}
"cohttp-async" {>= "1.0.2" & < "2.0.0"}
"cohttp" {>= "2.0.0"}
"cohttp-async" {>= "2.0.0"}
"core" {>= "v0.10"}
"hex" {>= "1.2.0"}
"json-derivers"
Expand Down
2 changes: 1 addition & 1 deletion src/dune
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(library
(public_name sentry)
(libraries async_kernel atdgen cohttp.async core_kernel hex json-derivers uri uuidm re2 yojson)
(libraries async_kernel atdgen cohttp-async core_kernel hex json-derivers uri uuidm re2 yojson)
(inline_tests (flags (-verbose)))
(preprocess (pps ppx_jane bisect_ppx -- -conditional -exclude-file src/.exclude))
(preprocessor_deps .exclude))
Expand Down

0 comments on commit 5217f00

Please sign in to comment.