-
Notifications
You must be signed in to change notification settings - Fork 711
Print build profile in new-build command #4605
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
Print build profile in new-build command #4605
Conversation
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.
Looks OK modulo minor comments.
@@ -638,7 +644,7 @@ printPlan verbosity | |||
|
|||
| otherwise | |||
= noticeNoWrap verbosity $ unlines $ | |||
("In order, the following " ++ wouldWill ++ " be built" ++ | |||
(showBuildProfile ++ "In order, the following " ++ wouldWill ++ "!" ++ " be built" ++ |
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.
Why the exclamation sign here?
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.
sorry, a debugging artifact which is removed now.
@@ -756,6 +762,9 @@ printPlan verbosity | |||
showMonitorChangedReason MonitorFirstRun = "first run" | |||
showMonitorChangedReason MonitorCorruptCache = "cannot read state cache" | |||
|
|||
showBuildProfile = "Build profile:\n" ++ (unlines $ map (" " ++) [ |
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.
Can you please just inline the indentation instead of using map
?
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.
done.
Travis failure looks genuine, you need to update expected output files in the test suite. |
@@ -756,6 +762,9 @@ printPlan verbosity | |||
showMonitorChangedReason MonitorFirstRun = "first run" | |||
showMonitorChangedReason MonitorCorruptCache = "cannot read state cache" | |||
|
|||
showBuildProfile = "Build profile:\n" ++ (unlines [ |
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.
Please try to squeeze this into a single line as I suggested in #3945 (comment); this is mostly redundant/noisy information to see on every invocation, so it better be terse/compact. Note that there's also the proposed cabal show-build-info
command whose purpose is to dump a much more verbose version of the build-profile. So the one we emit here can really just be a small glimpse at it.
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.
done. comma separated now instead of line separated.
Merged, thanks! |
@amir In the interest of brevity and clarity, would it be possible to render |
@23Skidoo I'd go one step further, why not use the CLI-valid concise representation? e.g.
that way you can directly paste it on the commandline. |
Sure, I'll prepare a new PR. |
Please include the following checklist in your PR:
Prints build profile—at the moment only compiler and optimization level. Sample output:
With this
cabal.project.local
:This is a naive attempt to address #3945. I'm not only new to Cabal but also to Haskell. I'd gladly follow any hints by a mentor to get this merged but feel free to discard it if there's absolutely no hope.