Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

homepage: tweak typos / grammar #794

Merged
merged 1 commit into from
Feb 25, 2023
Merged

homepage: tweak typos / grammar #794

merged 1 commit into from
Feb 25, 2023

Conversation

anmonteiro
Copy link
Contributor

No description provided.

@hannesm
Copy link
Member

hannesm commented Feb 17, 2023

Thanks, fine to merge. Unfortunately the OCaml-CI reports an issue in the "dream" we use:

File "src/dune", line 19, characters 2-23:

19 |   mirage-crypto-rng.lwt
       ^^^^^^^^^^^^^^^^^^^^^
Error: Library "mirage-crypto-rng.lwt" not found.

The following patch allows that failure to proceed:

diff --git a/dream.opam b/dream.opam
index 335bc4d..4240b7c 100644
--- a/dream.opam
+++ b/dream.opam
@@ -67,7 +67,8 @@ depends: [
   "mirage-stack"
   "mirage-clock" {>= "3.0.0"}  # now_d_ps : unit -> int * int64.
   "mirage-crypto" {>= "0.8.1"}  # AES-256-GCM.
-  "mirage-crypto-rng" {>= "0.8.0"}  # Signature of initialize.
+  "mirage-crypto-rng" {>= "0.11.0"}  # generate random
+  "mirage-crypto-rng-lwt" {>= "0.11.0"}  # Signature of initialize.
   "multipart_form" {>= "0.4.0"}
   "multipart_form-lwt"
   "ocaml" {>= "4.08.0"}
diff --git a/src/dream.ml b/src/dream.ml
index f16f9a8..c8db1f9 100644
--- a/src/dream.ml
+++ b/src/dream.ml
@@ -54,7 +54,9 @@ let now () =
   Ptime.to_float_s (Ptime.v (Ptime_clock.now_d_ps ()))
 
 let () =
-  Random.initialize Mirage_crypto_rng_lwt.initialize
+  Random.initialize
+    (fun () -> Mirage_crypto_rng_lwt.initialize
+        (module Mirage_crypto_rng.Fortuna))
 
 module Session =
 struct
diff --git a/src/dune b/src/dune
index 053e23f..a82c981 100644
--- a/src/dune
+++ b/src/dune
@@ -16,6 +16,6 @@
   logs
   lwt
   lwt.unix
-  mirage-crypto-rng.lwt
+  mirage-crypto-rng-lwt
   ptime.clock.os
  ))

But then, I encountered (a) we're using TheLortex/dream on branch master+mirage, (b) that brings in various submodules as vendor (h2, httpaf, gluten, websocketaf (from aantron Github account), paf (from TheLortex Github account)) -- is it possible to use released versions thereof now? (and/or they may need similar minor tweaks).

@TheLortex any chance you could take a look and upgrade the respective branches? It may require a mirage relesae itself to allow certain packages (since mirage emits upper bounds) -- but such a mirage release is planned anyways once mirage/mirage#1401 passes.

@TheLortex TheLortex self-assigned this Feb 21, 2023
@hannesm
Copy link
Member

hannesm commented Feb 25, 2023

Thanks a lot!

@hannesm hannesm merged commit f4c920d into mirage:master Feb 25, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants