[Hackage] #485: preference on base version should only be applied for open constraints
#485: preference on base version should only be applied for open constraints ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Keywords: Difficulty: unknown | Ghcversion: Platform: | ---------------------------------+------------------------------------------ Currently we apply the preference on the base version. That means that if you have base 3 and 4 available then for dependencies like: {{{ build-depends: base >= 2 }}} or {{{ build-depends: base >= 3 && < 5 }}} Then we end up picking base 3. That makes perfect sense in the first case. In the first case the developer clearly did not think about base 4. However in the second case they clearly have thought about it and yet we end up picking base 3. On balance it is probably better to pick base 4 in the second case even though both are allowed. One suggestion for how to handle soft constraints on the version of base is to say that we only apply the preference if the version is not bounded above. If it is bounded above then we use no preference and end up picking the highest version available. This policy cannot be expressed in the simple preferred versions syntax. It's probably ok to hard code it for base for now. This will require generalising the interface to the constraint solver to supply preferences in a slightly different form. It may need to be as a function from a list of possible versions to the selected version. The function would also be supplied with the package it's for, the dependency and the list of installed versions since it may want to take any of these into account and it is needed to express the above policy. This is related to the splitting of preferences into real preferences and hacks (see #483). -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/485> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#485: preference on base version should only be applied for open constraints ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: cabal-install-0.8 Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * milestone: => cabal-install-0.8 -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/485#comment:1> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#485: preference on base version should only be applied for open constraints ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: cabal-install-0.6 Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Resolution: Keywords: | Difficulty: unknown Ghcversion: | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * milestone: cabal-install-0.8 => cabal-install-0.6 Comment: Changed my mind. I think we can and should do this in a 0.6.x point release, though not the immediate one. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/485#comment:2> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#485: preference on base version should only be applied for open constraints ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: new Priority: high | Milestone: cabal-install-0.6 Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Resolution: Keywords: | Difficulty: easy (<4 hours) Ghcversion: | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * priority: normal => high * difficulty: unknown => easy (<4 hours) Comment: {{{ Wed Jun 3 11:16:23 BST 2009 Duncan Coutts <duncan@haskell.org> * Only apply preferences to base if its version is unbounded above Fixes ticket #485. This means that for constraints like: build-depends: base >= 3 && < 5 we will pick version 4. However we will continue to apply the version 3 preference for things like: build-depends: base >= 3 Where there is no upper bound on the version. Note that we now also ignore preferences for base given on the command line. We should implement #483 to split prefs from shims. }}} Needs testing and then back-porting to the cabal-install-0.6.x series. In particular it'll need a compat copy of the newVersionIntervals type that's in the Cabal lib now as of version 1.7.x. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/485#comment:3> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#485: preference on base version should only be applied for open constraints ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: new Priority: high | Milestone: cabal-install-0.6 Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Resolution: Keywords: | Difficulty: easy (<4 hours) Ghcversion: | Platform: ---------------------------------+------------------------------------------ Comment (by duncan): Now in the 0.6.x stable branch {{{ Fri Jun 5 02:04:36 BST 2009 Duncan Coutts <duncan@haskell.org> * Only apply preferences to base if its version is unbounded above This is a backport to the cabal-install 0.6.x series. It relies on the VersionIntervals ADT which was added in Cabal-1.7.x, so that also had to be backported. }}} Could still do with some independent testing. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/485#comment:4> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#485: preference on base version should only be applied for open constraints ---------------------------------+------------------------------------------ Reporter: duncan | Owner: Type: enhancement | Status: closed Priority: high | Milestone: cabal-install-0.6 Component: cabal-install tool | Version: 1.6.0.1 Severity: normal | Resolution: fixed Keywords: | Difficulty: easy (<4 hours) Ghcversion: | Platform: ---------------------------------+------------------------------------------ Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Included in the 0.6.4 and 0.8.0 releases. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/485#comment:5> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
participants (1)
-
Hackage