Skip to content

Commit 23be80b

Browse files
authored
Bump OCaml framework versions (#8639)
* chore: bump OCaml/webmachine versions * chore: bump OCaml/httpaf versions
1 parent 752b9b8 commit 23be80b

File tree

11 files changed

+13
-15
lines changed

11 files changed

+13
-15
lines changed

frameworks/OCaml/httpaf/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
(executable
22
(name httpaf_unix)
3-
(libraries httpaf httpaf-lwt-unix lwt lwt.unix yojson))
3+
(libraries httpaf httpaf-lwt-unix lwt lwt.unix yojson unix))

frameworks/OCaml/httpaf/dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
(lang dune 2.7)
1+
(lang dune 3.9)

frameworks/OCaml/httpaf/httpaf.dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
# https://github.com/rbjorklin/techempower-ocaml-image
44
# Use pre-built image with all dependencies for faster test times
5-
FROM rbjorklin/techempower-ocaml-image:4.14.1-4bf86567
5+
FROM rbjorklin/techempower-ocaml-image:5.1.1-b58c72ee
66

77
# https://caml.inria.fr/pub/docs/manual-ocaml/libref/Gc.html
88
# https://linux.die.net/man/1/ocamlrun

frameworks/OCaml/httpaf/httpaf_unix.ml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ let main () =
170170
accept_loop socket handler);
171171
let forever, _ = Lwt.wait () in
172172
Lwt_main.run forever;
173-
exit 0 )
173+
exit 0)
174174
done;
175175

176176
while true do

frameworks/OCaml/webmachine/src/dune-project

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
(lang dune 2.7)
1+
(lang dune 3.9)
22
(name webmachine-tfb)
33

44
(generate_opam_files true)

frameworks/OCaml/webmachine/src/lib.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license: "MIT"
66
homepage: "https://github.com/TechEmpower/FrameworkBenchmarks"
77
bug-reports: "https://github.com/TechEmpower/FrameworkBenchmarks/issues"
88
depends: [
9-
"dune" {>= "2.7" & >= "2.8.5"}
9+
"dune" {>= "3.9" & >= "2.8.5"}
1010
"biniou" {>= "1.2.1"}
1111
"yojson" {>= "1.7.0"}
1212
"atd" {>= "2.2.1"}

frameworks/OCaml/webmachine/src/src/bin/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
(executable
2-
(libraries webmachine lwt cohttp-lwt-unix caqti caqti-lwt caqti-driver-postgresql yojson atdgen-runtime lib)
2+
(libraries webmachine lwt cohttp-lwt-unix caqti caqti-lwt caqti-driver-postgresql yojson atdgen-runtime lib unix)
33
(preprocess (pps lwt_ppx))
44
(public_name tfb)
55
(package tfb)

frameworks/OCaml/webmachine/src/src/bin/tfb.ml

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ let or_error m =
3939
Error (Database_error (Caqti_error.show err)) |> Lwt.return
4040

4141
let select_random =
42-
Caqti_request.find Caqti_type.int
43-
Caqti_type.(tup2 int int)
42+
let open Caqti_request.Infix in
43+
Caqti_type.(int ->! tup2 int int)
4444
"SELECT id, randomNumber FROM World WHERE id = $1"
4545

4646
class hello =
4747
object (self)
4848
inherit [Cohttp_lwt.Body.t] Wm.resource
49-
5049
method! allowed_methods rd = Wm.continue [ `GET ] rd
5150

5251
method content_types_provided rd =
@@ -68,7 +67,6 @@ class hello =
6867
class db =
6968
object (self)
7069
inherit [Cohttp_lwt.Body.t] Wm.resource
71-
7270
method! allowed_methods rd = Wm.continue [ `GET ] rd
7371

7472
method content_types_provided rd =
@@ -228,7 +226,7 @@ let main () =
228226
Lwt.async (fun () -> Server.create ~mode:(`TCP (`Socket socket)) config);
229227
let forever, _ = Lwt.wait () in
230228
Lwt_main.run forever;
231-
exit 0 )
229+
exit 0)
232230
done;
233231
while true do
234232
Unix.pause ()

frameworks/OCaml/webmachine/src/src/lib/dune

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
(library
22
(name lib)
33
(public_name lib)
4-
(libraries yojson atdgen-runtime)
4+
(libraries yojson atdgen-runtime unix)
55
(preprocess (pps lwt_ppx)))
66

77
(rule

frameworks/OCaml/webmachine/src/tfb.opam

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ license: "MIT"
66
homepage: "https://github.com/TechEmpower/FrameworkBenchmarks"
77
bug-reports: "https://github.com/TechEmpower/FrameworkBenchmarks/issues"
88
depends: [
9-
"dune" {>= "2.7" & >= "2.8.5"}
9+
"dune" {>= "3.9" & >= "2.8.5"}
1010
"webmachine" {>= "0.7.0"}
1111
"lwt" {>= "5.4.1"}
1212
"conf-libev" {>= "4-12"}

0 commit comments

Comments
 (0)