瀏覽代碼

[server] always add current signature to the cache

Simon Krajewski 7 年之前
父節點
當前提交
bd0d4ef37a
共有 1 個文件被更改,包括 6 次插入0 次删除
  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