-
Notifications
You must be signed in to change notification settings - Fork 702
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
extra-packages make cabal install fail #8848
Comments
Does cabal 3.8.1.0 fail similarly? |
Yes, cabal-3.6.2.0, cabal-3.8.1.0 and cabal-3.10.1.0 seem all affected. |
Thanks. That seems to be a part of the known problem that If we had a minimal reproducer for this problem included in our test suite, that would be a great start to fixing it. |
alt-romes
added a commit
to alt-romes/cabal
that referenced
this issue
Feb 16, 2024
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
alt-romes
added a commit
to alt-romes/cabal
that referenced
this issue
Feb 16, 2024
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
alt-romes
added a commit
to alt-romes/cabal
that referenced
this issue
Feb 16, 2024
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
alt-romes
added a commit
to alt-romes/cabal
that referenced
this issue
Feb 19, 2024
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
alt-romes
added a commit
to alt-romes/cabal
that referenced
this issue
Feb 19, 2024
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
Mikolaj
pushed a commit
to alt-romes/cabal
that referenced
this issue
Mar 4, 2024
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 bot
pushed a commit
that referenced
this issue
Apr 9, 2024
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 (cherry picked from commit c671f0e)
Mikolaj
pushed a commit
that referenced
this issue
Apr 9, 2024
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 (cherry picked from commit c671f0e)
erikd
pushed a commit
to erikd/cabal
that referenced
this issue
Apr 22, 2024
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Describe the bug
It looks like the mere existence of a package in
extra-packages
make cabal install fail.To Reproduce
The output is
Notes:
temp-cabal-install:exe:temp-cabal-install
-v3
shows that this happens after planning. Indeeddist-newstyle/cache/plan.json
is created and it seems correct (it includes bothlens
andtemp-cabal-install
)cabal v2-build temp-cabal-install --dry-run
and the failingcabal v2-install temp-cabal-install --dry-run
. You can see the replanning using-v2
or-v3
butdist-newstyle/cache/plan.json
does not change (according to sha256sum).Expected behavior
I'd expect cabal to be able to install
temp-cabal-install:exe:temp-cabal-install
just like without the lineextra-packages: lens
in cabal.project (which of course works).System information
Additional context
In the cardano-node repo we moved from using source-repository-packages to external repository for some dependencies not present on Hackage. So in IntersectMBO/cardano-node#4921 the following lines were removed from cabal.project
This had the unintended effect of removing the executables
ouroboros-consensus-cardano-tools:exe:db-analyser
andouroboros-consensus-cardano-tools:exe:db-synthesizer
from the plan, sinceouroboros-consensus-cardano-tools
had no other reasons to be brought into the plan other than the, now removed,source-repository-package
stanza.Our nix setup relied on those executables being built as part of the cabal project so I added
extra-packages: ouroboros-consensus-cardano-tools
to have them back into the plan. This fixed the nix setup, but brokecabal install
.The package
cardano-cli
is a local package (inpackages:
) and nowcabal install cardano-cli
fails as described above.We will be able to find a workaround but I am a bit surprised by this failure. I haven't yet looked at the code.
The text was updated successfully, but these errors were encountered: