Repository navigation
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.
This looks like a leftover?
|
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. |
jasagredo
left a comment
There was a problem hiding this comment.
The changes look good! Thanks for the super quick fix 🙏
ulysses4ever
left a comment
There was a problem hiding this comment.
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: