Cabal should use the minimum version that satisfies the dependencies, not the maximum

Einar Karttunen ekarttun at
Mon Aug 8 03:07:51 EDT 2005

On 08.08 01:45, Brian Smith wrote:
> Let's say we have multiple versions of a package installed:
>     a-1.0
>     a-1.0.1
>     a-1.1
>     a-2.0
> and that we have the following Build-Depends in a package description:
>     Build-Depends: a >= 1.0
> Now, when I configure, Cabal will choose a-2.0 as the package to build
> with. However, it makes more sense to choose a-1.0 by default instead.

This behaviour would make upgrading packages quite painful. Lets suppose
we have packages A, B and C, with both A and B depending on C. If we have
A, B and C 1.0 installed and wish to upgrade to C-2.0 we can currently
install C-2.0 and reinstall A and B (they automatically depend on the new C)
and later remove A. With using the minimum version we would need to 
suply something like --enable-max-library-versions when reinstalling packages
or alternatively first remove A making the installation broken until new
A, B and C have been installed.

I think that most often people have old versions of a package because
some particular package depends on that and they want to use the new version
when possible.

- Einar Karttunen

More information about the Libraries mailing list