-
Notifications
You must be signed in to change notification settings - Fork 701
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
Fix cabal install in the presence of extra-packages #9719
Conversation
Rebased on #9706. |
42af3e5
to
c58174b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some comment spelling nits.
8de7061
to
9a3c767
Compare
I talked about this with Rodrigo and this fix at least does not seem worse than what is currently there. It would be good if there are some more tests for |
I just extra-packages to add packages into the plan, so their presence affects the solver. I haven't thought about the implication for |
We mean how extra-packages should behave in general wrt other features like For |
Extra-packages listed in a cabal project are to be fetched from hackage, and will be in memory as 'NamedPackages' rather than resolved to 'SpecificSourcePackage'. On install, we need to make source-dists for all the specific source packages, and fetch other packages from hackage. Since extra-packages are already 'NamedPackages', we simply return them along the sdistize-d specific source packages and the hackage source packages -- they will be correctly fetched from Hackage from install. Previously, cabal install <tgt> on a project with extra-packages would fail because the branch of 'NamedPackage' for 'PackageSpecifier' was simply unimplemented. Fixes haskell#8848
@mergify backport 3.12 |
✅ Backports have been created
|
Fix cabal install in the presence of extra-packages (backport #9719)
Extra-packages listed in a cabal project are to be fetched from hackage,
and will be in memory as 'NamedPackages' rather than resolved to
'SpecificSourcePackage'.
On install, we need to make source-dists for all the specific source
packages, and fetch other packages from hackage. Since extra-packages
are already 'NamedPackages', we simply return them along the sdistize-d
specific source packages and the hackage source packages -- they will be
correctly fetched from Hackage from install.
Previously, cabal install on a project with extra-packages would
fail because the branch of 'NamedPackage' for 'PackageSpecifier' was
simply unimplemented.
Fixes #8848