[GHC] #10259: HPC code coverage fails

#10259: HPC code coverage fails -------------------------------------+------------------------------------- Reporter: | Owner: LukeHoersten | Status: new Type: bug | Milestone: Priority: normal | Version: 7.10.1 Component: Compiler | Operating System: MacOS X Keywords: hpc | Type of failure: None/Unknown Architecture: | Blocked By: Unknown/Multiple | Related Tickets: Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- in a completely clean sandbox environment: cabal install --dependencies-only --enable-tests --enable-coverage --enable-benchmarks cabal build test --dependencies-only --enable-tests --enable-coverage --enable-benchmarks cabal test project --test-options=--html=dist/tasty/index.html Command: cabal test project --test-options=--html=dist/tasty/index.html Exit code: 1 Stderr: hpc: can not find text_IINWRW1LxFGIctooOLjJAI/Data.Text.Unsafe in ["./.hpc","./dist/hpc/vanilla/mix/project-0.1.0.0","./dist/hpc/vanilla/mix /project-test"] $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.1 $ cabal --version cabal-install version 1.22.2.0 using version 1.22.2.0 of the Cabal library $ clang --version Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix OS X version 10.10.3 Installed from home-brew and Haskell for Mac OS X both have the same problem. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10259 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10259: HPC code coverage fails -------------------------------------+------------------------------------- Reporter: LukeHoersten | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: hpc Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Description changed by LukeHoersten: Old description:
in a completely clean sandbox environment:
cabal install --dependencies-only --enable-tests --enable-coverage --enable-benchmarks cabal build test --dependencies-only --enable-tests --enable-coverage --enable-benchmarks cabal test project --test-options=--html=dist/tasty/index.html
Command: cabal test project --test-options=--html=dist/tasty/index.html Exit code: 1 Stderr: hpc: can not find text_IINWRW1LxFGIctooOLjJAI/Data.Text.Unsafe in ["./.hpc","./dist/hpc/vanilla/mix/project-0.1.0.0","./dist/hpc/vanilla/mix /project-test"]
$ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.1
$ cabal --version cabal-install version 1.22.2.0 using version 1.22.2.0 of the Cabal library
$ clang --version Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix
OS X version 10.10.3
Installed from home-brew and Haskell for Mac OS X both have the same problem.
New description: in a completely clean sandbox environment: cabal install --dependencies-only --enable-tests --enable-coverage --enable-benchmarks cabal build test --enable-tests --enable-coverage --enable-benchmarks cabal test project --test-options=--html=dist/tasty/index.html Command: cabal test project --test-options=--html=dist/tasty/index.html Exit code: 1 Stderr: hpc: can not find text_IINWRW1LxFGIctooOLjJAI/Data.Text.Unsafe in ["./.hpc","./dist/hpc/vanilla/mix/project-0.1.0.0","./dist/hpc/vanilla/mix /project-test"] $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.10.1 $ cabal --version cabal-install version 1.22.2.0 using version 1.22.2.0 of the Cabal library $ clang --version Apple LLVM version 6.0 (clang-600.0.57) (based on LLVM 3.5svn) Target: x86_64-apple-darwin14.3.0 Thread model: posix OS X version 10.10.3 Installed from home-brew and Haskell for Mac OS X both have the same problem. -- -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10259#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10259: HPC code coverage fails -------------------------------------+------------------------------------- Reporter: LukeHoersten | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: hpc Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by LukeHoersten): I was able to reproduce this on 7.8.4 as well. The error is slightly different though: hpc: can not find text-1.2.0.4/Data.Text.Unsafe in ["./.hpc","./dist/hpc/prof/mix/project-0.1.0.0","./dist/hpc/prof/mix/project"] -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10259#comment:2 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10259: HPC code coverage fails -------------------------------------+------------------------------------- Reporter: LukeHoersten | Owner: Type: bug | Status: new Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: | Keywords: hpc Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by LukeHoersten): Turns out this was my fault: Using --enable-coverage on cabal install was causing deps to get included in the mix file but for some reason no tix were being generated for the deps. Either way, I did not want deps to be tested for coverage. Is this correct behavior that using --enable-coverage on cabal install should include deps in the mix file? It seems like that is never correct and for someone only using 'cabal install' it will never work for them. Also, it's unclear to me when to use -fhpc vs. --enable-coverage. Is there anywhere this is documented? -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10259#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10259: HPC code coverage fails -------------------------------------+------------------------------------- Reporter: LukeHoersten | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: invalid | Keywords: hpc Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Changes (by LukeHoersten): * status: new => closed * resolution: => invalid -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10259#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

Also, it's unclear to me when to use -fhpc vs. --enable-coverage. Is
#10259: HPC code coverage fails -------------------------------------+------------------------------------- Reporter: LukeHoersten | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 7.10.1 Resolution: invalid | Keywords: hpc Operating System: MacOS X | Architecture: Type of failure: None/Unknown | Unknown/Multiple Blocked By: | Test Case: Related Tickets: | Blocking: | Differential Revisions: -------------------------------------+------------------------------------- Comment (by rwbarton): Right, actually the problem specifically is that Cabal doesn't install the `.mix` files anywhere when installing a package built with `--enable- coverage`. So effectively you never want to use `cabal install --enable- coverage`. This is a Cabal issue, not a GHC issue. there anywhere this is documented? `-fhpc` is an option to GHC, and `--enable-coverage` is an option to cabal-install. If you use `--enable-coverage` then Cabal will take care of passing `-fhpc` to GHC. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10259#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC