-
Notifications
You must be signed in to change notification settings - Fork 842
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
stack test --coverage fails with "Failed to find GHC package key" #2424
Comments
I am experiencing the same issue on Linux. After tinkering with various My Cabal file has the following structure:
Stack version: |
As a workaround, here’s what worked for me with Cabal:
I did not need to add |
Thanks for the quick response! I build Stack 49d96c9 from source, and I am now getting a different error:
My |
I confirm that it works. Thanks a lot! |
@ruuda Welcome! That's curious. I recommend taking a look at the contents of the tix files located in |
@mgsloan A few observations: When I run
Then I still get the “did not consider any code” message, but it does print statistics, and it does generate an html report. The reports for the test suites (I actually have two test suites) have title “HPC Report Generation Error” with the “did not consider any code” message, but the “combined” package for the “all” test suite does have a full coverage report for my library. If I omit If I do Running |
Weird! I can't reproduce this with a basic template. Look in
Tracked by #1411 |
I can reproduce even with the steps above, when I change the resolver to
In a fresh import Lib (someFunc)
main :: IO ()
main = someFunc To make sure there is some coverage. I ran
And the .tix.premunging file:
So In the test project I get no html report even when I run I’m not sure what I should be looking for in the dist dir, but it contains mix files, one |
@ruuda Thanks for the repro! Turns out the issue is using --coverage with GHC8. Does my fix work for you? |
@mgsloan: everything works perfectly now. Thanks a lot! |
Hello !
I can't seem to be able to get a coverage reports for my tests. This is on OSX, and I don't have a linux machine handy to try and reproduce it.
Same behaviour for stack 1.1.2, and master.
Thanks a lot!
Steps to reproduce:
Expected:
Some kind of coverage report
Actual
The coverage report says
The logs says
stack test --coverage --verbose
outputThe text was updated successfully, but these errors were encountered: