Skip to content
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

Ancillary compiler output prints to STDOUT #13925

Open
straight-shoota opened this issue Oct 31, 2023 · 1 comment
Open

Ancillary compiler output prints to STDOUT #13925

straight-shoota opened this issue Oct 31, 2023 · 1 comment
Labels
help wanted This issue is generally accepted and needs someone to pick it up kind:feature status:discussion topic:compiler:cli

Comments

@straight-shoota
Copy link
Member

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.

@HertzDevil
Copy link
Contributor

More precisely they should go to Crystal::Compiler#stderr, and never to hardcoded references of the STDERR constant

@straight-shoota straight-shoota added the help wanted This issue is generally accepted and needs someone to pick it up label Dec 19, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted This issue is generally accepted and needs someone to pick it up kind:feature status:discussion topic:compiler:cli
Projects
None yet
Development

No branches or pull requests

2 participants