crystal
crystal copied to clipboard
Ancillary compiler output prints to STDOUT
The compiler has some options that print ancillary information, such as --progress
and --stats
.
They do currently print to STDOUT.
But STDOUT is meant for the normal output of a program. Errors and diagnostics should go to STDERR.
Warnings and errors for example already go to STDERR.
All similar functions such as --progress
and --stats
should print to STDERR instead of STDOUT.
One could argue that progress information could actually be considered the normal output of some compiler commands like crystal build
. But that would not work when you consider features such as --cross-compile
which prints a linker command to STDOUT. You wouldn't want that mixed with diagnostics output.
More precisely they should go to Crystal::Compiler#stderr
, and never to hardcoded references of the STDERR
constant