-
Notifications
You must be signed in to change notification settings - Fork 696
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
cabal run: "Preprocessing executable" message shouldn't be in stdout #4652
Comments
Would adding |
It does work around the problem, yes. |
We discussed making |
In any case, I think those messages are more appropriate for stderr, especially for a "wrapper" command like cabal run. |
I don't think so, GHC for example prints it compilation output to stdout and only actual error messages go to stderr. |
GHC doesn't wrap any programs though, which makes this a rather atypical situation. stderr doesn't necessarily mean "errors-only" -- it can be used for any kind of diagnostic message. Other package managers do keep their stdout clean:
|
OK, this is a more convincing argument. Making |
I agree that this should be in |
I also encountered this issue today. Like others, I suggest making |
Any movement on this? I encountered this error today and am slightly annoyed I had to discover the problem through google rather than the help pages. I guess my brain didn't think to search for "verbose" when I wanted the output to be "quiet" <.< Incidentally, stderr was invented for the sole purpose of placing diagnostics on it. Before stderr, diagnostics would appear on stdout, which would then wreak havoc with unsuspecting downstream processes. If diagnostics were on stderr as Nature™ intended, we wouldn't have to choose between diagnostics and integration testing during development of a partly-Haskell script. |
With #6929 you'll be able to say
and (most of) |
What will the default behaviour be? |
This is especially painful when running a single-file cabal script with the |
@rihardsk You can do |
@travv0 oh, that does indeed suppress the cabal output, thanks! I retract my previous statement about the problem being worse for cabal scripts, but it would be a lot nicer if cabal messages didn't go to stdout by default, imo. |
The
Preprocessing executable 'X'...
message is currently written to stdout, even forcabal run
. This contaminatesstdout
, socabal run
cannot be used with any program that outputs program-readable throughstdout
(e.g. Pandoc filters).The text was updated successfully, but these errors were encountered: