-
Notifications
You must be signed in to change notification settings - Fork 697
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
hpc: Don't cover non-dependency libraries #10250
Conversation
bbef74e
to
ab7b5e8
Compare
@@ -1,4 +1,5 @@ | |||
{-# LANGUAGE DeriveFunctor, DeriveFoldable, DeriveTraversable #-} | |||
{-# OPTIONS_GHC -ddump-to-file -ddump-simpl -ddump-stg-final #-} |
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.
This looks like a leftover?
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.
Yes.
Good to see progress on this regression, thanks!
I think it does modify behavior, because cabal will crash less after the patch. Remember, template B is mostly just for documentation, tests, CI. |
812be41
to
b8c16c7
Compare
Fine, updated and pushed a changelog. |
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.
The changes look good! Thanks for the super quick fix 🙏
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 the best person to review it, but this is a pretty significant regression, so, in the interest of delivering 3.14 sooner, let's fire it 🔥
b8c16c7
to
d4ef453
Compare
@mergify rebase |
❌ Unable to rebase: user
|
We were passing the flag --coverage-for for every library in the package when building the testsuites. However, if a particular testsuite doesn't depend on one of the packages passed with --coverage-for we would crash. Since we look for the unit ids of all packages given in --coverage-for in the package database (to find hpc artifacts), if the testsuite builds before the library this lookup would fail. The fix is easy: don't pass --coverage-for=<lib> to <testsuite> if <testsuite> doesn't depend on <lib>. If <lib> is an indirect dependency of <testsuite> it'll no longer be covered by HPC, but this is a weird behaviour that I doubt anyone relies on. Fixes haskell#10046
d4ef453
to
c3b8cee
Compare
We were passing the flag --coverage-for for every library in the package when building the testsuites.
However, if a particular testsuite doesn't depend on one of the packages passed with --coverage-for we would crash.
Since we look for the unit ids of all packages given in --coverage-for in the package database (to find hpc artifacts), if the testsuite builds before the library this lookup would fail.
The fix is easy: don't pass --coverage-for= to if doesn't depend on . If is an indirect dependency of it'll no longer be covered by HPC, but this is a weird behaviour that I doubt anyone relies on.
Fixes #10046
Please read Github PR Conventions and then fill in one of these two templates.
Template Α: This PR modifies behaviour or interface
Include the following checklist in your PR: