@ -20,35 +20,6 @@ let models_specs_filenames = ref String.Set.empty
let models_jar = ref " "
let models_tenv = ref ( Tenv . create () )
let load_models_tenv zip_channel =
let models_tenv_filename_in_jar =
let root = Filename . concat Config . default_in_zip_results_dir Config . captured_dir_name in
Filename . concat root Config . global_tenv_filename
in
let temp_tenv_filename =
DB . filename_from_string ( Filename . temp_file " tmp_ " Config . global_tenv_filename )
in
let entry = Zip . find_entry zip_channel models_tenv_filename_in_jar in
let temp_tenv_file = DB . filename_to_string temp_tenv_filename in
let models_tenv =
try
Zip . copy_entry_to_file zip_channel entry temp_tenv_file ;
match Tenv . load_from_file temp_tenv_filename with
| None ->
L . ( die InternalError ) " Models tenv file could not be loaded "
| Some tenv ->
tenv
with
| Not_found ->
L . ( die InternalError ) " Models tenv not found in jar file "
| Sys_error msg ->
L . ( die InternalError ) " Models jar could not be opened: %s " msg
in
DB . file_remove temp_tenv_filename ; models_tenv
let collect_specs_filenames jar_filename =
let zip_channel = Zip . open_in jar_filename in
let collect set e =
@ -60,7 +31,6 @@ let collect_specs_filenames jar_filename =
in
models_specs_filenames
:= List . fold ~ f : collect ~ init : ! models_specs_filenames ( Zip . entries zip_channel ) ;
models_tenv := load_models_tenv zip_channel ;
Zip . close_in zip_channel