-
Notifications
You must be signed in to change notification settings - Fork 701
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
LocalBuildInfo: combine profiling settings, track program coverage #3610
Conversation
@@ -301,3 +308,15 @@ externalPackageDeps lbi = | |||
-- True if this dependency is an internal one (depends on the library | |||
-- defined in the same package). | |||
internal ipkgid = any ((==ipkgid) . componentUnitId) (Graph.toList (componentGraph lbi)) | |||
|
|||
withProfLib :: LocalBuildInfo -> Bool | |||
withProfLib = isJust . libProfiling |
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.
ide-backpend-0.10.0.1 is using this as a record setter http://hs01.scs.stanford.edu:8910/search/?q=withProfLib+%2B%3D
(Don't have to do anything, but maybe would be nice to give them a heads up.)
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.
@ezyang I was on the fence about renaming these accessors anyway because the compiler-specific build logic is very tightly integrated with the access pattern. I will just revert this part of the patch.
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.
Well, it does look like ide-backend is the ONLY client, so I think it's OK if you decide to rename.
I guess this is feeding into the eventual flags refactor, right? Looks fine. |
These are the actual problems I found while I was working on the flags refactor. The flags refactor is going to become a note in the documentation that says, "Hey, don't use |
That's too bad, but not that surprising :( Well, maybe there is some useful commentary you can add to the ticket. |
de4e22b
to
990efe3
Compare
++ "profiling. Profiling has been disabled.") | ||
return (False, id) | ||
|
||
when profEnabled $ warn verbosity |
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.
Hmm, is this correct? Was: when (profEnabledExe && not profEnabledLib)
. Now: when (tryExeProfiling || tryLibProfiling)
.
Looks OK. |
Quite right about that conditional, thanks! |
The status of Haskell program coverage is recorded in LocalBuildInfo. Program coverage is disabled during configure if the compiler does not support it.
Note that there's some hope of eliminating the fromFlag style since the new-build code hardly uses it at all iirc. We try instead to convert into other non-flag types and at that conversion boundary apply defaults etc. |
The profiling settings in LocalBuildInfo are combined as discussed in #3597. Fields were added to track if program coverage is enabled. Both features are now disabled (and a warning emitted) if the compiler does not support them.