|
@@ -143,8 +143,12 @@ let check_display_file ctx cs =
|
|
let p = DisplayPosition.display_position#get in
|
|
let p = DisplayPosition.display_position#get in
|
|
let cfile = cc#find_file (Path.unique_full_path p.pfile) in
|
|
let cfile = cc#find_file (Path.unique_full_path p.pfile) in
|
|
let path = (cfile.c_package,get_module_name_of_cfile p.pfile cfile) in
|
|
let path = (cfile.c_package,get_module_name_of_cfile p.pfile cfile) in
|
|
- let m = cc#find_module path in
|
|
|
|
- check_display_module ctx cc cfile m
|
|
|
|
|
|
+ (* We have to go through type_module_hook because one of the module's dependencies could be
|
|
|
|
+ invalid (issue #8991). *)
|
|
|
|
+ begin match !TypeloadModule.type_module_hook ctx path null_pos with
|
|
|
|
+ | None -> raise Not_found
|
|
|
|
+ | Some m -> check_display_module ctx cc cfile m
|
|
|
|
+ end
|
|
with Not_found ->
|
|
with Not_found ->
|
|
(* Special case for diagnostics: It's not treated as a display mode, but we still want to invalidate the
|
|
(* Special case for diagnostics: It's not treated as a display mode, but we still want to invalidate the
|
|
current file in order to run diagnostics on it again. *)
|
|
current file in order to run diagnostics on it again. *)
|