Skip to content
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

Correct "stack test --coverage" results requires a "stack clean" #1411

Closed
mgsloan opened this issue Nov 24, 2015 · 3 comments
Closed

Correct "stack test --coverage" results requires a "stack clean" #1411

mgsloan opened this issue Nov 24, 2015 · 3 comments
Milestone

Comments

@mgsloan
Copy link
Contributor

mgsloan commented Nov 24, 2015

I found this while turning https://github.com/mgsloan/multi-test-suite into an integration test. Running stack test followed by stack test --coverage results in empty coverage reports. This appears to be an issue with GHC recompilation checking, as instead doing stack test --coverage --ghc-options -fforce-recomp solves the problem.

I'm not sure what to do about this. The best thing I can think of is a bit tricky - detect when this flag is newly enabled or disabled and supply --ghc-options --fforce-recomp for this circumstance.

@borsboom
Copy link
Contributor

borsboom commented Jan 6, 2016

On OS X, the --ghc-options -fforce-recomp seems to trigger this build error:

ld: -rpath can only be used when creating a dynamic final linked image
clang: error: linker command failed with exit code 1 (use -v to see invocation)

@sjakobi
Copy link
Member

sjakobi commented Apr 25, 2016

Looks like #1997 is related, possibly a duplicate.

@mpilgrem
Copy link
Member

The stack.yaml in the original repository was using lts-3.9 (GHC 7.10.2), which is no longer supported by modern Stack. I can't reproduce any problem with stack test followed by stack text --coverage, so I am going to close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants