@@ -449,6 +449,7 @@ module Utils = struct
449449
450450 let find_file_with_path ~config ?(with_fallback = false ) file path =
451451 let title = " find_file_with_path" in
452+
452453 let filename = File. name file in
453454 log ~title " Try find %S" filename;
454455 if File. is_source file && filename = Mconfig. unitname config then
@@ -464,6 +465,7 @@ module Utils = struct
464465 else None
465466 in
466467 let fname = File. with_ext ~src_suffix_pair file in
468+ log ~title " Trying %S" fname;
467469 try Some (Misc. find_in_path_normalized ?fallback path fname)
468470 with Not_found -> None
469471 in
@@ -776,6 +778,7 @@ let find_source ~config loc path =
776778 doesn't know which is the right one: %s"
777779 matches)
778780
781+ (* CR: Is there something better to do to avoid the assertions? *)
779782let rec unbox_uid = function
780783 | Shape.Uid. Unboxed_version uid -> unbox_uid uid
781784 | uid -> uid
@@ -861,13 +864,14 @@ let get_linked_uids ~config ~comp_unit decl_uid =
861864 | Ok (_pos_fname , artifact ) ->
862865 log ~title " Cmt successfully loaded, looking for %a" Logger. fmt (fun fmt ->
863866 Shape.Uid. print fmt decl_uid);
864- List. filter_map ~f: (function
865- | Cmt_format. Definition_to_declaration , def , decl when decl = decl_uid ->
866- Some def
867- | Cmt_format. Definition_to_declaration , def , decl when def = decl_uid ->
868- Some decl
869- | _ -> None )
870- @@ Artifact. declaration_dependencies artifact
867+ List. filter_map
868+ ~f: (function
869+ | Cmt_format. Definition_to_declaration , def, decl when decl = decl_uid
870+ -> Some def
871+ | Cmt_format. Definition_to_declaration , def , decl when def = decl_uid ->
872+ Some decl
873+ | _ -> None )
874+ (Artifact. declaration_dependencies artifact)
871875 | _ ->
872876 log ~title " Failed to load the cmt file" ;
873877 []
0 commit comments