-
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 dump-logs (fixes #426) #2594
Conversation
|
||
-- We only want to dump logs for local non-dependency packages | ||
case taskType of | ||
TTLocal lp | lpWanted lp -> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not convinced that using lpWanted
is the right thing here, we may instead want to check if this is listed as an extra-dep
or not. Feedback welcome.
How about adding a note at the end of the build suggesting |
That could work. Logic I'd follow would be:
Another idea: even when we don't dump the logs, we could display the log file locations that were generated, though for a large project even that could be overwhelming output. |
Yes, it will be helpful when someone really needs it to diagnose problems. Otherwise you will have go figure the logs location first. Logs are also helpful to grep things when your console buffer has overflowed. |
That last comment implies to me that the full behavior should be: when dumpLogs doFullLogDumpOutput
when (not dumpLogs && wantedTargets > 1) $ logInfo "If you want to see build output on the console, please use --dump-logs"
-- and now, regardless of the above, print the list of a log files in case the buffer overruns
logInfo "Build logs have been generated in the following locations:"
mapM_ logInfo logFilePaths Is that what you have in mind too? |
This is an implementation of the discussion at: #2594 (comment). Now that I've seen it in practice, I'm not sure if it's too much noise for the normal workflows. On the bright side, when dealing with just one-package projects, none of this output ever gets displayed.
I've pushed a commit with this extra output. I'm on the fence as to whether it's a good idea or not. |
That sounds right to me. What are the multiple locations? Is that one for each package? |
It's one location per log file. There's a log file for each package's build, test, and bench output IIRC. |
That might be too much addendum to the build output. Why not have a |
I think that's quickly reaching the point of diminishing returns. How about simply saying "log files can be found in directory"? |
I've pushed one more commit that just have the log directory on the output. I think this is a decent middle ground. |
That should work. |
This looks good to me. Looks like it needs a rebase/merge from master. |
This is an implementation of the discussion at: #2594 (comment). Now that I've seen it in practice, I'm not sure if it's too much noise for the normal workflows. On the bright side, when dealing with just one-package projects, none of this output ever gets displayed.
f5267bf
to
57633eb
Compare
Rebased against master, only conflict was a trivial one in the ChangeLog.md. |
No description provided.