Repository navigation
Closed
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").
Description
I don't have a minimal example at the moment sadly, but:
circuithub git:(coordinator-as-a-service) ✗ cabal new-test coordinator --enable-coverage ~/work/circuithub
Build profile: -w ghc-8.4.3 -O0
In order, the following will be built (use -v for more details):
- coordinator-1.0 (first run)
Preprocessing library for coordinator-1.0..
Building library for coordinator-1.0..
ignoring (possibly broken) abi-depends field for packages
Preprocessing executable 'coordinator' for coordinator-1.0..
Building executable 'coordinator' for coordinator-1.0..
Preprocessing executable 'coordinator-http' for coordinator-1.0..
Building executable 'coordinator-http' for coordinator-1.0..
Preprocessing test suite 'tests' for coordinator-1.0..
Building test suite 'tests' for coordinator-1.0..
Running 1 test suites...
Test suite tests: RUNNING...
<< test log omitted >>
All 31 tests passed (1.45s)
Test suite tests: PASS
Test suite logged to:
/home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.4.3/coordinator-1.0/noopt/test/coordinator-1.0-tests.log
hpc: can not find comparable-key-0.0.1-inplace/Data.ComparableKey in ./.hpc, /home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.4.3/coordinator-1.0/noopt/hpc/vanilla/mix/coordinator-1.0, /home/ollie/work/circuithub/dist-newstyle/build/x86_64-linux/ghc-8.4.3/coordinator-1.0/noopt/hpc/vanilla/mix/tests
CallStack (from HasCallStack):
error, called at libraries/hpc/Trace/Hpc/Mix.hs:122:15 in hpc-0.6.0.3:Trace.Hpc.Mix
cabal: Tests failed for coordinator-1.0.
Metadata
Metadata
Assignees
Labels
cabal-install: v2-build systemAffecting v2-build and related commands that use v2-architecture (aka "nix local builds").
Activity
ocharles commentedon Jul 17, 2018
I looked at this a bit more.
cabal new-testruns:But the correct execution of
hpc markupis:ocharles commentedon Jul 17, 2018
Edit: ignore this comment, I was reading a bad copy/paste
ocharles commentedon Jul 17, 2018
It roughly looks like
cabal new-testis expecting to only produce coverage for thecoordinatortest suite, but it's built everything with coverage, which I think is the problem.23Skidoo commentedon Jul 17, 2018
/cc @ttuegel
RyanGlScott commentedon Jul 25, 2018
I think this has a symptom in common with (or might even be a duplicate of) #5213.
ocharles commentedon Jul 26, 2018
Yea, I did have a feeling it'd be the same bug, but wasn't entirely sure.
vu3rdd commentedon Sep 5, 2018
I am getting by this too. Is there any known solution? I am on GHC 8.4.3 with Cabal lib 2.2.0.1 and cabal-install 2.2.0.0 on Debian.
hvr commentedon Sep 5, 2018
Duplicate of #5213
ocharles commentedon Feb 14, 2020
I am not convinced this is a duplicate of #5213. That issue is about a single Cabal package not working, and part of that bug is probably here. But this bug is about other libraries not being picked up. Another example came up today:
ch-linearis a dependency ofch-persistence. Yet when we look at thehpc markupinvocation:We see there is no mention to
ch-linearat all.The correct invocation of
hpc markupis much more involved:ocharles commentedon Feb 14, 2020
The other alternative invocation is
hpc markupwith--excludefor all modules in other libraries.I think what is problematic is that all libraries in the
cabal.projectare built with coverage, when the intention is just to build the library being tested with coverage.Could a Cabal dev confirm that?
Fix test --enable-coverage for multi-package projects
Fix test --enable-coverage for multi-package projects
Fix test --enable-coverage for multi-package projects