-
Notifications
You must be signed in to change notification settings - Fork 842
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
stack bench truncates final output on a slow terminal #413
Comments
Do you have a repo for this? |
Hey Michael, https://github.com/simonmichael/hledger/ master should show the problem now if you uncomment hledger/bench/bench.hs line 30 or 31 and run
|
I didn't realize that Cabal's bench output went to the terminal, interesting. |
Since we're just reusing Cabal's run code here, can you tell me if the same problem appears when you would run |
I don't see the problem when running |
@chrisdone Do you have any thoughts on this? |
I just merged a PR that changes the buffering of stdout, I'm not sure if that will have any impact. For the record, I've been unable to repro so far. |
Today's stack (revision 2cac22d) has the same problem here, FWIW. I think maybe Stack.Build.Execute.printBuildOutput should hold on to the printing thread's id, so that the main thread can wait for it to finish before exiting ? |
PS awkward that you can't reproduce. To be more specific, I see this in a shell buffer in GNU Emacs 25.0.50.1 running in the normal GUI mode on OSX Yosemite on a 2013 macbook air. |
Emacs for OS X has really slow buffer drawing compared to Linux, so it may be difficult to repro on Linux vs Mac. |
Can you think of any other way to reproduce this problem? As it stands right now, I don't think anyone else can attempt to fix this. |
Have you tried it in an emacs shell on a mac ? |
No, I don't have access to a Mac. On Sun, Aug 23, 2015, 9:16 PM Simon Michael [email protected]
|
I was able to reproduce this on my Mac: (a bunch more output appears when I run the same command in a regular terminal) I'm also running into something possibly related on Windows, where GHC's output is cut off. I'm on Windows 10 in a VirtualBox VM and running stack in the "Git Bash" shell (from msysgit), which has incredibly slow output (seriously, it's almost like being on a dial-up modem). |
I've pushed a change that fixes this for my case and also the similar problem I saw in Windows. @simonmichael, please re-open if this doesn't work for you (your suggestion of waiting for the |
Hurrah! Thank you. |
If a benchmark executable prints much output, in a slow terminal (such as an emacs shell buffer) "stack bench" truncates it.
The text was updated successfully, but these errors were encountered: