[Haskell-cafe] What to do when cabal dependencies are not your friend.

Duncan Coutts duncan.coutts at worc.ox.ac.uk
Fri May 1 19:01:08 EDT 2009

On Fri, 2009-05-01 at 16:55 -0500, Thomas Hartman wrote:
> I did a little write-up on an annoyance I frequently have when
> developing patch-tag, a happs application that has a lot of
> dependencies.
> Basically, on a virgin linux environment with the same cabal and ghc
> version as before, a cabal install that had previously worked, didn't
> work anymore.
> I assume this is because of changes on hackage that didn't affect my
> previous version because I had not done cabal update for a while.
> Luckly I had a working environment on a test box elsewehre so...
> http://blog.patch-tag.com/2009/05/01/what-to-do-when-cabal-install-works-in-one-environment-but-not-another/

The problem is that the dependencies you specified were too lax, so in a
different environment the deps said it was ok to use those different
versions when really it wasn't ok.

In your blog post you solve it by specifying exact dependencies. This
works but is often too strict.

Working out what the deps should be exactly isn't trivial. You need to
know about the versioning policy of your dependencies. With more
packages following the recommended package versioning policy this will
become easier for you to do (indeed it'll become possible for the tools
to give you sensible suggestions).



More information about the Haskell-Cafe mailing list