diff --git a/.github/workflows/workflow.yml b/.github/workflows/workflow.yml index b3db34305a..ecd6e93c1d 100644 --- a/.github/workflows/workflow.yml +++ b/.github/workflows/workflow.yml @@ -35,7 +35,6 @@ jobs: - name: Checkout code uses: actions/checkout@v3 - - name: Use OCaml ${{ matrix.ocaml-compiler }} uses: ocaml/setup-ocaml@v2 with: @@ -48,12 +47,6 @@ jobs: - run: yarn --frozen-lockfile working-directory: cohttp-lwt-jsoo/test - - run: | - sudo apt update - sudo apt upgrade - opam depext conf-libcurl - if: ${{ matrix.os == 'ubuntu-latest' }} - - run: echo "PKG_CONFIG_PATH=$(brew --prefix openssl)/lib/pkgconfig" >>"$GITHUB_ENV" if: ${{ matrix.os == 'macos-latest' }} diff --git a/.ocamlformat b/.ocamlformat index 9788f92251..66c6dc7917 100644 --- a/.ocamlformat +++ b/.ocamlformat @@ -1,3 +1,4 @@ +version = 0.21.0 profile = conventional break-infix = fit-or-vertical -parse-docstrings = true +parse-docstrings = true \ No newline at end of file diff --git a/dune-project b/dune-project index 6d159935ae..483b12939f 100644 --- a/dune-project +++ b/dune-project @@ -115,26 +115,18 @@ should also be fine under Windows too. (package (name cohttp-server-lwt-unix) (synopsis "Lightweight Cohttp + Lwt based HTTP server") - (description - "This server implementation is faster than cohttp-lwt-unix and is independent of\nconduit.\n") + (description "\ +This server implementation is faster than cohttp-lwt-unix and is independent of +conduit. +") (depends - (ocaml - (>= 4.08)) - (http - (= :version)) - (cohttp - (= :version)) - (cohttp-lwt - (= :version)) + (ocaml (>= 4.08)) + (http (= :version)) + (cohttp (= :version)) + (cohttp-lwt (= :version)) (conduit-lwt-unix :with-test) - (cohttp-lwt-unix - (and - :with-test - (= :version))) - (cohttp-lwt - (and - :with-test - (= :version))) + (cohttp-lwt-unix (and :with-test (= :version))) + (cohttp-lwt (and :with-test (= :version))) lwt)) (package @@ -252,7 +244,7 @@ should also be fine under Windows too. :with-test (>= v0.13.0))) (core_bench :with-test) - (crowbar :with-test) + (crowbar (and :with-test (>= 0.2))) (sexplib0 :with-test))) (package @@ -260,31 +252,25 @@ should also be fine under Windows too. (synopsis "Shared code between the individual cohttp-curl clients") (description "Use cohttp-curl-lwt or cohttp-curl-async") (depends - (ocaml - (>= 4.08)) + (ocaml (>= 4.08)) ocurl - (http - (= :version)) + (http (= :version)) stringext)) (package (name cohttp-curl-lwt) (synopsis "Cohttp client using Curl & Lwt as the backend") - (description - "An HTTP client that relies on Curl + Lwt for the backend. Does not require\nconduit for SSL.") + (description "\ +An HTTP client that relies on Curl + Lwt for the backend. Does not require +conduit for SSL.") (depends - (ocaml - (>= 4.08)) + (ocaml (>= 4.08)) ocurl - (http - (= :version)) + (http (= :version)) cohttp-curl stringext lwt - (uri - (and - :with-test - (>= 4.2.0))) + (uri (and :with-test (>= 4.2.0))) (alcotest :with-test) (cohttp-lwt-unix :with-test) (cohttp :with-test) @@ -295,22 +281,19 @@ should also be fine under Windows too. (package (name cohttp-curl-async) (synopsis "Cohttp client using Curl & Async as the backend") - (description - "An HTTP client that relies on Curl + Async for the backend. Does not require\nconduit for SSL.") + (description "\ +An HTTP client that relies on Curl + Async for the backend. Does not require +conduit for SSL.") (depends ocurl - (http - (= :version)) + (http (= :version)) stringext core (core_unix (>= v0.14.0)) async_kernel async_unix (cohttp-async :with-test) - (uri - (and - :with-test - (>= 4.2.0))) + (uri (and :with-test (>= 4.2.0))) (fmt :with-test) (ounit :with-test) (alcotest :with-test))) @@ -324,16 +307,11 @@ should also be fine under Windows too. (core (>= v0.13.0)) core_bench - (http - (= :version)) - (cohttp - (= :version)) - (cohttp-lwt-unix - (= :version)) - (cohttp-server-lwt-unix - (= :version)) - (cohttp-async - (= :version)))) +(http (= :version)) + (cohttp (= :version)) + (cohttp-lwt-unix (= :version)) + (cohttp-server-lwt-unix (= :version)) + (cohttp-async (= :version)))) (package (name cohttp-eio) @@ -350,4 +328,4 @@ should also be fine under Windows too. (eio_main :with-test) (conf-nmap :with-test) (http - (= :version)))) + (= :version)))) \ No newline at end of file diff --git a/http.opam b/http.opam index 68df2b521b..db65b155ed 100644 --- a/http.opam +++ b/http.opam @@ -31,7 +31,7 @@ depends: [ "ppx_here" {with-test} "core" {with-test & >= "v0.13.0"} "core_bench" {with-test} - "crowbar" {with-test} + "crowbar" {with-test & >= "0.2"} "sexplib0" {with-test} "odoc" {with-doc} ] diff --git a/test_helpers/cohttp_test/src/cohttp_test.ml b/test_helpers/cohttp_test/src/cohttp_test.ml index 50b80e3953..7ff002bda2 100644 --- a/test_helpers/cohttp_test/src/cohttp_test.ml +++ b/test_helpers/cohttp_test/src/cohttp_test.ml @@ -27,9 +27,7 @@ module type S = sig val run_async_tests : OUnit.test io -> OUnit.test_results io end -let port = - Random.self_init (); - ref (1024 + Random.int 40000) +let port = Random.self_init (); ref (1024 + Random.int 40000) let next_port () = let current_port = !port in