-
Notifications
You must be signed in to change notification settings - Fork 414
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
Error messages are sometimes not displayed #6115
Comments
I've seen that too, I'll investigate |
That has been introduced in #6068 |
@rgrinberg it's probably more efficient if you have a look at this one - looks like we're missing a flush on stderr at the end. |
Np. Should be simple enough to fix. I'll manually shut down the UI thread once the Term.t finishes executing. |
Fixed by #6119 |
Heads up that I'm still encountering this while building dune on an M1 Mac. |
I see this on both macOS and dockerized ubuntu, and I see it when I build non-dune projects as long as I'm using a dune which I build from source. I don't see this error using 3.6.1 installed from opam. |
Bisected and the problem was introduced in this commit 1f518fb |
This seems to fix the problem: diff --git a/src/dune_console/dune_console.ml b/src/dune_console/dune_console.ml
index f233e4637..22aab51fb 100644
--- a/src/dune_console/dune_console.ml
+++ b/src/dune_console/dune_console.ml
@@ -304,9 +304,9 @@ module Backend = struct
Base.start ();
while true do
Mutex.lock mutex;
+ Base.render state;
let finish_requested = state.finish_requested in
if finish_requested then raise_notrace Exit;
- Base.render state;
Mutex.unlock mutex;
let now = Unix.gettimeofday () in
let elapsed = now -. !last in |
@rgrinberg @Alizter it seems that 1f518fb is your commit. |
@esope that commit has since been reverted. |
Oh, OK. My bad. |
I no longer observe the bug on tip (715825e) |
Great. I am closing the issue, then. Do not hesitate to reopen it if necessary. |
Sometimes, error messages are not displayed at all when
dune
is run from a terminal.If you redirect
stderr
to a file, however, then the error messages are correctly written to that file.This bug seems to happen on the dev version of
dune
only.I was not able to create a test that witnesses this behavior: tests seem to redirect
stderr
.Expected Behavior
Whether
stderr
is redirected or not, the same error messages should be produced (with the exception of styles and colors, maybe).Actual Behavior
It happens sometimes that
dune command args
produces no visible error messages, butdune command args 2> errors.txt
writes some error messages to the fileerrors.txt
.Reproduction
dune describe bug
displays no message at all.dune describe bug 2> errors.txt
writes the error messageError: Unknown constructor bug
toerrors.txt
as expected.Specifications
dune
: dev version, with git hash87bc1bfa16136a9f8833e236c23b8454a309e55e
ocaml
: 4.14.0The text was updated successfully, but these errors were encountered: