Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

README: Note that cabal does support coverage with 3.6.0.0 or later #884

Closed
RyanGlScott opened this issue Oct 12, 2021 · 3 comments
Closed

Comments

@RyanGlScott
Copy link
Contributor

Currently, the README says:

Testing with coverage tracking is currently only available via stack, as cabal new-* does not yet support coverage. Use scripts/stack-test-coverage.sh to generate a coverage report for all test suites.

As pointed out in #874 (comment), however, the claim that cabal doesn't support coverage isn't quite true these days. The issue linked above haskell/cabal#5213, has since been fixed, and the fix is present in cabal-3.6.0.0 and later. We should change the wording in the README to reflect this.

@peterbecich
Copy link

Are you running cabal test --enable-coverage all , cabal test --enable-coverage --disable-library-coverage all, or something else?

This may still be unresolved: haskell/cabal#6440
Using Cabal 3.6.2.0 and the latest commit of crucible, I get:

% cabal test --enable-coverage all
Resolving dependencies...
Error:
    Internal libraries only supported with per-component builds.
    Per-component builds were disabled because program coverage is enabled
    In the package 'tasty-sugar-1.1.0.0'

Thanks

@RyanGlScott
Copy link
Contributor Author

Sigh. Admittedly, I hadn't actually tried running cabal test --enable-coverage before posting this issue, but you're correct in observing that it doesn't work out of the box just yet. I guess we'll just have to mention the workaround from haskell/cabal#6440 in the README.

@RyanGlScott
Copy link
Contributor Author

Done in #1098.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants