Merge pull request 'Fix build of builder-web with more recent packages:' (#166) from fix-build into main
Reviewed-on: #166
This commit is contained in:
commit
d43c3aa26c
5 changed files with 7 additions and 7 deletions
|
@ -892,7 +892,7 @@ let default_cmd, default_info =
|
|||
Cmd.info ~doc "builder-db"
|
||||
|
||||
let () =
|
||||
Mirage_crypto_rng_unix.initialize ();
|
||||
Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna);
|
||||
Cmdliner.Cmd.group
|
||||
~default:default_cmd default_info
|
||||
[ help_cmd; migrate_cmd;
|
||||
|
|
|
@ -22,12 +22,12 @@ depends: [
|
|||
"cstruct" {>= "6.0.0"}
|
||||
"bos"
|
||||
"hex"
|
||||
"lwt" {>= "5.6.0"}
|
||||
"lwt" {>= "5.7.0"}
|
||||
"caqti" {>= "1.8.0"}
|
||||
"caqti-lwt"
|
||||
"caqti-driver-sqlite3"
|
||||
"pbkdf"
|
||||
"mirage-crypto-rng"
|
||||
"mirage-crypto-rng" {>= "0.11.0"}
|
||||
"scrypt-kdf"
|
||||
"opam-core"
|
||||
"opam-format" {>= "2.1.0"}
|
||||
|
|
|
@ -247,7 +247,7 @@ module Viz_aux = struct
|
|||
|> Lwt.return
|
||||
|> if_error "Error finding a version of the requested visualization")
|
||||
>>= fun viz_path ->
|
||||
Lwt_result.catch (
|
||||
Lwt_result.catch (fun () ->
|
||||
Lwt_io.with_file ~mode:Lwt_io.Input
|
||||
(Fpath.to_string viz_path)
|
||||
Lwt_io.read
|
||||
|
|
|
@ -15,7 +15,7 @@ module Writer = struct
|
|||
| `Await gz -> state.gz <- gz ; Lwt.return_unit
|
||||
| `Flush gz ->
|
||||
let max = Cstruct.length oc - Gz.Def.dst_rem gz in
|
||||
let str = Cstruct.copy oc 0 max in
|
||||
let str = Cstruct.to_string ~len:max oc in
|
||||
Dream.write stream str >>= fun () ->
|
||||
let { Cstruct.buffer; off= cs_off; len= cs_len; } = oc in
|
||||
until_await (Gz.Def.dst gz buffer cs_off cs_len)
|
||||
|
@ -76,7 +76,7 @@ let targz_response datadir finish (files : Builder_db.file list) (stream : Dream
|
|||
| `Await _gz -> assert false
|
||||
| `Flush gz | `End gz as flush_or_end ->
|
||||
let max = Cstruct.length state.oc - Gz.Def.dst_rem gz in
|
||||
let str = Cstruct.copy state.oc 0 max in
|
||||
let str = Cstruct.to_string ~len:max state.oc in
|
||||
Dream.write stream str >>= fun () -> match flush_or_end with
|
||||
| `Flush gz ->
|
||||
let { Cstruct.buffer; off= cs_off; len= cs_len; } = state.oc in
|
||||
|
|
|
@ -3,7 +3,7 @@ let ( >>| ) x f = Result.map f x
|
|||
|
||||
module type CONN = Caqti_blocking.CONNECTION
|
||||
|
||||
let () = Mirage_crypto_rng_unix.initialize ()
|
||||
let () = Mirage_crypto_rng_unix.initialize (module Mirage_crypto_rng.Fortuna)
|
||||
|
||||
let iter f xs = List.fold_left (fun r x -> r >>= fun () -> f x) (Ok ()) xs
|
||||
let get_opt message = function
|
||||
|
|
Loading…
Reference in a new issue