Browse Source

Only check dependencies when full typing

Rudy Ges 8 months ago
parent
commit
1b4d0a9eed
1 changed files with 6 additions and 1 deletions
  1. 6 1
      src/compiler/server.ml

+ 6 - 1
src/compiler/server.ml

@@ -331,7 +331,12 @@ let check_module sctx com m_path m_extra p =
 			try
 			try
 				check_module_path();
 				check_module_path();
 				if not (has_policy NoFileSystemCheck) || Path.file_extension (Path.UniqueKey.lazy_path m_extra.m_file) <> "hx" then check_file();
 				if not (has_policy NoFileSystemCheck) || Path.file_extension (Path.UniqueKey.lazy_path m_extra.m_file) <> "hx" then check_file();
-				check_dependencies();
+				let full_typing =
+					com.is_macro_context
+					|| com.display.dms_full_typing
+					|| DisplayPosition.display_position#is_in_file (Path.UniqueKey.lazy_key m_extra.m_file)
+				in
+				if full_typing then check_dependencies();
 				None
 				None
 			with
 			with
 			| Dirty reason ->
 			| Dirty reason ->