From 1fc31f365999e8dbb5c824d8d06674d1b64ed0cb Mon Sep 17 00:00:00 2001 From: bmourad01 Date: Mon, 29 Jul 2024 13:41:08 -0400 Subject: [PATCH] Fix use of camlzip in byteweight --- bap-byteweight.opam | 2 +- dune-project | 2 +- lib/bap_byteweight/bap_byteweight_signatures.ml | 5 ++--- 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/bap-byteweight.opam b/bap-byteweight.opam index 30eebb787..f92fdb897 100644 --- a/bap-byteweight.opam +++ b/bap-byteweight.opam @@ -12,7 +12,7 @@ depends: [ "dune" {>= "3.1"} "bap-signatures" {= version} "bap-std" {= version} - "camlzip" {>= "1.0" & < "2.0"} + "camlzip" {>= "1.12" & < "2.0"} "core_kernel" {>= "v0.14" & < "v0.16"} "bap-common" {= version} "ppx_bap" {= version} diff --git a/dune-project b/dune-project index a9132b891..440670ff0 100644 --- a/dune-project +++ b/dune-project @@ -283,7 +283,7 @@ (depends (bap-signatures (= :version)) (bap-std (= :version)) - (camlzip (and (>= 1.0) (< 2.0))) + (camlzip (and (>= 1.12) (< 2.0))) (core_kernel (and (>= v0.14) (< v0.16))) (bap-common (= :version)) (ppx_bap (= :version)) diff --git a/lib/bap_byteweight/bap_byteweight_signatures.ml b/lib/bap_byteweight/bap_byteweight_signatures.ml index cfe67c5e5..6d2ff0412 100644 --- a/lib/bap_byteweight/bap_byteweight_signatures.ml +++ b/lib/bap_byteweight/bap_byteweight_signatures.ml @@ -109,9 +109,8 @@ let update_or_fail ?compiler target data payload path = let path = make_entry ?compiler target data in let data = Bytes.unsafe_to_string (data.save payload) in Zip.add_entry data zip path; - List.iter entries ~f:(fun ({Zip.filename; extra; comment; mtime},data) -> - Zip.add_entry data zip filename - ~extra ~comment ~mtime) + List.iter entries ~f:(fun ({Zip.filename; comment; mtime},data) -> + Zip.add_entry data zip filename ~comment ~mtime) let copy input output = let len = 0x1000 in