clarified output of "isabelle process";
authorwenzelm
Sat, 07 Nov 2020 16:49:51 +0100
changeset 72557 6345cce0e576
parent 72556 7abd365058e9
child 72558 38ebf696fd0c
clarified output of "isabelle process";
NEWS
src/Pure/ML/ml_process.scala
--- a/NEWS	Sat Nov 07 16:36:50 2020 +0100
+++ b/NEWS	Sat Nov 07 16:49:51 2020 +0100
@@ -224,6 +224,10 @@
 
   ISABELLE_TOOL_JAVA_OPTIONS="$ISABELLE_TOOL_JAVA_OPTIONS -Xmx8g"
 
+* The command-line tool "isabelle process" now prints output to
+stdout/stderr separately and incrementally, instead of just one bulk to
+stdout after termination. Potential INCOMPATIBILITY for external tools.
+
 * The command-line tool "isabelle console" now supports interrupts
 properly (on Linux and macOS).
 
--- a/src/Pure/ML/ml_process.scala	Sat Nov 07 16:36:50 2020 +0100
+++ b/src/Pure/ML/ml_process.scala	Sat Nov 07 16:49:51 2020 +0100
@@ -188,9 +188,12 @@
     val sessions_structure = Sessions.load_structure(options, dirs = dirs)
     val store = Sessions.store(options)
 
-    val rc =
+    val result =
       ML_Process(options, sessions_structure, store, logic = logic, args = eval_args, modes = modes)
-        .result().print_stdout.rc
-    sys.exit(rc)
+        .result(
+          progress_stdout = Output.writeln(_, stdout = true),
+          progress_stderr = Output.writeln(_))
+
+    sys.exit(result.rc)
   })
 }