[Haskell-cafe] Best approach to avoid dependency hells

Ivan Perez ivanperezdominguez at gmail.com
Sat Dec 8 19:41:57 CET 2012


I started with a clean empty .cabal dir. Then I installed some program
that 1) depended on bytestring 0.10 and 2) I needed to compile another
library or program. That's when the problem started. Without using
cabal-dev, I see no easy way to avoid installing bytestring 0.10 when
I need a program that depends on it.

On 8 December 2012 16:32, Albert Y. C. Lai <trebla at vex.net> wrote:
> On 12-12-08 07:39 AM, Ivan Perez wrote:
>>
>> When you install A, you may not know that you'll need to depend on a
>> lower version of bytestring later on. Cabal will pick the highest
>> version available (0.10 if present). If a program you install later on
>> depends on A (needs  bytestring-0.10) and ghc (needs bytestring-0.9),
>> you'll have a conflict.
>
>
> You are saying, before "cabal install A", you already have both bytestring
> 0.9.2 and 0.10 installed. This is new data not revealed last time. And it is
> important, this is exactly the cause, you have too many bytestring's
> installed.
>
> (You cannot be saying, you start without bytestring 0.10, and "cabal install
> A" brings in bytestring 0.10. You start with GHC, and since it depends on
> bytestring 0.9.2, you start with bytestring 0.9.2 too. And you don't already
> have another bytestring. Then "cabal install A" will stick with bytestring
> 0.9.2.)
>
>
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe



More information about the Haskell-Cafe mailing list