Re: [GHC] #1853: hpc mix files for Main modules overwrite each other

#1853: hpc mix files for Main modules overwrite each other ----------------------------------+-------------------------------------- Reporter: guest | Owner: AndyGill Type: bug | Status: new Priority: lowest | Milestone: 8.0.1 Component: Code Coverage | Version: 6.8.1 Resolution: | Keywords: Operating System: Linux | Architecture: x86_64 (amd64) Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): ----------------------------------+-------------------------------------- Comment (by mgsloan): This is also troublesome for using `hpc combine --union` to merge tix files which come from different programs. My current hack is to preprocess the tix files and remove all of the executable modules, like this: https://gist.github.com/mgsloan/e44e8775516c50f10edf I think the ideal resolution would be to prefix all of the executable modules with some better identification. How about having a new ghc flag like `--hpc-package-prefix prefix`, where the conventional value for prefix is the cabal `package:component`? Then, the tix files will use this prefix on module names, and the mix files will get outputted to a subdirectory instead of the root of the hpcdir. This convention gets a little weird due to the usage of `:` when passing `--include` and `--exclude` to the hpc program (see https://downloads.haskell.org/~ghc/latest/docs/html/users_guide/hpc.html). However, with care, `:` should be a valid thing to use in `PACKAGE`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/1853#comment:18 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC