-
Notifications
You must be signed in to change notification settings - Fork 704
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix cabal-install in the presence of extra-packages
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 #8848
- Loading branch information
Showing
5 changed files
with
30 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
main = pure () |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
packages: . | ||
extra-packages: containers |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
import Test.Cabal.Prelude | ||
|
||
main = cabalTest $ do | ||
recordMode DoNotRecord $ | ||
cabal' "install" ["t8848"] | ||
>>= assertOutputContains "Wrote tarball sdist to" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
name: t8848 | ||
version: 1.0 | ||
build-type: Simple | ||
cabal-version: >= 1.2 | ||
|
||
executable t8848 | ||
main-is: Main.hs | ||
build-depends: base |