scala/scala — pull request #3930 by gourlaysama (2014-08-19 12:12:12+00:00)
Title: make ConsoleReporter handle both stdout and stderr

`scala` and `scalac` always had a problem with deciding where to send
messages in the console and just sent everything to stderr, so it is
time to improve that:

`ConsoleReporter` now takes two `PrintWriter`, one for errors/warnings and
one for normal messages. The short constructor sets them to stderr and
stdout, respectively.

This finally makes scala(c) ouput like any normal program. For example:
```sh
$ scalac -help > /dev/null # will now print nothing

$ scala -nc -e "val" > /dev/null # will print an error message

$ scala -nc -e "println(1)" > /dev/null # but this won't
```
People calling the old constructor (with a single writer) get no change
in behavior: everything goes to the writer.

---

The second commit uses that to fix a 6-year-old issue, [SI-1264][1].

[1]: https://issues.scala-lang.org/browse/SI-1264