-
Notifications
You must be signed in to change notification settings - Fork 178
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
Errors when trying to generate a test coverage report #997
Comments
Of course, deleting those uses will prevent us from checking coverage of the relevant paths. Have you filed a GHC ticket? That first thing is an obvious compiler bug! |
СС @BinderDavid for hpc. |
This might have been fixed by haskell/cabal#9464 . What is the version of |
This looks very different; it's complaining about an incomplete pattern match in the compiler when lowering STG to cmm. |
Issue 1 is certainly a ghc bug. Do you want to file the upstream report? I think I know what's happening there; if I'm right I should have time to prepare and test a patch this weekend. |
I can probably do it sometime tonight, but I won't feel bad if someone beats me to the punch. |
@meooow25, issue 1 seems to be confined to the definition of |
@BinderDavid , ah, you were talking about the second issue. My bad. |
@BinderDavid I'm using the latest Cabal 3.10.3.0 |
I tried to generate a test coverage report and ran into an entire zoo of errors.
I'll describe the issues so we can try to get this fixed, and a workaround. Skip to the end for the workaround.
Issue 1
Let's start with
The locations leads us to the
emitPrimop
forReallyUnsafePtrEqualityOp
.https://gitlab.haskell.org/ghc/ghc/-/blob/ghc-9.6/compiler/GHC/StgToCmm/Prim.hs?ref_type=heads#L344-345
I am baffled.
Let's continue with a workaround, by removing all the
reallyUnsafePtrEquality#
stuff inPtrEquality.hs
.Issue 2
Okay we got the tests to run successfully. But hpc failed.
I find that I have two
vanilla/mix
dirs:For some reason, hpc attempts to find
containers-0.6.8
mix files without being aware of thecontainers-0.6.8
directory. This looks like a Cabal issue? Let's try to work around it by running hpc manually.Using hpc
I had to jump through a few hoops with hpc but they aren't really bugs so I won't go into the details. The gist is that I needed to go into containers-test and run hpc providing the tix file and mix dirs manually.
Success!
Workaround tl;dr
reallyUnsafePtrEquality#
inPtrEquality.hs
cabal test intmap-lazy-properties --enable-coverage
. The test will run but hpc will fail, that's fine.cd containers-tests
The text was updated successfully, but these errors were encountered: