[Hackage] #369: Version range printing is inconsistent

#369: Version range printing is inconsistent ----------------------------+----------------------------------------------- Reporter: nominolo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: minor | Keywords: Difficulty: normal | Ghcversion: 6.9 Platform: | ----------------------------+----------------------------------------------- When configuring a package with the following build-depends: {{{ build-depends: base >= 4 && < 5, ghc-paths >= 0.1 && < 0.2, ghc >= 6.10 && < 6.12, ghc-syb >= 0.1 && < 0.2, directory >= 1.0 && < 1.1 }}} configuring fails with: {{{ Setup: At least the following dependencies are missing: ghc-paths ==0.1.* && ==0.1.*, ghc-syb ==0.1.* }}} Note the superfluous {{{ && ==0.1.*}}} in the first missing dependency. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/369 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#369: Version range printing is inconsistent
----------------------------+-----------------------------------------------
Reporter: nominolo | Owner:
Type: defect | Status: new
Priority: normal | Milestone:
Component: Cabal library | Version: HEAD
Severity: minor | Resolution:
Keywords: | Difficulty: normal
Ghcversion: 6.9 | Platform:
----------------------------+-----------------------------------------------
Comment (by nominolo):
For a full test case, try these steps:
{{{
git clone git://github.com/nominolo/scion.git
cd scion
git checkout 60a8f622af56c6e568a23ba49cae0c3e6edfbbd7 # just to make sure

#369: Version ranges should be simplified before printing ----------------------------+----------------------------------------------- Reporter: nominolo | Owner: Type: defect | Status: new Priority: normal | Milestone: Component: Cabal library | Version: HEAD Severity: minor | Resolution: Keywords: | Difficulty: normal Ghcversion: 6.9 | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * summary: Version range printing is inconsistent => Version ranges should be simplified before printing Comment: If we look at `scion.cabal` we find (simplified): {{{ executable test build-depends: base >= 4 && < 5, ghc-paths >= 0.1 && < 0.2, ghc >= 6.10 && < 6.12 executable test_get_imports build-depends: base >= 4 && < 5, ghc-paths >= 0.1 && < 0.2, ghc >= 6.10 && < 6.12, ghc-syb >= 0.1 && < 0.2, directory >= 1.0 && < 1.1 }}} Note that `ghc-paths >= 0.1 && < 0.2` is mentioned in both executable stanzas. The dependencies of the package as a whole are the combination of the dependencies of each stanza. It may be sensible for complexity of presentation purposes to simplify version ranges. We could add a function {{{ VersionRange.simplify :: VersionRange -> VersionRange }}} which should satisfy the property {{{ forall vr v. eval (simplify vr) v == eval vr v where eval = flip withinRange }}} -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/369#comment:2 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#369: Version ranges should be simplified before printing ----------------------------+----------------------------------------------- Reporter: nominolo | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.8 Component: Cabal library | Version: HEAD Severity: minor | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * difficulty: normal => very easy (<1 hour) * ghcversion: 6.9 => * milestone: => Cabal-1.8 Comment: Sometimes these are quite entertainingly long. For example with happstack- server: {{{ cabal: Unresolved dependencies: base >=3&&<4, base >=3&&<4, base >=3&&<4, base >=3&&<4, base >=3&&<4, base >=3&&<4, base >=3&&<4, base >=3&&<4, base >=3&&<4 }}} No, really. :-) With the new version intervals adt we've got a function: {{{ simplifyVersionRange :: VersionRange -> VersionRange }}} which should make this stuff easy. Just take the intersection of version constraints per-package and simplify and print. A slightly more sophisticated approach would be to check that taking intersections does not end up with an empty range, ie that the constraints are necessarily unsatisfiable irrespective of potential available packages. The intervals adt also makes this check easy and efficient. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/369#comment:3 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#369: Version ranges should be simplified before printing ----------------------------+----------------------------------------------- Reporter: nominolo | Owner: Type: defect | Status: new Priority: normal | Milestone: Cabal-1.8 Component: Cabal library | Version: HEAD Severity: minor | Resolution: Keywords: | Difficulty: very easy (<1 hour) Ghcversion: | Platform: ----------------------------+----------------------------------------------- Comment (by fasta): dcoutts asked me to put this here: It requires vec -any && -any There is no available version of vec that satisfies -any && -any Related is a case-sensitivity issue where one tries cabal install vec on the CLI, sees that it works and expects that adding vec to the dependencies also works (which it doesn't). -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/369#comment:4 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects

#369: Version ranges should be simplified before printing ----------------------------+----------------------------------------------- Reporter: nominolo | Owner: Type: defect | Status: closed Priority: normal | Milestone: Cabal-1.8 Component: Cabal library | Version: HEAD Severity: minor | Resolution: fixed Keywords: | Difficulty: very easy (<1 hour) Ghcversion: | Platform: ----------------------------+----------------------------------------------- Changes (by duncan): * status: new => closed * resolution: => fixed Comment: Should now be fixed in Cabal and in cabal-install. -- Ticket URL: http://hackage.haskell.org/trac/hackage/ticket/369#comment:5 Hackage http://haskell.org/cabal/ Hackage: Cabal and related projects
participants (1)
-
Hackage