Skip to content

hpc program will error out when running "test --coverage" on conduit #607

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

Closed
mgsloan opened this issue Jul 16, 2015 · 2 comments
Closed
Milestone

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Jul 16, 2015

While test --coverage works well with my other test multi-package repos, https://github.com/snoyberg/conduit seems to be problematic for it:

git clone https://github.com/snoyberg/conduit
cd conduit
stack init
stack test --coverage

A report is generated for resourcet, but not the other packages, due to errors that look like this:

Running /home/mgsloan/.ghc/bin/hpc markup /home/mgsloan/fpco/conduit/conduit-extra/.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/test.tix --srcdir /home/mgsloan/fpco/conduit/cereal-conduit/ --srcdir /home/mgsloan/fpco/conduit/conduit-extra/ --srcdir /home/mgsloan/fpco/conduit/conduit/ --srcdir /home/mgsloan/fpco/conduit/network-conduit-tls/ --srcdir /home/mgsloan/fpco/conduit/resourcet/ --hpcdir .stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/ --reset-hpcdirs exited with ExitFailure 1

hpc: can not find resourcet-1.1.5/Control.Monad.Trans.Resource.Internal in ["/home/mgsloan/fpco/conduit/resourcet//.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/","/home/mgsloan/fpco/conduit/network-conduit-tls//.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/","/home/mgsloan/fpco/conduit/conduit//.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/","/home/mgsloan/fpco/conduit/conduit-extra//.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/","/home/mgsloan/fpco/conduit/cereal-conduit//.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/"]
Writing: resourcet-1.1.5/Data.Acquire.Internal.hs.html

This was quite puzzling, because /home/mgsloan/fpco/conduit/resourcet//.stack-work/dist/x86_64-linux/Cabal-1.18.1.5/hpc/.hpc/resourcet-1.1.5/Control.Monad.Trans.Resource.Internal.mix does exist. In order to figure out what's going on, I tracked these error messages down to this function in GHC: https://github.com/ghc/packages-hpc/blob/fb14d3428ba24d36e779736989dae3092a50a957/Trace/Hpc/Mix.hs#L87

It turns out that this error is emitted in a bunch of different cases... I've put down a TODO item to report and possibly fix this in ghc. I'm pretty sure the issue in this particular case is a mismatch in the module hash code in the tix file and the mix file:

The tix file has TixModule "resourcet-1.1.5/Control.Monad.Trans.Resource.Internal" 3767668384

Whereas the mix file that refers to has Mix "./Control/Monad/Trans/Resource/Internal.hs" 2015-07-16 02:48:09.660237209 UTC 3983615699

I have no idea why the tix file would ever end up with a different version that the mix file.

@borsboom borsboom modified the milestones: 0.3.0.0, 0.2.0.0 Jul 21, 2015
@mgsloan mgsloan modified the milestones: 0.3.0.0, 0.2.0.0 Aug 4, 2015
@mgsloan
Copy link
Contributor Author

mgsloan commented Aug 4, 2015

Note that this is no longer an issue with the current code, but will return if #664 is implemented. So, deferring to a later milestone.

@mgsloan mgsloan changed the title hpc program errors out when running "test --coverage" on conduit hpc program will error out when running "test --coverage" on conduit (but only once #664 is implemented) Aug 4, 2015
@mgsloan mgsloan changed the title hpc program will error out when running "test --coverage" on conduit (but only once #664 is implemented) hpc program will error out when running "test --coverage" on conduit Aug 4, 2015
@mgsloan
Copy link
Contributor Author

mgsloan commented Aug 4, 2015

Closing this out for now and putting a note on #664.

@mgsloan mgsloan closed this as completed Aug 4, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants