Fix $PATH ordering in README
The README currently suggests to set your $PATH
like so:
export PATH="$HOME/.cabal/bin:$HOME/.ghcup/bin:$PATH"
However, this means the system-installed cabal
overrides the ghcup
installed cabal
. This recently bit me. Instead, I believe the $PATH
should be set like so:
export PATH="$HOME/.ghcup/bin:$HOME/.cabal/bin:$PATH"
Merge request reports
Activity
My experience was migrating from a
stack
-managed installation ofcabal
toghcup
-managed installation. In my case, I was setting up a project that used Cabal 3.x, which Stack does not yet support.I was getting some incompatibility errors with building my project before I realised that, even though I had run
ghcup install-cabal
,which cabal
was pointing at my Stack-managed installation of Cabal 2.x.In my case, having the guarantee that "my
cabal
is always in sync and compatible with myghcup
-installedghc
" would have been more valuable than "mycabal
is the one I last installed".The behaviour that I expect coming from other version managers like NVM is for every
ghc
version to have its own persistent (i.e. "if I'm running GHC X which by default installs Cabal Y and I upgrade to Cabal Z, the next time I switch back to GHC X, I'm using Cabal Z"), compatiblecabal
. Is this an intended goal?ghc and cabal-install are not in sync at all currently. And why would they?
It should be backwards compatible. There is no switching of cabal-install implemented at all. It's purpose is bootstrapping, mainly.
Once you bootstrapped it you want to be able to install any version you want from hackage.