Ticket #490 (closed defect: fixed)
cabal unpack gives bad error message for unsatisfiable constraints
|Reported by:||duncan||Owned by:|
|Cc:||Difficulty:||very easy (<1 hour)|
The simple use case works fine:
$ cabal unpack HaXml Downloading HaXml-1.13.3... Unpacking HaXml-1.13.3...
But we also allow constraints and that does not necessarily work:
$ cabal unpack HaXml-1.19.6 cabal: List.maximumBy: empty list
The problem is that the index does not contain HaXml-1.19.6. After a cabal update it is fine. In general this would happen for any user-supplied version constraint that turns out to be unsatisfiable.
The function resolvePackages in Distribution.Client.Unpack does not consider the possibility that a dependency may be unsatisfiable.