-
Notifications
You must be signed in to change notification settings - Fork 841
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
stack test --coverage "did not consider any code", fails to produce coverage report #3997
Comments
May be related to the usage of Template Haskell (?) |
Bump? I think I am running into this as well. Happy to provide enough details to reproduce if it would be helpful. Like Dan, I have double-checked that as far as I can tell, neither #1008 nor #1411 are the culprit. I am also using Template Haskell (to generate some lenses), though that hardly seems remarkable. I happened to be on stack 1.7.1 so I upgraded to the latest (1.9.3) to see if that would help; it didn't. |
Bump. I'm running into this too. No Template Haskell involved this time. Repro:
|
I've got the same problem on my project, so I tried with a stack template with same result :
output :
|
Ok, I have been able to get it working : run the same
(from your project root) |
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ ^ Interestingly, |
✨ This is an old work account. Please reference @brandonchinn178 for all future communication ✨ Ok so running
and LTS 15.0 including
If I manually run the So it seems like the culprit is Line 183 in 95aaf2b
which it gets from Lines 138 to 146 in 95aaf2b
which it gets from Line 128 in 95aaf2b
andddddd the bug seems to be in Lines 434 to 438 in 95aaf2b
It seems like Cabal 3 formats the
I'll make a PR for this |
Ecosystem changes caused test coverage report generation via `stack test --coverage` to break sometime between lts-13.0 and lts-16.0; this is a workaround. See commercialhaskell/stack#3997
* Bump stack resolver version to 16.0 and update tests - `fail` is being removed from the `Monad` class, so we need to update some constraints. See https://gitlab.haskell.org/ghc/ghc/-/wikis/design/monad-fail - Behavior of getElementCssValue may depend on the version of firefox. - Ecosystem changes caused test coverage report generation via `stack test --coverage` to break sometime between lts-13.0 and lts-16.0; this is a workaround. See commercialhaskell/stack#3997 Co-authored-by: nbloomf <[email protected]>
Steps to reproduce
Expected
I expect an accurate coverage report to be generated.
Actual
Note that:
hs-source-dirs: src
, while the test-suite target hashs-source-dirs: test
. The test suitebuild-depends
on the lib. (thus avoiding Warn when a test-suite / executable / benchmark also builds the library code? #1008)stack unpack
, with no previous.stack-work
state in the directory. (thus avoiding Correct "stack test --coverage" results requires a "stack clean" #1411. Even so, I have tried the same command with--ghc-options -fforce-recomp
; same result.)Here's the verbose output:
Stack version
Method of installation
stack upgrade
The text was updated successfully, but these errors were encountered: