-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Description
In Dart, I believe we follow the Google shell guide which says you should only add things to stderr
which are actual errors. This means that logs and progress updates go to stdout
. We rely on this when we do process calls where we usually forward stderr
from the child process to the terminal to surface errors (for example stderr from build hooks).
In Unix philosophy, stdout should only contain the final result, so that it can be piped. This means that logs and progress updates go to stderr
. We don't follow this in dart run
and dart test
, they print progress messages from pub and compilation.
If we want to satisfy both guides, it basically means no output at all while compiling for dart run
, which can lead to "did the program freeze"?
For other commands such as dart compile
, dart build
, and dart install
it's not an issue, because the output is the compilation. dart install
ed apps don't have they issue either (but dart pub global activated
suffer from recompilation delay).
For dart run
and dart test
, should we consider switching to the Unix philosophy? Or is the intended way to do this dart--verbosity=error run
? We currently don't respect that for progress updates either, we print things from pub and compiling the app.