remove usage of cstruct, require mirage-crypto 1.0.0 #1
Loading…
Reference in a new issue
No description provided.
Delete branch "no-cstruct"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
ready for review, but for compiling requires:
//cc @reynir
I also:
Thanks! This looks great. Pinning caqti this seems to work for me. I will merge once caqti has been released.
@ -44,3 +44,3 @@
match user_info.password_hash with
| `Pbkdf2_sha256 (password_hash, salt, params) ->
Cstruct.equal
String.equal
Here we should probably have used Eqaf in the first place. But let's save that for another PR.
@ -77,3 +77,3 @@
Db.collect_list builds () >>= fun builds ->
Grej.list_iter_result (fun (id, opam_sha, env_sha, pkg_sha) ->
let input_id = Mirage_crypto.Hash.SHA256.digest (Cstruct.concat [ opam_sha ; env_sha ; pkg_sha ]) in
let input_id = Digestif.SHA256.(to_raw_string (digestv_string [ opam_sha ; env_sha ; pkg_sha ])) in
I like this! We now avoid allocating an intermediate string :D
@ -24,3 +23,3 @@
"hex"
"ohex" {>= "0.2.0"}
"lwt" {>= "5.7.0"}
"caqti" {>= "2.1.1"}
This will need to be updated once we have a caqti release.
@ -224,7 +224,7 @@ module Build = struct
Fpath.pp t.script
t.platform
Fmt.(Dump.option int64) t.main_binary
Fmt.(Dump.option (using Cstruct.to_string string)) t.input_id
Reading the documentation for
Fmt.using
I'm confused what it does. But the new code looks good to me.FWIW caqti is released https://github.com/ocaml/opam-repository/pull/26479
CI run at https://github.com/robur-coop/builder-web/runs/29735284723 looks promising. IMHO good to merge. And maybe we should cut a release to opam-repository?