-
Notifications
You must be signed in to change notification settings - Fork 701
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
Running cabal-install unit-tests fails due to Hpc failure #7384
Comments
Pinging @hvr. Historically, when I brought this fact up, it was brushed off as "Not Cabal's Problem", because it is primarily due to the way HPC produces garbage and doesn't clean up after itself. I tend to agree, but I think until HPC gets its ducks in a row, Cabal should handle the cleanup and teardown when it creates coverage reports. I would welcome PR's that help with this, and PR's that improve the general state of Coverage as Cabal handles it in general. |
Sounds like hpc needs some love. |
It really does. It has no owner currently, and it's becoming bitrotten as a result. If you know anyone with free bandwidth to spare, hit up @bgamari or someone else on the GHC team and perhaps they can bring that person up to speed. |
I feel it is even worse than reported here; in particular, I can induce this problem without any reference to profiling, e.g., |
Now I understand why README.md say to use |
Is fixed (or work-arounded) by #7421 |
This is due to an (in my opinion) anti-feature of hpc: At program startup it tries to read in the .tix file and accumulates coverage information across multiple runs. This behaviour is documented in the hpc user guide:
I just stumbled upon this problem myself. See https://gitlab.haskell.org/ghc/ghc/-/issues/23955 |
Describe the bug
Executing the test-suite via
cabal run unit-tests
incabal-install
sub-directory works fine on the first run.After changing the test-suite, followed by executing the tests again the following error is thrown:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Should not crash
System information
Linux archlinux 5.11.16-arch1-1 #1 SMP PREEMPT Wed, 21 Apr 2021 17:22:13 +0000 x86_64 GNU/Linux
cabal 3.4.0.0
installed via ghcupghc 8.10.2
installed via ghcupThe text was updated successfully, but these errors were encountered: