Skip to content

Fix HPC report generation for tests with internal package dependencies #1116

Merged
merged 1 commit into from Nov 30, 2012

3 participants

@ttuegel
Haskell member
ttuegel commented Nov 15, 2012

Addresses ticket #1049. In conjunction with a new version of HPC, specifies all the .mix file search paths necessary to markup tests. Warns users of older versions of HPC that markup may fail and suggests that they upgrade.

I would not pull this until GHC accepts my patch to HPC, just in any changes become necessary on the Cabal side.

@tibbe

Is there any implied search path order here i.e. does the order in which we look in the different directories matter? (I asked a similar question on the GHC Trac.)

@tibbe

Same question as above.

@tibbe
Haskell member
tibbe commented Nov 16, 2012

Thanks for fixing this! I will merge the commit once the GHC changes are in. I left two questions on the commit. Nothing commit blocking, but it would be good to have them answered.

@tibbe tibbe merged commit bf2fb86 into haskell:master Nov 30, 2012
@bmillwood

This silently drops search paths! Shouldn't we at least flag up the fact that paths are being dropped? Should we even bother going ahead with the invocation if paths are dropped? Is it going to work?

Haskell member

Isn't the warning on line 35 enough?

Only if there's any chance that it will work, and even then it would be a good idea to warn which paths are being dropped, so that if it causes a failure it can be better diagnosed. But if there's no hope, which I imagine is usually the case, we should refuse to run the program at all.

(I'm currently debugging the Cabal test suite itself, which is reporting failure because hpc couldn't find a file – it's a file on one of the paths that gets dropped here. It took me a while to work this out.)

Haskell member

I don't mind a more informative warning. Feel free to send a pull request.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.