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

Solver: Support dependencies on sub-libraries (issue #6039) (3rd iteration) #6836

Merged
merged 8 commits into from
May 23, 2020

Conversation

fgaz
Copy link
Member

@fgaz fgaz commented May 22, 2020

Adds check overrides to #6812 / #6047

/cc @phadej @grayjay

This commit tracks dependencies on sub-libraries by extending the functionality
for tracking executables that was added in
e86f838.

It also starts adding support for library visibility, though it currently only
works for source packages.  There is a TODO for handling installed packages.

This commit handles visibility similarly to the way that the buildable field is
handled currently.  It only checks whether a component is made private by the
current environment and flag constraints at the start of dependency solving.
This means that the solver can treat a component as visible when the visibility
is controlled by an automatic flag, and the build can fail later, depending on
the value that is chosen for the flag.

Fixes haskell#6038.
This commit also refactors the Dependencies type so that it can represent any
combination of dependencies, buildability, and visibility.
fgaz added 2 commits May 23, 2020 10:01
GHC <8.8 isn't able to read the "visibility" field from the package
database, since it's built against an older Cabal. For this reason,
using multiple public libraries with it did not work (all sublibraries
appeared as private).

This patch makes cabal-install override Cabal's library visibility
checks when GHC is older than 8.8, extending the multiple libraries
feature compatibiliy to older GHCs.
Copy link
Collaborator

@phadej phadej left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a changelog entry.

@fgaz fgaz requested a review from phadej May 23, 2020 16:07
@fgaz
Copy link
Member Author

fgaz commented May 23, 2020

Oh, [ci skip] doesn't work anymore :-/

@phadej
Copy link
Collaborator

phadej commented May 23, 2020 via email

@fgaz
Copy link
Member Author

fgaz commented May 23, 2020

I do see that it's waaay faster than before, thanks for that! And just to be clear, I'm merging this once it's green

@fgaz fgaz merged commit b83e0c9 into haskell:master May 23, 2020
@grayjay
Copy link
Collaborator

grayjay commented May 26, 2020

Thanks for finishing my PR!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants