Open meooow25 opened 7 months ago
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 https://github.com/haskell/cabal/pull/9464 . What is the version of cabal
that has been used?
This might have been fixed by haskell/cabal#9464 . What is the version of
cabal
that has been used?
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 hetPtrEq
, which we don't actually use anywhere. So just deleting it should be a safe workaround.
@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-345I 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