Install cabal-install, firstly run cabal install --lib base
, and vanilla GHC stops working
#8825
Labels
cabal install --lib base
, and vanilla GHC stops working
#8825
Describe the bug
If you execute
cabal install --lib base
as the first command for the installation of cabal-install, vanilla GHC stops working.The command neither installs nor builds any package, but will create
~/.ghc/<arch>-<os>-<ghcver>/environments/default
. If this is before any build of packages, the file~/.cabal/store/ghc-<ghcver>/package.db
is and continues to be non-existent, but it gets pointed to by the newly created~/.ghc/<arch>-<os>-<ghcver>/environments/default
. The env file is in an invalid state! As a result, vanilla GHC stops working until you delete the env file or you build something with cabal-install.To Reproduce
Steps to reproduce the behavior:
Expected behavior
Vanilla GHC should work after
cabal v2-install --lib base
. We have, at least, three options:cabal v2-install --lib base
should not create~/.ghc/<arch>-<os>-<ghcver>/environments/default
.cabal v2-install --lib base
should ensure that the cabal-managed package database exists.cabal v2-install --lib base
should not write the dependency on the cabal-managed package database in an env file until an actual dependency appears.I have no idea which is the best among these three options or whether there is a better option.
System information
The text was updated successfully, but these errors were encountered: