Browse Source

[server] always add current signature to the cache

Simon Krajewski 7 năm trước cách đây
mục cha
commit
bd0d4ef37a
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      src/compiler/main.ml

+ 6 - 0
src/compiler/main.ml

@@ -831,6 +831,12 @@ try
 		let tctx = Typer.create com in
 		List.iter (MacroContext.call_init_macro tctx) (List.rev !config_macros);
 		List.iter (fun f -> f ()) (List.rev com.callbacks.after_init_macros);
+		begin match CompilationServer.get () with
+		| None -> ()
+		| Some cs ->
+			let sign = Define.get_signature com.defines in
+			try ignore(CompilationServer.get_sign cs sign) with Not_found -> ignore(CompilationServer.add_sign cs sign com)
+		end;
 		List.iter (fun cpath -> ignore(tctx.Typecore.g.Typecore.do_load_module tctx cpath null_pos)) (List.rev !classes);
 		Finalization.finalize tctx;
 		(* If we are trying to find references, let's syntax-explore everything we know to check for the