From 266197a425f0f9ba7aae9bdfdc9bc63753d02956 Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Wed, 9 Oct 2024 15:16:35 +0200 Subject: [PATCH 1/3] Set the minimum constraint for ppx_deriving_yaml Older versions like 0.1.1 exit fail with this error: ``` File "tool/ood-gen/lib/success_story.ml", line 13, characters 12-79: 13 | [@@deriving of_yaml, stable_record ~version:t ~add:[ slug; body_md; body_html ]] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: Ppxlib.Deriving: 'of_yaml' is not a supported type deriving generator ``` --- dune-project | 2 +- ocamlorg.opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dune-project b/dune-project index 530808fd14..b375594c0f 100644 --- a/dune-project +++ b/dune-project @@ -66,7 +66,7 @@ (>= 1.10.0))) olinkcheck ; tools/ood-gen - ppx_deriving_yaml + (ppx_deriving_yaml (>= 0.3)) ppx_stable ezjsonm lambdasoup diff --git a/ocamlorg.opam b/ocamlorg.opam index 40d3092094..890a0eda05 100644 --- a/ocamlorg.opam +++ b/ocamlorg.opam @@ -44,7 +44,7 @@ depends: [ "alcotest" {with-test} "mdx" {with-test & >= "1.10.0"} "olinkcheck" - "ppx_deriving_yaml" + "ppx_deriving_yaml" {>= "0.3"} "ppx_stable" "ezjsonm" "lambdasoup" From 7771dcd869dbc2e4315ad2b38229bcb08a8fb3c0 Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Wed, 9 Oct 2024 15:20:19 +0200 Subject: [PATCH 2/3] Fix version of Ptime to include RFC3339 Previous versions fail with ``` File "tool/ood-gen/lib/academic_institution.ml", line 41, characters 53-79: 41 | str ^ "T00:00:00+00:00" |> Ptime.of_rfc3339 |> Ptime.rfc3339_string_error ^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: Unbound value Ptime.rfc3339_string_error ``` --- dune-project | 2 +- ocamlorg.opam | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/dune-project b/dune-project index b375594c0f..478f77d4bc 100644 --- a/dune-project +++ b/dune-project @@ -70,7 +70,7 @@ ppx_stable ezjsonm lambdasoup - ptime + (ptime (>= 1.1.0)) (cmdliner (>= 1.1.0)) xmlm diff --git a/ocamlorg.opam b/ocamlorg.opam index 890a0eda05..5d44d582d9 100644 --- a/ocamlorg.opam +++ b/ocamlorg.opam @@ -48,7 +48,7 @@ depends: [ "ppx_stable" "ezjsonm" "lambdasoup" - "ptime" + "ptime" {>= "1.1.0"} "cmdliner" {>= "1.1.0"} "xmlm" "uri" From cb3fba35bd9b4bec1ae25d82d6791674cbf3a297 Mon Sep 17 00:00:00 2001 From: Marek Kubica Date: Wed, 9 Oct 2024 15:25:52 +0200 Subject: [PATCH 3/3] Add explicit dependency to `mirage-crypto-rng` The old version 0.10.6 fails with ``` File "src/ocamlorg_web/lib/ocamlorg_web.ml", line 12, characters 35-69: 12 | Mirage_crypto_rng_lwt.initialize (module Mirage_crypto_rng.Fortuna); ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Error: This expression is packed module, but the expected type is unit ``` So this adds the dependency to the build files as well as to the OPAM files. --- dune-project | 1 + ocamlorg.opam | 1 + src/ocamlorg_web/lib/dune | 3 ++- 3 files changed, 4 insertions(+), 1 deletion(-) diff --git a/dune-project b/dune-project index 478f77d4bc..ff2b92928f 100644 --- a/dune-project +++ b/dune-project @@ -38,6 +38,7 @@ bos crunch mirage-kv-mem + (mirage-crypto-rng (>= 0.11.0)) dream-accept dream-encoding (graphql diff --git a/ocamlorg.opam b/ocamlorg.opam index 5d44d582d9..e36e5666ac 100644 --- a/ocamlorg.opam +++ b/ocamlorg.opam @@ -25,6 +25,7 @@ depends: [ "bos" "crunch" "mirage-kv-mem" + "mirage-crypto-rng" {>= "0.11.0"} "dream-accept" "dream-encoding" "graphql" {>= "0.14.0"} diff --git a/src/ocamlorg_web/lib/dune b/src/ocamlorg_web/lib/dune index db713ed81c..2564cd2d28 100644 --- a/src/ocamlorg_web/lib/dune +++ b/src/ocamlorg_web/lib/dune @@ -10,7 +10,8 @@ cmarkit ocamlorg.data timedesc - mirage-kv-mem)) + mirage-kv-mem + mirage-crypto-rng)) (rule (deps (universe))