-
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
Add flag to print GHC output to stdout #3225
Comments
Our project recently moved to a multi-package build setup, and we immediately encountered this defect. I see that this is currently a low-priority issue, but I'd argue that it's actually high-priority, as it's an essential function of a build system. Every other build system or compiler I've used does it by default, e.g. gcc, clang, Java, the Python and Perl interpreters, and of course both GHC and cabal. But rather than just appealing to authority, here's a concrete example of why it's important. Recently one of our test suites regressed from running in about a minute to taking an hour. I had no idea why
Without output streaming to the terminal this is next to impossible to diagnose. And then, of course, sometimes you need to see a warning to determine the cause of an error that appears later in the build process, but that's not possible under either of these scenarios. I've read through all of the threads regarding this subject, just a few of which are:
I don't find any of the suggested workaround satisfactory, but I'd like to take special exception to the suggestion that I build with Is it possible to stream to the terminal in multi-package builds the output from GHC compilation, test suites, benchmarks, etc just like what occurs in a single package build, regardless of whether the packages are being built in parallel or not. While I think this should be the default and users should need to opt-out of this information, I'd settle for an opt-in flag for streaming the output of my packages building to the terminal. |
PRs appreciated! This is quite a lot trickier than it would seem. |
@recursion-ninja This issue is not closed, and I've added it to the P2 milestone because things work fine without this nicety. Note that logs do get streamed into It is unclear how this streaming output should behave. In the presence of concurrent builds, which one gets streamed to the output? Perhaps the output should get interspersed with some indication of which process it comes from? Not saying there aren't good answers to this, but in addition to implementation there is the problem of determining what should be implemented.
Stack is an opensource project. |
@mgsloan The way
where the This approach still gives a very good indication of progress, and is copy-paste friendly. And, even more conveniently, you can |
Yeah, that sounds good to me @nh2 . Ok, so we've decided on the goal behavior, so that part is done :) |
Relevant PR: #4097 |
Add the interleaved-output option/config value #3225
Having streaming compilation output is super useful to ensure that things compile at the right speed, especially when piping into something like
ts
.#426 added a flag that can stream to a file, but that still doesn't provide streaming terminal output.
Of course interleaved output makes things messy, so it would make sense for this flag to work only for
-j1
.Note that (quote @mgsloan)
but it would be great to have it also for snapshot packages.
The text was updated successfully, but these errors were encountered: