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

Remove My_zip module #1264

Merged
merged 3 commits into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion src/bin/common/solving_loop.ml
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,15 @@ let process_source ?selector_inst ~print_status src =
end
| `Stdin -> ()
in
let extract_zip_file f =
let cin = Zip.open_in f in
Fun.protect ~finally:(fun () -> Zip.close_in cin) @@ fun () ->
match Zip.entries cin with
| [e] when not @@ e.Zip.is_directory ->
Zip.read_entry cin e
| _ ->
fatal_error "the zip archive '%s' should contain exactly one file" f
in
(* Prepare the input source for Dolmen from an input source for Alt-Ergo. *)
let mk_files src =
let lang =
Expand All @@ -316,7 +325,7 @@ let process_source ?selector_inst ~print_status src =
let src =
match src with
| `File path when Filename.check_suffix path ".zip" ->
let content = AltErgoLib.My_zip.extract_zip_file path in
let content = extract_zip_file path in
`Raw (Filename.(chop_extension path |> basename), content)
| `File _ | `Raw _ | `Stdin -> src
in
Expand Down
2 changes: 1 addition & 1 deletion src/lib/dune
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
; util
Emap Gc_debug Hconsing Hstring Heap Loc Numbers Uqueue
Options Timers Util Vec Version Steps Printer
My_zip My_list Theories Nest Compat
My_list Theories Nest Compat
)

(js_of_ocaml
Expand Down
78 changes: 0 additions & 78 deletions src/lib/util/my_zip.ml

This file was deleted.

48 changes: 0 additions & 48 deletions src/lib/util/my_zip.mli

This file was deleted.

2 changes: 1 addition & 1 deletion tests/misc/unzip.ae.expected
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@

unknown
unsat
Binary file modified tests/misc/unzip.ae.zip
Binary file not shown.
Binary file modified tests/misc/unzip.smt2.zip
Binary file not shown.
Loading