[Haskell-cafe] Again, version conflicting problem with cabal-install

Magicloud Magiclouds magicloud.magiclouds at gmail.com
Fri Feb 3 17:15:48 CET 2012

I think this could be gone with cabal-dev only if A has a new version
or the compiled one that could use C-0.2 or caba-dev could ignore the
version constraint. So it is kind of an "old binary" problem. It could
also be resolved by reinstall A to use C-0.2 with cabal-install.
The problem I met is that, A uses B and C-0.2, and B uses C-0.1. Both
dependencies to C were strict. I had not gotten any B or C installed.
Now I just started to install A. It would fail.
In fact, there was a chance that I just modified B.cabal to use C-0.2
and all things done. But there also was a risk of unable to compile or
even runtime crash.
I am just wanting an option (ignore versions) to take that risk in
develop environment.

2012/2/3 Jason Dagit <dagitj at gmail.com>:
> In my experience the diamond of death is typically because:
>  * You install package A that uses C-0.1
>  * Someone uploads C-0.2 to hackage
>  * Later you 'cabal update', this does not rebuild A to use C-0.2,
> even though it could.
>  * You install package B that uses C, and cabal builds it with C-0.2
>  * Now you want to build D that uses A and B, but A requires C-0.1
> and B requires C-0.2, even though they could be rebuilt to use the
> same C.
> Typically, the constraints on A, B, and D would all accept the same
> version of C.  Except that when they were compiled separately and C
> changed between building A and B, then the compiled versions become
> fixed on C-0.1 and C-0.2.
> It's true that it won't solve it in all cases, but in my experience
> using cabal-dev made the problem go away.
> I hope that clarifies.
> Jason
> On Fri, Feb 3, 2012 at 7:33 AM, Magicloud Magiclouds
> <magicloud.magiclouds at gmail.com> wrote:
>> Well, cabal-dev could not resolve the conflict of "the diamond".
>> Because the conflict is "depending different version at the SAME
>> time".
>> On Fri, Feb 3, 2012 at 9:20 PM, Jason Dagit <dagitj at gmail.com> wrote:
>>> On Thu, Feb 2, 2012 at 9:54 PM, Magicloud Magiclouds
>>> <magicloud.magiclouds at gmail.com> wrote:
>>>> Hello,
>>>>  As I recalled, ghc works in staticly link mode. So after one library
>>>> is compiled, all its build dependencies are useless. Lost, changed,
>>>> wheresoever, it does not matter.
>>>>  Then why the problem of version conflicting exists?
>>> I'm not sure, but for me this problem has gone away by using cabal-dev
>>> to build everything.
>>> Jason
>> --
>> 竹密岂妨流水过
>> 山高哪阻野云飞
>> And for G+, please use magiclouds#gmail.com.


And for G+, please use magiclouds#gmail.com.

More information about the Haskell-Cafe mailing list