[WIP] Update HPC for better compatibility with large projects
With large projects HPC can produce an argument list too long error: https://github.com/NixOS/nix/issues/5593
This can be avoided by passing arguments to HPC as Response Files: https://gcc.gnu.org/wiki/Response_Files
Needs https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8194 and a new release of HPC to Hackage
Follows https://github.com/input-output-hk/haskell.nix/pull/1464 (see https://github.com/input-output-hk/haskell.nix/pull/1464#issuecomment-1122123517)
Thanks for pursuing this upstream! Future users will thank you :)
https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8194 has been merged
Nice work! I guess we still either need to pull in the patch or else make the coverage code conditional since otherwise it will stop working for older GHCs?
I have merged the latest changes from master and refactored the code so that it puts all the args in a single response file. I also reenabled two of the tests that had been disabled and updated them for changes that were made on master.
For now I have included the patch as a ghc patch, but we can potentially drop that if/when hpc is updated in hackage.
You can test pandoc and other hackage packages with:
nix-build -E '((import ./. {}).pkgs-unstable.haskell-nix.hackage-project { compiler-nix-name = "ghc8107"; name = "pandoc"; modules = [{doCoverage = true;}]; }).projectCoverageReport'
bors try
try
Timed out.
bors try
bors try
try
Already running a review
bors try-
bors try
bors try-
bors try
I'm going to merge this because code coverage seems pretty broken in master and this at least works for the smaller projects I have tests.
I am worried that we removed this. Unfortunately every time I try to build ouroboros-network to test this issue I get bogged down by the zfs issue (cannot execute binary file: Exec format error).