File tree 1 file changed +9
-2
lines changed
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change @@ -889,6 +889,13 @@ let doc_from_uid ~config ~comp_unit uid =
889
889
Tast_iterator. default_iterator.value_binding sub vb)
890
890
}
891
891
in
892
+ let try_rebuild_env env =
893
+ try Envaux. env_of_only_summary env
894
+ with Envaux. Error err ->
895
+ log ~title: " doc_from_uid" " Error while rebuilding the environment: %a"
896
+ Logger. fmt (fun fmt -> Envaux. report_error fmt err);
897
+ env
898
+ in
892
899
let parse_attributes attrs =
893
900
let open Parsetree in
894
901
try Some (List. find_map attrs ~f: (fun attr ->
@@ -905,9 +912,9 @@ let doc_from_uid ~config ~comp_unit uid =
905
912
log ~title: " doc_from_uid" " Cmt loaded, itering on the typedtree" ;
906
913
begin match cmt_infos.cmt_annots with
907
914
| Interface s -> Some (`Interface { s with
908
- sig_final_env = Envaux. env_of_only_summary s.sig_final_env})
915
+ sig_final_env = try_rebuild_env s.sig_final_env})
909
916
| Implementation str -> Some (`Implementation { str with
910
- str_final_env = Envaux. env_of_only_summary str.str_final_env})
917
+ str_final_env = try_rebuild_env str.str_final_env})
911
918
| _ -> None
912
919
end
913
920
| Error _ -> None
You can’t perform that action at this time.
0 commit comments