[Hackage] #762: cabal-install failed to resolve dependencies

#762: cabal-install failed to resolve dependencies ---------------------------------+------------------------------------------ Reporter: james_m_chapman | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ I tried to update my installation of the development version of Agda. I did a darcs pull from the repo (darcs get --lazy http://code.haskell.org/Agda) and then tried to build it: $ darcs pull $ cabal update $ cabal clean $ cabal install I get the following error: "Resolving dependencies... cabal: cannot configure haskeline-0.6.2.2. It requires mtl ==1.1.* For the dependency on mtl ==1.1.* there are these packages: mtl-1.1.0.0, mtl-1.1.0.1, mtl-1.1.0.2 and mtl-1.1.1.0. However none of them are available. mtl-1.1.0.0 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.0.1 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.0.2 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.1.0 was excluded because Agda-2.2.9 requires mtl ==2.0.*" Agda's .cabal file is here http://code.haskell.org/Agda/Agda.cabal and contains the build-depends line haskeline >= 0.3 && < 0.7 The solution is to upgrade haskeline to the latest version by running: $ cabal install haskeline Should cabal-install have been able to work this out itself? -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/762 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#762: cabal-install failed to resolve dependencies ---------------------------------+------------------------------------------ Reporter: james_m_chapman | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Changes (by james_m_chapman): * ghcversion: => 6.12.1 -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/762#comment:1 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#762: cabal-install failed to resolve dependencies ---------------------------------+------------------------------------------ Reporter: james_m_chapman | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Changes (by james_m_chapman): * cc: james@… (added) -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/762#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#762: cabal-install failed to resolve dependencies ---------------------------------+------------------------------------------ Reporter: james_m_chapman | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Old description:
I tried to update my installation of the development version of Agda.
I did a darcs pull from the repo (darcs get --lazy http://code.haskell.org/Agda) and then tried to build it:
$ darcs pull $ cabal update $ cabal clean $ cabal install
I get the following error:
"Resolving dependencies... cabal: cannot configure haskeline-0.6.2.2. It requires mtl ==1.1.* For the dependency on mtl ==1.1.* there are these packages: mtl-1.1.0.0, mtl-1.1.0.1, mtl-1.1.0.2 and mtl-1.1.1.0. However none of them are available. mtl-1.1.0.0 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.0.1 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.0.2 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.1.0 was excluded because Agda-2.2.9 requires mtl ==2.0.*"
Agda's .cabal file is here
http://code.haskell.org/Agda/Agda.cabal
and contains the build-depends line
haskeline >= 0.3 && < 0.7
The solution is to upgrade haskeline to the latest version by running:
$ cabal install haskeline
Should cabal-install have been able to work this out itself?
New description: I tried to update my installation of the development version of Agda. I did a darcs pull from the repo (darcs get --lazy http://code.haskell.org/Agda) and then tried to build it: {{{ $ darcs pull $ cabal update $ cabal clean $ cabal install }}} I get the following error: {{{ Resolving dependencies... cabal: cannot configure haskeline-0.6.2.2. It requires mtl ==1.1.* For the dependency on mtl ==1.1.* there are these packages: mtl-1.1.0.0, mtl-1.1.0.1, mtl-1.1.0.2 and mtl-1.1.1.0. However none of them are available. mtl-1.1.0.0 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.0.1 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.0.2 was excluded because Agda-2.2.9 requires mtl ==2.0.* mtl-1.1.1.0 was excluded because Agda-2.2.9 requires mtl ==2.0.*" }}} Agda's .cabal file is here {{{ http://code.haskell.org/Agda/Agda.cabal }}} and contains the build-depends line {{{ haskeline >= 0.3 && < 0.7 }}} The solution is to upgrade haskeline to the latest version by running: {{{ $ cabal install haskeline }}} Should cabal-install have been able to work this out itself? -- Comment(by duncan): In principle, a sufficiently good constraint solver would indeed work that out. The current solver deliberately does no backtracking so it cannot undo guesses. So when it guesses wrong it can cause it to find no solution. A better solver would find solutions more often without significantly increasing runtime. The current solver will also get it if you give it some hints like: {{{ cabal install --constraint='haskeline >= 0.6.3' }}} Specifically, the problem is that it guesses the version of haskeline before it finds out about the mtl constraint. By default when it has to guess, it tries using the installed version if there is one, or the latest version if there is none installed. By adding the user-specified constraint, it changes the order of choices. A smarter solver would take advantage of the fact that agda specifies mtl-2, and use that to exclude options like old versions of haskeline that require mtl-1. This kind of bottom-up constraint propagation is on the TODO list, see ticket #420. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/762#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#762: cabal-install failed to resolve dependencies ---------------------------------+------------------------------------------ Reporter: james_m_chapman | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Comment(by elga): * [http://www.releve-identite-operateur.fr/rio-simyo.html simyo] -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/762#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#762: cabal-install failed to resolve dependencies ---------------------------------+------------------------------------------ Reporter: james_m_chapman | Owner: Type: defect | Status: new Priority: normal | Milestone: cabal-install-0.14 Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: 6.12.1 Platform: | ---------------------------------+------------------------------------------ Changes (by kosmikus): * milestone: => cabal-install-0.14 Comment: This should be fixed by the new solver, and might even work with the refined topdown solver in the current Cabal versions. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/762#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#762: cabal-install failed to resolve dependencies ---------------------------------+------------------------------------------ Reporter: james_m_chapman | Owner: Type: defect | Status: closed Priority: normal | Milestone: cabal-install-0.14 Component: cabal-install tool | Version: 1.8.0.2 Severity: normal | Resolution: fixed Keywords: | Difficulty: unknown Ghcversion: 6.12.1 | Platform: ---------------------------------+------------------------------------------ Changes (by kosmikus): * status: new => closed * resolution: => fixed Comment: Unfortunately, I didn't manage to reproduce this problem anymore. But I'm relatively confident this should work better now. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/762#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage