diff --git a/hosts/ocaml/bin/sx_server.ml b/hosts/ocaml/bin/sx_server.ml index 74e9469c..a9fdc7a5 100644 --- a/hosts/ocaml/bin/sx_server.ml +++ b/hosts/ocaml/bin/sx_server.ml @@ -807,7 +807,9 @@ let () = Hashtbl.replace _loading_libs key true; let result = match resolve_library_path lib_spec with | Some path -> - (try load_library_file path; true + (try load_library_file path; + (* Verify the library actually registered *) + Sx_types.sx_truthy (Sx_ref.library_loaded_p lib_spec) with e -> Printf.eprintf "[import-hook] FAIL %s from %s: %s\n%!" key path (Printexc.to_string e);