[Hackage] #224: allow specifying package version constraints to configure
#224: allow specifying package version constraints to configure ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Cabal-1.4 Component: Cabal library | Version: 1.2.3.0 Severity: normal | Keywords: Difficulty: normal | Ghcversion: 6.8.2 Platform: | ----------------------------+----------------------------------------------- Currently, configure considers the version constraints from the `build- depends` of the `.cabal` file. Of the available packages that satisfy those constraints it picks the highest version. This is not always what we want. The user might want to pick a specific version of a dependency (eg for testing or to avoid a known dud). cabal-install certainly wants to specify package versions exactly because it does its own dependency resolution and it may well end up not picking the latest version of an available dependency, eg to ensure consistent versions of a dependent package (see #220). So the dependencies would be specified just as in `build-depends`, for example: {{{ cabal configure --constraint="bytestring == 0.9.0.1" }}} (suggestions for a better flag name welcome) However it must only be for dependencies that the package actually depends on. It should be an error to specify constraints on packages that could never be used by the package we are configuring. The fact that package dependencies can be conditional complicates this slightly. To be precise, we could say that if the package name is not mentioned in the flattened package description then it is an error. If the package named in the constraint happens merely not be use in the selected configuration then it is not an error and the constraint is discarded. So an external package manager (like cabal-install) can control exactly how a package will be configured by setting all the use flags and precisely constraining all the dependencies. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/224> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#224: allow specifying package version constraints to configure ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Cabal-1.4 Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ----------------------------+----------------------------------------------- Comment (by igloo): The flag is doing the same job as the `build-depends` field, so `--build- depends="bytestring == 0.9.0.1"` makes sense to me. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/224#comment:1> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#224: allow specifying package version constraints to configure ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: new Priority: normal | Milestone: Cabal-1.4 Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ----------------------------+----------------------------------------------- Comment (by duncan): Hmm, it's not quite the same since you cannot add extra dependencies. Perhaps that's obvious enough though. -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/224#comment:2> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
#224: allow specifying package version constraints to configure ----------------------------+----------------------------------------------- Reporter: duncan | Owner: Type: enhancement | Status: closed Priority: normal | Milestone: Cabal-1.4 Component: Cabal library | Version: 1.2.3.0 Severity: normal | Resolution: fixed Keywords: | Difficulty: normal Ghcversion: 6.8.2 | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Fixed: {{{ Sun Apr 13 14:18:07 BST 2008 Thomas Schilling <nominolo@gmail.com> * Change dependency resolution algorithm. There were two reasons to do this. Firstly, this formulation makes it easier to add the --constraint command line flag that adds additional constraints on the packages that should be used. Secondly, with the orgininal algorithm it was possible to satisfy the constraint "foo < 1, foo > 2" if we had two versions of package "foo" which each satisfy one constraint. This patch fixes this by requiring the same package to satisfy both constraints (which of course is impossible in this case). Sun Apr 13 19:26:59 BST 2008 Thomas Schilling <nominolo@gmail.com> * Fix #224. We do not yet warn if the user specified a dependency that did not occur in the package (it is just silently ignored.) }}} -- Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/224#comment:3> Hackage <http://haskell.org/cabal/> Hackage: Cabal and related projects
participants (1)
-
Hackage