commercialhaskell / stack

The Haskell Tool Stack
http://haskellstack.org
BSD 3-Clause "New" or "Revised" License
3.98k stars 842 forks source link

Support coverage results for non-library code #1359

Open mgsloan opened 8 years ago

mgsloan commented 8 years ago

See #1008 . I'm thinking this would look like adding a --coverage-exe flag. Or, some other name, TBH one of the reasons this doesn't exist is that there's no concise name for this flag that obviously corresponds to its behavior.

The implementation would look like:

Due to some hpc funkiness, these results will not be able to be included in the unified coverage report, or any coverage reports that span multiple packages.

ezyang commented 8 years ago

I was looking for the Cabal code for this, and I noticed that Cabal passes the same hpcdir for each component that is being built. Would it be better for Stack if Cabal passed a distinct hpcdir in each case? This seems "more correct" to me but I'd like to see what is best for you guys (even if it's, "Keep the old behavior, because otherwise you guys have to introduce BC handling...")

mgsloan commented 8 years ago

Unfortunately, that isn't sufficient. Thanks for considering it, though! I've added more details here.

PierreVDL commented 7 years ago

I really would like to know what test code is actual used in my tests. Since unused test code is definitely a code smell!