Explorar o código

[server] don't abort on creating a macro context, while the previous one is incomplete (fixes #8254)

Aleksandr Kuzmenko %!s(int64=6) %!d(string=hai) anos
pai
achega
63f63ec147
Modificáronse 1 ficheiros con 0 adicións e 11 borrados
  1. 0 11
      src/compiler/server.ml

+ 0 - 11
src/compiler/server.ml

@@ -10,7 +10,6 @@ open DisplayOutput
 open Json
 
 exception Dirty of module_def
-exception ServerError of string
 
 let measure_times = ref false
 let prompt = ref false
@@ -301,16 +300,6 @@ let rec wait_loop process_params verbose accept =
 				| MCode -> check_module_shadowing com2 directories m
 				| MMacro when ctx.Typecore.in_macro -> check_module_shadowing com2 directories m
 				| MMacro ->
-					(*
-						Creating another context while the previous one is incomplete means we have an infinite loop in the compiler.
-						Most likely because of circular dependencies in base modules (e.g. `StdTypes` or `String`)
-						Prevents spending another 5 hours for debugging.
-						@see https://github.com/HaxeFoundation/haxe/issues/8174
-					*)
-					if not ctx.g.complete then
-						raise (ServerError ("Infinite loop in Haxe server detected. "
-							^ "Probably caused by shadowing a module of the standard library. "
-							^ "Make sure shadowed module does not pull macro context."));
 					let _, mctx = MacroContext.get_macro_context ctx p in
 					check_module_shadowing mctx.Typecore.com (get_changed_directories mctx) m
 			in