-
Notifications
You must be signed in to change notification settings - Fork 1.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Output should distinguish stdout and stderr #16701
Comments
I prefer the output of |
My criterion was "stdout for output I asked for", but "stderr to report why the tool did not do what I requested." On Scala 2, I chose that summary "Diagnostic data" is an interesting criterion. How is What about warnings? If I say I won't try the permutations just now, but it's not obvious which output to use in all cases. It might be a "style" choice. |
Also Note Scala 2 follows java. If the compiler were one of those sarcastic robots from science fiction, it would say, "Helpful output is not my primary function." |
I see I'm not sure "diagnostic" is sufficiently diagnostic. Everything that is not a class file (or tasty file) is diagnostic output. Edit: console output I don't remember how Scala 2 works, as reporting was reworked so many times. |
Fixes #16701 Tested only manually. For example, with `tailrec` printer enabled, ``` scalac -Vprint:typer example.scala > x 2> y ``` puts tree output and tailrec trace in x, warnings & errors & summary count in y. x is the output I asked for. This makes it easier to see trace and trees correctly interleaved, since `> out 2>&1` does not guarantee it. Tests may depend on how output is captured. Scala 2 partest captures stderr to log, for example.
Compiler version
3.2.1
Output
javac --version
(and help) is written to stdout, andscalac
2 follows that model of reporting only error output to stderr.scalac
3 writes all output to stderr.Expectation
Expect
javac
behavior.Not sure about the summaryEdit: scala 2 prints summary count to stderr scala/scala#1027219 errors
which is echoed to stdout in scala 2.Would expect debug output
-Vprint
on stdout. That is, stderr is for the tool to tell me why it could not fulfill my request.Not sure about
scala-cli
orsbt compile
.The text was updated successfully, but these errors were encountered: