From 4646ece737725a41bbeadbb312b57f7b796cce2b Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 12 Mar 2016 10:17:28 +0000 Subject: [PATCH 1/7] sync CHANGES --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index 64e4032c..41716d53 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,7 @@ * Add multi-distro Travis testing script. * Switch to using `pa_sexp_conv` for latest sexp. +* Fix `vchan` example code, and use functoria-style mirage + for it (#108 via @jonludlam) 0.10.0 (2015-12-25): * Add support for CA certificates in [Conduit_async.serve] (#98). From 6cfa1254aae07c59889b284bd2f0b65be4ea1cf2 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 12 Mar 2016 10:36:17 +0000 Subject: [PATCH 2/7] update travis --- .travis.yml | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/.travis.yml b/.travis.yml index e72e8f6e..0f005f39 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,14 +7,15 @@ script: bash ./.travis-docker.sh env: global: - PACKAGE="conduit" + - DEPOPTS="async_ssl lwt mirage-dns ssl tls" matrix: - - DISTRO=debian-stable OCAML_VERSION=4.02.3 DEPOPTS="lwt" - - DISTRO=debian-testing OCAML_VERSION=4.02.3 DEPOPTS="lwt ssl tls" - - DISTRO=debian-unstable OCAML_VERSION=4.02.3 DEPOPTS="async_ssl.113.00.01" - - DISTRO=ubuntu-12.04 OCAML_VERSION=4.01.0 DEPOPTS="lwt ssl async" - - DISTRO=ubuntu-15.10 OCAML_VERSION=4.02.3 DEPOPTS="lwt async_ssl.113.00.01" - - DISTRO=ubuntu-16.04 OCAML_VERSION=4.02.3 DEPOPTS="lwt async_ssl.113.00.01" - - DISTRO=centos-6 OCAML_VERSION=4.01.0 DEPOPTS="lwt ssl async" - - DISTRO=centos-7 OCAML_VERSION=4.02.3 DEPOPTS="lwt async_ssl.113.00.01" - - DISTRO=fedora-23 OCAML_VERSION=4.02.3 DEPOPTS="lwt async_ssl.113.00.01" - - DISTRO=alpine-3.3 OCAML_VERSION=4.02.3 DEPOPTS="lwt" + - DISTRO=debian-stable OCAML_VERSION=4.02.3 + - DISTRO=debian-testing OCAML_VERSION=4.02.3 + - DISTRO=debian-unstable OCAML_VERSION=4.02.3 + - DISTRO=ubuntu-12.04 OCAML_VERSION=4.02.3 + - DISTRO=ubuntu-15.10 OCAML_VERSION=4.02.3 + - DISTRO=ubuntu-16.04 OCAML_VERSION=4.02.3 + - DISTRO=centos-6 OCAML_VERSION=4.02.3 + - DISTRO=centos-7 OCAML_VERSION=4.02.3 + - DISTRO=fedora-23 OCAML_VERSION=4.02.3 + - DISTRO=alpine-3.3 OCAML_VERSION=4.02.3 From 6d411bd3ef67e4966331acff6e5b195780a80a08 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 12 Mar 2016 10:36:25 +0000 Subject: [PATCH 3/7] add support for pa_sexp_conv and support latest Async --- CHANGES | 3 +++ build.sh | 6 +++--- lib/conduit_async.ml | 4 ++-- lib/conduit_async.mli | 1 - opam | 3 +-- 5 files changed, 9 insertions(+), 8 deletions(-) diff --git a/CHANGES b/CHANGES index 41716d53..cfdd9d91 100644 --- a/CHANGES +++ b/CHANGES @@ -1,5 +1,8 @@ +0.11.0 (trunk): +* Minimum OCaml version is now 4.02.3 * Add multi-distro Travis testing script. * Switch to using `pa_sexp_conv` for latest sexp. +* Support Core/Async >=113.24 * Fix `vchan` example code, and use functoria-style mirage for it (#108 via @jonludlam) diff --git a/build.sh b/build.sh index 7086674c..aaa92f85 100755 --- a/build.sh +++ b/build.sh @@ -4,13 +4,13 @@ TAGS=principal,annot,bin_annot,short_paths,thread,strict_sequence J_FLAG=2 BASE_PKG="sexplib ipaddr cstruct uri stringext" -SYNTAX_PKG="camlp4.macro sexplib.syntax" +SYNTAX_PKG="camlp4.macro pa_sexp_conv" # The Async backend is only supported in OCaml 4.01.0+ OCAML_VERSION=`ocamlc -version` case $OCAML_VERSION in -4.00.*|3.*) - echo Async backend only supported in OCaml 4.01.0 or higher +4.01.*|4.00.*|3.*) + echo Minimum OCaml version is 4.02 ;; *) HAVE_ASYNC=`ocamlfind query async 2>/dev/null || true` diff --git a/lib/conduit_async.ml b/lib/conduit_async.ml index c6dfe800..4c99b1a4 100644 --- a/lib/conduit_async.ml +++ b/lib/conduit_async.ml @@ -122,7 +122,7 @@ type server = [ ] with sexp let serve - ?max_connections ?max_pending_connections + ?max_connections ?buffer_age_limit ?on_handler_error mode where_to_listen handle_request = let handle_client handle_request sock rd wr = match mode with @@ -150,6 +150,6 @@ ELSE raise Ssl_unsupported END in - Tcp.Server.create ?max_connections ?max_pending_connections + Tcp.Server.create ?max_connections ?buffer_age_limit ?on_handler_error where_to_listen (handle_client handle_request) diff --git a/lib/conduit_async.mli b/lib/conduit_async.mli index abb30d9f..e434671c 100644 --- a/lib/conduit_async.mli +++ b/lib/conduit_async.mli @@ -97,7 +97,6 @@ type server = [ val serve : ?max_connections:int -> - ?max_pending_connections:int -> ?buffer_age_limit:Writer.buffer_age_limit -> ?on_handler_error:[ `Call of ([< Socket.Address.t ] as 'a) -> exn -> unit | `Ignore diff --git a/opam b/opam index ea9877e1..81b6a228 100644 --- a/opam +++ b/opam @@ -14,7 +14,7 @@ remove: ["ocamlfind" "remove" "conduit"] depends: [ "ocamlfind" {build} "ocamlbuild" {build} - "sexplib" {>="109.15.00" & <"113.24.00"} + "pa_sexp_conv" "type_conv" "stringext" "uri" @@ -35,7 +35,6 @@ depopts: [ conflicts: [ "lwt" {<"2.4.4"} "async_ssl" {<"112.24.00"} - "async" {>"113.24.00"} "mirage-types" {<"2.0.0"} "dns" {<"0.10.0"} "tls" {<"0.4.0"} From ca3047ac2e96bb955f67d331fdf165d384f6ee49 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 12 Mar 2016 10:36:54 +0000 Subject: [PATCH 4/7] opam; note async constraint --- opam | 1 + 1 file changed, 1 insertion(+) diff --git a/opam b/opam index 81b6a228..bf502479 100644 --- a/opam +++ b/opam @@ -35,6 +35,7 @@ depopts: [ conflicts: [ "lwt" {<"2.4.4"} "async_ssl" {<"112.24.00"} + "async" {<"113.24.00"} "mirage-types" {<"2.0.0"} "dns" {<"0.10.0"} "tls" {<"0.4.0"} From cd23daaa2260592b854061d05463e21b00b7b2bf Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 12 Mar 2016 10:38:22 +0000 Subject: [PATCH 5/7] sync CHANGES --- CHANGES | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGES b/CHANGES index cfdd9d91..fdcab936 100644 --- a/CHANGES +++ b/CHANGES @@ -5,6 +5,8 @@ * Support Core/Async >=113.24 * Fix `vchan` example code, and use functoria-style mirage for it (#108 via @jonludlam) +* [async] Add an `Ssl_unsupported exception` for Async rather than + just raising `Failure` 0.10.0 (2015-12-25): * Add support for CA certificates in [Conduit_async.serve] (#98). From e696b308e8462d28f7d71d3fdf92ed573b84e4d3 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 12 Mar 2016 10:45:56 +0000 Subject: [PATCH 6/7] opam: minimum ocaml 4.02+ --- opam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/opam b/opam index bf502479..0afc6329 100644 --- a/opam +++ b/opam @@ -42,4 +42,4 @@ conflicts: [ "vchan" {<"2.0.0"} "nocrypto" {<"0.4.0"} ] -available: [ocaml-version >= "4.01.0"] +available: [ocaml-version >= "4.02.0"] From e5ec90de7fcaecd4eb32407643a0a398ab702113 Mon Sep 17 00:00:00 2001 From: Anil Madhavapeddy Date: Sat, 12 Mar 2016 10:53:02 +0000 Subject: [PATCH 7/7] travis: remove tls until mirleft/ocaml-tls#320 is resolved --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 0f005f39..325c7edb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -7,7 +7,7 @@ script: bash ./.travis-docker.sh env: global: - PACKAGE="conduit" - - DEPOPTS="async_ssl lwt mirage-dns ssl tls" + - DEPOPTS="async_ssl lwt mirage-dns ssl" matrix: - DISTRO=debian-stable OCAML_VERSION=4.02.3 - DISTRO=debian-testing OCAML_VERSION=4.02.3