Bad interaction of sandboxes and coverage
It seems that when using sandboxes with project and coverage (--enable-coverage
) cabal fails to generate and find .mix files for dependencies.
Steps to reproduce:
- create shared sandbox (not sure that shared sandbox plays it's role here):
cabal sandbox init --sandbox=../.shared
- install all dependencies with enable-coverage
cabal install --dependencies-only --enable-coverage --enable-tests
- install library
cabal install --enable-coverage --run-tests
Expected results:
- Library will be built, coverage output will be generated.
Actual results: hpc fails to find .mix files:
hpc: can not find netwo_Bdsn6Y1VKLa3MCczwSV70J/Network.Socket.ByteString.MsgHdr
in ["./.hpc"
,"./dist/dist-sandbox-f7da581b/hpc/vanilla/mix/network-transport-tcp-0.4.1"
,"./dist/dist-sandbox-f7da581b/hpc/vanilla/mix/TestTCP"]
Tested on ghc-7.10.1 in clear official docker container on network-transport-tcp package.
Side node: during tests on bigger project I have seen similar failures even on step 2 (e.g. network package fails with similar error message), but I was not able to reproduce it in minimal example.
Possibly related report: #10259 (closed)
Trac metadata
Trac field | Value |
---|---|
Version | 7.10.1 |
Type | Bug |
TypeOfFailure | OtherFailure |
Priority | normal |
Resolution | Unresolved |
Component | Code Coverage |
Test case | |
Differential revisions | |
BlockedBy | |
Related | |
Blocking | |
CC | |
Operating system | |
Architecture |