Skip to content
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

Package keys vary in inplace.conf when --enable-tests is passed #2870

Closed
mgsloan opened this issue Oct 15, 2015 · 3 comments
Closed

Package keys vary in inplace.conf when --enable-tests is passed #2870

mgsloan opened this issue Oct 15, 2015 · 3 comments

Comments

@mgsloan
Copy link
Collaborator

mgsloan commented Oct 15, 2015

When you build tests with Cabal, the library they link to has a different package key than the library which is installed. I believe what's happening is that the full set of dependencies, including test dependencies, are being used to compute the key.

Here's a repro:

darcs clone http://hub.darcs.net/byorgey/split
cd split/
cabal sandbox init
cabal install

ghc-pkg field split key yields key: split_E4yadeCDng9EtdbI5MZoDg

grep key dist/dist-sandbox-ac80d1aa/package.conf.inplace/split-0.2.2-inplace.conf yields key: split_E4yadeCDng9EtdbI5MZoDg

So far things are fine. However, if I do a cabal install --enable-tests:

ghc-pkg field split key yields key: split_E4yadeCDng9EtdbI5MZoDg (same as before)

grep key dist/dist-sandbox-ac80d1aa/package.conf.inplace/split-0.2.2-inplace.conf yields key: split_IeGRGsZxCma0P7epq3xazi (different!!!)

This makes it extremely difficult to correctly merge HPC tix files from test-suites in different packages. See also https://ghc.haskell.org/trac/ghc/ticket/10952

@mgsloan
Copy link
Collaborator Author

mgsloan commented Oct 15, 2015

pinging @ezyang

@ezyang
Copy link
Contributor

ezyang commented Oct 15, 2015

I think this is fixed in HEAD. Can you give a try?

@mgsloan
Copy link
Collaborator Author

mgsloan commented Oct 16, 2015

Ah, yup, this is fixed in HEAD. Thanks!

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

No branches or pull requests

2 participants