haskell.nix icon indicating copy to clipboard operation
haskell.nix copied to clipboard

[WIP] Update HPC for better compatibility with large projects

Open peterbecich opened this issue 3 years ago • 1 comments

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)

peterbecich avatar May 26 '22 00:05 peterbecich

Thanks for pursuing this upstream! Future users will thank you :)

michaelpj avatar May 26 '22 08:05 michaelpj

https://gitlab.haskell.org/ghc/ghc/-/merge_requests/8194 has been merged

peterbecich avatar Aug 19 '22 01:08 peterbecich

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?

michaelpj avatar Aug 20 '22 10:08 michaelpj

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'

hamishmack avatar Aug 25 '22 11:08 hamishmack

bors try

hamishmack avatar Aug 25 '22 11:08 hamishmack

try

Timed out.

iohk-bors[bot] avatar Aug 25 '22 13:08 iohk-bors[bot]

bors try

hamishmack avatar Aug 26 '22 10:08 hamishmack

bors try

hamishmack avatar Aug 26 '22 11:08 hamishmack

try

Already running a review

iohk-bors[bot] avatar Aug 26 '22 11:08 iohk-bors[bot]

bors try-

hamishmack avatar Aug 26 '22 11:08 hamishmack

bors try

hamishmack avatar Aug 26 '22 11:08 hamishmack

try

Build failed:

iohk-bors[bot] avatar Aug 26 '22 13:08 iohk-bors[bot]

bors try-

hamishmack avatar Aug 26 '22 13:08 hamishmack

bors try

hamishmack avatar Sep 14 '22 05:09 hamishmack

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).

hamishmack avatar Sep 14 '22 09:09 hamishmack