Problem with cabal-install where package requires* mutually exclusive versions of another package

I am trying install a package using cabal-install however the package requies an older version of QuickCheck and one of the required packages requires the latest version: $ cabal fetch Reactive Resolving dependencies... cabal.exe: cannot configure Stream-0.3.1. It requires QuickCheck >=2.0 For the dependency on QuickCheck >=2.0 there are these packages: QuickCheck-2.1 and QuickCheck-2.1.0.1. However none of them are available. QuickCheck-2.1 was excluded because checkers-0.1.3 requires QuickCheck <2.0 QuickCheck-2.1 was excluded because reactive-0.10.5 requires QuickCheck <2.0 QuickCheck-2.1.0.1 was excluded because checkers-0.1.3 requires QuickCheck <2.0 QuickCheck-2.1.0.1 was excluded because reactive-0.10.5 requires QuickCheck <2.0 How can I get around this? I could work around this and install the packages individually. Can I have two versions of a package installed (ie QuickCheck) and will everything get resolved correctly? Mark

On Sat, 2009-03-14 at 19:10 +1100, Mark Wassell wrote:
I am trying install a package using cabal-install however the package requies an older version of QuickCheck and one of the required packages requires the latest version:
$ cabal fetch Reactive
Resolving dependencies... cabal.exe: cannot configure Stream-0.3.1. It requires QuickCheck >=2.0 For the dependency on QuickCheck >=2.0 there are these packages: QuickCheck-2.1 and QuickCheck-2.1.0.1. However none of them are available. QuickCheck-2.1 was excluded because checkers-0.1.3 requires QuickCheck <2.0 QuickCheck-2.1 was excluded because reactive-0.10.5 requires QuickCheck <2.0 QuickCheck-2.1.0.1 was excluded because checkers-0.1.3 requires QuickCheck <2.0 QuickCheck-2.1.0.1 was excluded because reactive-0.10.5 requires QuickCheck <2.0
The cabal-install solver does not have enough information to know that it will not break to use multiple versions of QuickCheck so it's looking for a solution involving only one version. It cannot find one of course. A medium term solution here should involve letting packages specify that some of their dependencies are private, ie nothing is re-exported and thus there is no danger of clashes.
How can I get around this? I could work around this and install the packages individually.
Yes. You'll just have to avoid using "cabal install" because that invokes the solver. You can either go back to the runghc Setup method or use the (undocumented) cabal install --only flag.
Can I have two versions of a package installed (ie QuickCheck) and will everything get resolved correctly?
Should do. It will warn you that it's highly likely to break, but if you're confident that it will not then press on. Duncan

On Sat, Mar 14, 2009 at 09:40, Duncan Coutts
A medium term solution here should involve letting packages specify that some of their dependencies are private, ie nothing is re-exported and thus there is no danger of clashes.
Is the long term solution to automatically detect what is exported? It seems feasible, since I think that is a totally static property, no? Denis

On Sat, 2009-03-14 at 10:02 -0600, Denis Bueno wrote:
On Sat, Mar 14, 2009 at 09:40, Duncan Coutts
wrote: A medium term solution here should involve letting packages specify that some of their dependencies are private, ie nothing is re-exported and thus there is no danger of clashes.
Is the long term solution to automatically detect what is exported? It seems feasible, since I think that is a totally static property, no?
Right I think the long term solution is something that involves identifying packages as functors/signatures and doing subtyping and unification to check if packages can be composed. Duncan
participants (3)
-
Denis Bueno
-
Duncan Coutts
-
Mark Wassell