I'm having some trouble understanding how to upgrade packages inside a cabal sandbox. I'd like to upgrade esqueleto-1.3.4.5
to esqueleto-1.3.5
and changed my myapp.cabal
to depend on esqueleto >= 1.3.5 && < 1.4
.
$ cabal --version
cabal-install version 1.18.0.2
using version 1.18.1.2 of the Cabal library
$ cabal install --upgrade-dependencies
Resolving dependencies...
cabal: Could not resolve dependencies:
trying: esqueleto-1.3.4.5/installed-ac7... (user goal)
next goal: myapp (user goal)
rejecting: myapp-0.0.0 (conflict:
esqueleto==1.3.4.5/installed-ac7..., myapp => esqueleto>=1.3.5 &&
<1.4)
The error looks to me as if cabal is trying to resolve dependencies using the installed version of esqueleto, esqueleto-1.3.4.5/installed-ac7...
Could someone explain how this works?
My intuition was that I should use --upgrade-dependencies
to do this but I also tried --only-dependencies
and --reinstall
.
cabal sandbox delete
,cabal sandbox init
,cabal install --only-dependencies
is how I normally do that sort of thing. With a relatively small set of dependencies it doesn't take very long to re-run the whole thing. Alternatively you could just delete the oldequeleto
folder from your.cabal-sandbox/<platform>-package-db/
folder (I may be imprecise on that folder path, can't remember off the top of my head) – Salted