haskell / haskell/cabal

new-build stores are dbs in the ghc-pkg sense, but treating them as such breaks cabal

Open
#5,125 5 comments 0 reactions 0 assignees View on GitHub
cabal-install: v2-build system type: enhancement
Dominant language
Haskell
Stars
1.7k
Forks
750
Avg merge
4d 3h
Merged PRs (30d)
28

Description

e.g.

1) the user `ghc-pkg unregister`s a dependency of a build-tool
2) the user deletes the corresponding package
3) cabal new-build will choke with some internal error when creating a build-plan involving that build-tool because it expects the dependencies of build-tools to be installed but they are not.

Also note that after 1+2, `ghc-pkg check` turns up clean, while from cabal perspective, the store is in an inconsistent state. Well, that depends on the "consistency" definition, but alternatively, the store still _is_ consistent, only the build-plan construction makes false assumptions which would make it a bug there instead.

Possible solutions:

1) Properly communicate to users that the store is not a proper package-db. Ideally make it incompatible with `ghc-pkg`
2) Fix the build-plan to be more robust against this, e.g. by not expecting dependencies of executables to be installed.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.