-
Notifications
You must be signed in to change notification settings - Fork 358
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
In verbose mode, errors are sent to stdout #4490
Comments
You can use for that the environment variable |
Ah, I didn't know about that one. Thanks. However, I just tried to run
on my project, and it does not display any errors, even though I know that running the exact same build command that Opam uses does produce warnings on stderr. So either I'm using it wrong, or there is a bug somewhere. |
It unmerges outputs for command outputs files. By default, stderr & stdout are merged in On direct opam output, stderr is used for debug logs and error reports. |
Note that even during a successful run, warnings can still be printed to stderr by the build command. Given that |
It makes sense yes, but it's not so trivial (display @AltGr what's the original reason for the merged outputs? |
From experience, although it's counter-intuitive, you generally lose more information by separating stderr and stdout ; the reason being that relative ordering generally matters, and is in many cases a more relevant information than wether each line was printed to stdout or stderr. For example, a compiler may print the context to stdout, then an error to stderr. I believe |
Yes, this is indeed true. However, in this case, a large amount of information was printed on stdout, and I wanted to know if there were warnings printed to stderr at all. Then it is useful just to check if something gets printed to stderr at all. However, I guess I can also look at
That is indeed an interesting option. However, on opam
|
Mhm, but now that I'm trying this again, it seems that there are also problems with he logs:
|
This was discussed this morning. Steps:
|
When executing an install command in
--verbose
mode, any messages that are printed to/dev/stderr
by a build command are redirected to/dev/stdout
by Opam. It would be better if they would still end up in/dev/stderror
, because this allows for easy separation of errors and normal messages.The text was updated successfully, but these errors were encountered: