[Hackage] #725: Distinguish speculative and required build-depends upper bound

Hackage cvs-ghc at haskell.org
Sat Aug 21 13:52:27 EDT 2010

#725: Distinguish speculative and required build-depends upper bound
  Reporter:  ezyang              |        Owner:         
      Type:  enhancement         |       Status:  new    
  Priority:  normal              |    Milestone:         
 Component:  cabal-install tool  |      Version:
  Severity:  normal              |     Keywords:         
Difficulty:  unknown             |   Ghcversion:         
  Platform:                      |  

Comment(by wk):

 For testing whether a GHC bug had been fixed in HEAD, I just went through
 blindly bumping quite a few upper bounds in cabal dependency declarations
 in Agda and the packages it requires, since GHC HEAD of course contains
 versions that not everybody has tested against, yet. (The resulting Agda
 actually works.)

 Abstractly, for each package in the dependencies of a another package,
 there is a dependently-typed function

   status  : \Pi version : Version
           . \powerset (flags version)
           -> {KnownToWork, KnownToBreak, Unknown}

 (assuming no interaction between dependencies).

 This function is only very poorly approximated by the current range sets.

 The current scheme does not distinguish between {{{KnownToBreak}}} and
 {{{UnKnown}}}, and conservatively refuses to build for any version outside
 the declared range.

 This is a real hassle for the use case described above, namely trying out
 new versions of anything very deep down the dependency graph (like the
 packages that come with GHC...).

 If the dependency declaration allowed to distinguish between
 {{{KnownToBreak}}} and {{{UnKnown}}}, cabal could just issue a warning
 when compiling against a version with {{{UnKnown}}} status, and refuse
 (with an improved error message) when only finding {{{KnownToBreak}}}

 By the way, an automatic tool run can only be used to obtain
 {{{KnownToBreak}}}, but (almost) never {{{KnownToWork}}} --- a
 "{{{KnownToCompile}}}" is in general only an {{{UnKnown}}}, and in the
 best case might, via {{{*Check}}}, be turned into {{{KnownToBreak}}}.

 I therefore strongly recommend to require a distinction between
 {{{KnownToBreak}}} and {{{UnKnown}}} in Cabal dependency declarations.


Ticket URL: <http://hackage.haskell.org/trac/hackage/ticket/725#comment:2>
Hackage <http://haskell.org/cabal/>
Hackage: Cabal and related projects

More information about the cabal-devel mailing list