Browse Source

[display] remove offline support for workspace symbols, rely on the comp server

see #5696
Simon Krajewski 7 years ago
parent
commit
8bd2d83a6b
3 changed files with 2 additions and 13 deletions
  1. 2 3
      src/compiler/displayOutput.ml
  2. 0 2
      src/context/common.ml
  3. 0 8
      src/typing/typeloadParse.ml

+ 2 - 3
src/compiler/displayOutput.ml

@@ -622,9 +622,8 @@ let process_global_display_mode com tctx = match com.display.dms_kind with
 		raise_statistics (Statistics.Printer.print_statistics stats)
 	| DMModuleSymbols (Some "") -> ()
 	| DMModuleSymbols filter ->
-		let symbols = com.shared.shared_display_information.document_symbols in
 		let symbols = match CompilationServer.get() with
-			| None -> symbols
+			| None -> []
 			| Some cs ->
 				let l = CompilationServer.get_context_files cs ((Define.get_signature com.defines) :: (match com.get_macros() with None -> [] | Some com -> [Define.get_signature com.defines])) in
 				List.fold_left (fun acc (file,cfile) ->
@@ -632,7 +631,7 @@ let process_global_display_mode com tctx = match com.display.dms_kind with
 						(file,DocumentSymbols.collect_module_symbols (filter = None) (cfile.c_package,cfile.c_decls)) :: acc
 					else
 						acc
-				) symbols l
+				) [] l
 		in
 		raise_module_symbols (DocumentSymbols.Printer.print_module_symbols com symbols filter)
 	| _ -> ()

+ 0 - 2
src/context/common.ml

@@ -106,7 +106,6 @@ type compiler_callback = {
 type shared_display_information = {
 	mutable import_positions : (pos,bool ref * placed_name list) PMap.t;
 	mutable diagnostics_messages : (string * pos * DisplayTypes.DiagnosticsSeverity.t) list;
-	mutable document_symbols : (string * DisplayTypes.SymbolInformation.t DynArray.t) list;
 }
 
 type display_information = {
@@ -513,7 +512,6 @@ let create version s_version args =
 			shared_display_information = {
 				import_positions = PMap.empty;
 				diagnostics_messages = [];
-				document_symbols = [];
 			}
 		};
 		display_information = {

+ 0 - 8
src/typing/typeloadParse.ml

@@ -40,14 +40,6 @@ let parse_file_from_lexbuf com file p lexbuf =
 			t();
 			raise e
 	in
-	begin match !Parser.display_mode with
-		| DMModuleSymbols (Some "") -> ()
-		| DMModuleSymbols filter when filter <> None || Display.is_display_file file ->
-			let ds = DocumentSymbols.collect_module_symbols (filter = None) data in
-			com.shared.shared_display_information.document_symbols <- (file,ds) :: com.shared.shared_display_information.document_symbols;
-		| _ ->
-			()
-	end;
 	t();
 	Common.log com ("Parsed " ^ file);
 	data