Skip to content

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

Merged
fgaz merged 8 commits intohaskell:masterfrom
fgaz:pr-6047-3
May 23, 2020
Merged

Solver: Support dependencies on sub-libraries (issue #6039) (3rd iteration)#6836
fgaz merged 8 commits intohaskell:masterfrom
fgaz:pr-6047-3

Conversation

@fgaz
Copy link
Copy Markdown
Member

@fgaz fgaz commented May 22, 2020

Adds check overrides to #6812 / #6047

/cc @phadej @GrayJay

sebright added 5 commits May 22, 2020 20:42
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
Copy Markdown
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
Copy Markdown
Member Author

fgaz commented May 23, 2020

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

@phadej
Copy link
Copy Markdown
Collaborator

phadej commented May 23, 2020 via email

@fgaz
Copy link
Copy Markdown
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
@sebright
Copy link
Copy Markdown
Collaborator

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