Skip to content

Update HPC for better compatibility with large projects #1484

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

Merged
merged 15 commits into from
Sep 14, 2022

Conversation

peterbecich
Copy link
Contributor

@peterbecich peterbecich commented May 26, 2022

With large projects HPC can produce an argument list too long error: NixOS/nix#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 #1464 (see #1464 (comment))

@peterbecich peterbecich changed the title Update HPC for better compatibility with large projects [WIP] Update HPC for better compatibility with large projects May 26, 2022
@michaelpj
Copy link
Collaborator

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

@peterbecich
Copy link
Contributor Author

@michaelpj
Copy link
Collaborator

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?

@hamishmack
Copy link
Collaborator

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
Copy link
Collaborator

bors try

iohk-bors bot added a commit that referenced this pull request Aug 25, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 25, 2022

try

Timed out.

@peterbecich peterbecich changed the title [WIP] Update HPC for better compatibility with large projects Update HPC for better compatibility with large projects Aug 26, 2022
@peterbecich peterbecich marked this pull request as ready for review August 26, 2022 04:10
@hamishmack
Copy link
Collaborator

bors try

1 similar comment
@hamishmack
Copy link
Collaborator

bors try

@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 26, 2022

try

Already running a review

@hamishmack
Copy link
Collaborator

bors try-

@hamishmack
Copy link
Collaborator

bors try

iohk-bors bot added a commit that referenced this pull request Aug 26, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Aug 26, 2022

try

Build failed:

@hamishmack
Copy link
Collaborator

bors try-

hamishmack added a commit that referenced this pull request Aug 26, 2022
We should be able to merge these without risking breaking existing coverage reports.  Then we can merge #1484 once we are happy it is working.
hamishmack added a commit that referenced this pull request Aug 29, 2022
We should be able to merge these without risking breaking existing coverage reports. Then we can merge #1484 once we are happy it is working.
@hamishmack hamishmack marked this pull request as ready for review September 14, 2022 05:57
@hamishmack
Copy link
Collaborator

bors try

iohk-bors bot added a commit that referenced this pull request Sep 14, 2022
@iohk-bors
Copy link
Contributor

iohk-bors bot commented Sep 14, 2022

try

Build succeeded:

@yvan-sraka yvan-sraka mentioned this pull request Sep 14, 2022
@hamishmack
Copy link
Collaborator

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 hamishmack merged commit 965c7ac into input-output-hk:master Sep 14, 2022
@peterbecich peterbecich deleted the hpc-patch branch September 16, 2022 01:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants