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

Send errors to stderr instead of stdio #152

Open
barnabasJ opened this issue Nov 14, 2024 · 0 comments
Open

Send errors to stderr instead of stdio #152

barnabasJ opened this issue Nov 14, 2024 · 0 comments

Comments

@barnabasJ
Copy link
Contributor

barnabasJ commented Nov 14, 2024

a general thought I had when going through this was if issues should be printed to stderr instead of studio

@barnabasJ Good thought, but it's unfortunately a little tricky such that I don't want to include that change in this PR. > Maybe worth opening an issue?

The two problems are:

  1. We use Mix.shell() to print, but we can't use Mix.shell().error(...) because we do some custom formatting, and it would override everything, making it all red.
  2. There isn't a guarantee that Mix.shell() is Mix.Shell.IO, but we could check whether it is, and in that case just do an IO.puts(:stderr, ...) for error cases. If Mix.shell() isn't a Mix.Shell.IO, we could just use the error function of whatever it is.

That's just enough change that I don't want to shoehorn it into this PR, but I think it's a reasonable think to address (or consider addressing) down the line.

Originally posted by @zachallaun in #148 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant