2
0
Эх сурвалжийг харах

made all non-warning/non-error compiler messages output to stdout (fixes #4480)

Alexander Kuzmenko 8 жил өмнө
parent
commit
f6da2aacaa

+ 2 - 0
extra/CHANGES.txt

@@ -6,6 +6,8 @@
 
 
 	General improvements and optimizations:
 	General improvements and optimizations:
 
 
+	all : made all non-warning/non-error compiler messages output to stdout (#4480)
+
 	php : implemented direct method comparison. No need to use `Reflect.compareMethods()`
 	php : implemented direct method comparison. No need to use `Reflect.compareMethods()`
 
 
 	Removals:
 	Removals:

+ 4 - 1
src/compiler/server.ml

@@ -42,7 +42,10 @@ let s_version =
 
 
 let default_flush ctx =
 let default_flush ctx =
 	List.iter
 	List.iter
-		(fun msg -> prerr_endline (compiler_message_string msg))
+		(fun msg -> match msg with
+			| CMInfo _ -> print_endline (compiler_message_string msg)
+			| CMWarning _ | CMError _ -> prerr_endline (compiler_message_string msg)
+		)
 		(List.rev ctx.messages);
 		(List.rev ctx.messages);
 	if ctx.has_error && !prompt then begin
 	if ctx.has_error && !prompt then begin
 		print_endline "Press enter to exit...";
 		print_endline "Press enter to exit...";