Repository navigation
Closed
Description
If we do this, then GHC will generate tix for those modules, but Cabal doesn't know how to find them:
ezyang@sabre:~/Dev/labs/map-syntax$ /opt/cabal/1.24/bin/cabal test -v
Component build order: test suite 'testsuite'
creating dist/build
creating dist/build/autogen
/usr/bin/ghc-pkg init dist/package.conf.inplace
Preprocessing test suite 'testsuite' for map-syntax-0.2.0.1...
Building test suite testsuite...
creating dist/build/testsuite
creating dist/build/testsuite/testsuite-tmp
/usr/bin/ghc --make -no-link -fbuilding-cabal-package -O -fhpc -hpcdir dist/hpc/vanilla/mix/testsuite -j1 -static -outputdir dist/build/testsuite/testsuite-tmp -odir dist/build/testsuite/testsuite-tmp -hidir dist/build/testsuite/testsuite-tmp -stubdir dist/build/testsuite/testsuite-tmp -i -idist/build/testsuite/testsuite-tmp -isrc -itest -idist/build/autogen -Idist/build/autogen -Idist/build/testsuite/testsuite-tmp -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages -package-db dist/package.conf.inplace -package-id HUnit-1.3.0.0-904109a490c85ff643c14c4cfbe058fb -package-id QuickCheck-2.8.1-2cs6jeUUZX9ZLDN6ycKJHM -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d -package-id containers-0.5.6.2-59326c33e30ec8f6afd574cbac625bbb -package-id deepseq-1.4.1.1-614b63b36dd6e29d2b35afff57c25311 -package-id hspec-2.2.3-26H6GBDRpLQCyZpmHWBtcW -package-id mtl-2.2.1-378RFoja0lduCvzTAM9NPi -package-id transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -XHaskell2010 test/TestSuite.hs -Wall -fwarn-tabs
[1 of 4] Compiling Data.Map.Syntax ( src/Data/Map/Syntax.hs, dist/build/testsuite/testsuite-tmp/Data/Map/Syntax.o )
[2 of 4] Compiling Data.Map.Syntax.Util ( test/Data/Map/Syntax/Util.hs, dist/build/testsuite/testsuite-tmp/Data/Map/Syntax/Util.o )
[3 of 4] Compiling Data.Map.Syntax.Tests ( test/Data/Map/Syntax/Tests.hs, dist/build/testsuite/testsuite-tmp/Data/Map/Syntax/Tests.o )
test/Data/Map/Syntax/Tests.hs:10:1: Warning:
The import of ‘Data.Monoid’ is redundant
except perhaps to import instances from ‘Data.Monoid’
To import instances alone, use: import Data.Monoid()
[4 of 4] Compiling Main ( test/TestSuite.hs, dist/build/testsuite/testsuite-tmp/Main.o )
Linking...
/usr/bin/ghc --make -fbuilding-cabal-package -O -fhpc -hpcdir dist/hpc/vanilla/mix/testsuite -static -outputdir dist/build/testsuite/testsuite-tmp -odir dist/build/testsuite/testsuite-tmp -hidir dist/build/testsuite/testsuite-tmp -stubdir dist/build/testsuite/testsuite-tmp -i -idist/build/testsuite/testsuite-tmp -isrc -itest -idist/build/autogen -Idist/build/autogen -Idist/build/testsuite/testsuite-tmp -optP-include -optPdist/build/autogen/cabal_macros.h -hide-all-packages -package-db dist/package.conf.inplace -package-id HUnit-1.3.0.0-904109a490c85ff643c14c4cfbe058fb -package-id QuickCheck-2.8.1-2cs6jeUUZX9ZLDN6ycKJHM -package-id base-4.8.2.0-0d6d1084fbc041e1cded9228e80e264d -package-id containers-0.5.6.2-59326c33e30ec8f6afd574cbac625bbb -package-id deepseq-1.4.1.1-614b63b36dd6e29d2b35afff57c25311 -package-id hspec-2.2.3-26H6GBDRpLQCyZpmHWBtcW -package-id mtl-2.2.1-378RFoja0lduCvzTAM9NPi -package-id transformers-0.4.2.0-81450cd8f86b36eaa8fa0cbaf6efc3a3 -XHaskell2010 test/TestSuite.hs -o dist/build/testsuite/testsuite -Wall -fwarn-tabs
Linking dist/build/testsuite/testsuite ...
Running 1 test suites...
Test suite testsuite: RUNNING...
dist/build/testsuite/testsuite
Test suite testsuite: PASS
Test suite logged to: dist/test/map-syntax-0.2.0.1-testsuite.log
/srv/prod/bin/hpc markup dist/hpc/vanilla/tix/testsuite/testsuite.tix '--destdir=dist/hpc/vanilla/html/testsuite' '--hpcdir=dist/hpc/vanilla/mix/testsuite' '--hpcdir=dist/hpc/vanilla/mix/map-syntax-0.2.0.1' '--exclude=Data.Map.Syntax' '--exclude=Data.Map.Syntax.Util' '--exclude=Data.Map.Syntax.Tests' '--exclude=Main'
hpc: can not find 5Dy4335KtNp12MnuUhJwf2/Test.Hspec.Timer in ./.hpc, ./dist/hpc/vanilla/mix/map-syntax-0.2.0.1, ./dist/hpc/vanilla/mix/testsuite
CallStack (from ImplicitParams):
error, called at libraries/hpc/Trace/Hpc/Mix.hs:119:15 in hpc-0.6.0.2:Trace.Hpc.Mix
Originally discovered when trying to reproduce #3682
Activity
ezyang commentedon Aug 16, 2016
Actually, maybe we should just install the
mixfiles in this case? Basically, every package you enable coverage for should show up in the coverage report. That ought to work![-]cabal install --enable-coverage should not actually install things built with `-fhpc`[/-][+]cabal install --enable-coverage doesn't install mix in findable location, causing hpc to fail when those ids are mentioned[/+]ezyang commentedon Aug 16, 2016
We're not planning on fixing this unless it actually affects someone.
cartazio commentedon Feb 14, 2020
@davean is this the problem we hit?
Mikolaj commentedon Jul 24, 2021
This is superseded by #5213. If we fix this, it will be in v2- commands, not v1-. Closing