Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Only check dependencies when full typing #11872

Merged
merged 1 commit into from
Dec 11, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 6 additions & 7 deletions src/compiler/server.ml
Original file line number Diff line number Diff line change
Expand Up @@ -310,11 +310,6 @@ let check_module sctx com m_path m_extra p =
(com.cs#get_context sign)#find_module_extra mpath
in
let check_dependencies () =
let full_restore =
com.is_macro_context
|| com.display.dms_full_typing
|| DisplayPosition.display_position#is_in_file (Path.UniqueKey.lazy_key m_extra.m_file)
in
PMap.iter (fun _ mdep ->
let sign = mdep.md_sign in
let mpath = mdep.md_path in
Expand All @@ -326,13 +321,17 @@ let check_module sctx com m_path m_extra p =
match check mpath m2_extra with
| None -> ()
| Some reason -> raise (Dirty (DependencyDirty(mpath,reason)))
) (if full_restore then m_extra.m_deps else Option.default m_extra.m_deps m_extra.m_sig_deps)
) m_extra.m_deps
in
let check () =
try
check_module_path();
if not (has_policy NoFileSystemCheck) || Path.file_extension (Path.UniqueKey.lazy_path m_extra.m_file) <> "hx" then check_file();
check_dependencies();
if (
com.is_macro_context
|| com.display.dms_full_typing
|| DisplayPosition.display_position#is_in_file (Path.UniqueKey.lazy_key m_extra.m_file)
) then check_dependencies();
None
with
| Dirty reason ->
Expand Down
Loading