Guest User

Untitled

a guest
Feb 18th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.86 KB | None | 0 0
  1. diff --git a/typing/env.ml b/typing/env.ml
  2. index ce5bd39..c4a1909 100644
  3. --- a/typing/env.ml
  4. +++ b/typing/env.ml
  5. @@ -718,11 +718,14 @@ and lookup_module ~load lid env : Path.t =
  6. p
  7. with Not_found ->
  8. if s = !current_unit then raise Not_found;
  9. - if !Clflags.transparent_modules && not load then
  10. + if !Clflags.transparent_modules && not load then begin
  11. + (* PR#6843: record the weak dependency ([add_import]) even
  12. + if the [find_pers_struct] call below fails to find the .cmi. *)
  13. + add_import s;
  14. try ignore (find_pers_struct ~check:false s)
  15. with Not_found ->
  16. Location.prerr_warning Location.none (Warnings.No_cmi_file s)
  17. - else ignore (find_pers_struct s);
  18. + end else ignore (find_pers_struct s);
  19. Pident(Ident.create_persistent s)
  20. end
  21. | Ldot(l, s) ->
Add Comment
Please, Sign In to add comment