Browse Source

Revert "[display] let's try diagnostics caching again"

This reverts commit b7376e138125f5282447bdbc5ab93cb747d4e1dd.
Simon Krajewski 7 years ago
parent
commit
2bc777a65c
4 changed files with 5 additions and 11 deletions
  1. 1 1
      src/compiler/displayOutput.ml
  2. 3 5
      src/context/compilationServer.ml
  3. 1 3
      src/context/typecore.ml
  4. 0 2
      src/core/type.ml

+ 1 - 1
src/compiler/displayOutput.ml

@@ -609,7 +609,7 @@ let process_global_display_mode com tctx = match com.display.dms_kind with
 		FindReferences.find_references tctx com with_definition
 	| DMDiagnostics global ->
 		let dctx = Diagnostics.prepare com global in
-		Option.may (fun cs -> CompilationServer.cache_context cs com) (CompilationServer.get());
+		(* Option.may (fun cs -> CompilationServer.cache_context cs com) (CompilationServer.get()); *)
 		raise_diagnostics (Diagnostics.Printer.print_diagnostics dctx tctx global)
 	| DMStatistics ->
 		let stats = Statistics.collect_statistics tctx None in

+ 3 - 5
src/context/compilationServer.ml

@@ -184,11 +184,9 @@ let clear_directories cs key =
 
 let rec cache_context cs com =
 	let cache_module m =
-		if not m.m_extra.m_has_error then
-			cache_module cs (m.m_path,m.m_extra.m_sign) m;
+		cache_module cs (m.m_path,m.m_extra.m_sign) m;
 	in
 	List.iter cache_module com.modules;
-	begin match com.get_macros() with
+	match com.get_macros() with
 	| None -> ()
-	| Some com -> cache_context cs com
-	end
+	| Some com -> cache_context cs com

+ 1 - 3
src/context/typecore.ml

@@ -151,9 +151,7 @@ let pass_name = function
 
 let display_error ctx msg p = match ctx.com.display.DisplayMode.dms_error_policy with
 	| DisplayMode.EPShow | DisplayMode.EPIgnore -> ctx.on_error ctx msg p
-	| DisplayMode.EPCollect ->
-		ctx.m.curmod.m_extra.m_has_error <- true;
-		add_diagnostics_message ctx.com msg p DisplayTypes.DiagnosticsSeverity.Error
+	| DisplayMode.EPCollect -> add_diagnostics_message ctx.com msg p DisplayTypes.DiagnosticsSeverity.Error
 
 let make_call ctx e el t p = (!make_call_ref) ctx e el t p
 

+ 0 - 2
src/core/type.ml

@@ -329,7 +329,6 @@ and module_def_extra = {
 	mutable m_reuse_macro_calls : string list;
 	mutable m_if_feature : (string *(tclass * tclass_field * bool)) list;
 	mutable m_features : (string,bool) Hashtbl.t;
-	mutable m_has_error : bool;
 }
 
 and module_kind =
@@ -489,7 +488,6 @@ let module_extra file sign time kind policy =
 		m_if_feature = [];
 		m_features = Hashtbl.create 0;
 		m_check_policy = policy;
-		m_has_error = false;
 	}