Bläddra i källkod

[hxb] modules should be considered as cached

Rudy Ges 2 år sedan
förälder
incheckning
07c61e2f1b
2 ändrade filer med 5 tillägg och 2 borttagningar
  1. 1 1
      src/compiler/serverCompilationContext.ml
  2. 4 1
      src/typing/typeloadModule.ml

+ 1 - 1
src/compiler/serverCompilationContext.ml

@@ -27,7 +27,7 @@ let create verbose = {
 	cs = new CompilationCache.cache;
 	class_paths = Hashtbl.create 0;
 	changed_directories = Hashtbl.create 0;
-	compilation_step = 0;
+	compilation_step = 1;
 	delays = [];
 	was_compilation = false;
 	macro_context_setup = false;

+ 4 - 1
src/typing/typeloadModule.ml

@@ -802,7 +802,10 @@ let indent = ref (-1)
 let rec get_reader ctx input mpath p =
 		let make_module path file =
 			(* Printf.eprintf "  \x1b[35m[typeloadModule]\x1b[0m make module %s\n" (s_type_path path); *)
-			ModuleLevel.make_module ctx path file p in
+			let m = ModuleLevel.make_module ctx path file p in
+			m.m_extra.m_processed <- 1;
+			m
+		in
 
 		let add_module m =
 			(* Printf.eprintf "  \x1b[35m[typeloadModule]\x1b[0m add module %s = %s\n" (s_type_path m.m_path) (s_type_path mpath); *)