[Hackage] #677: Error: Couldn't read cabal file "./HDBC/2.2.5/HDBC.cabal"

Hackage cvs-ghc at haskell.org
Wed Jun 2 20:24:13 EDT 2010

#677: Error: Couldn't read cabal file "./HDBC/2.2.5/HDBC.cabal"
  Reporter:  guest               |        Owner:         
      Type:  defect              |       Status:  closed 
  Priority:  normal              |    Milestone:         
 Component:  cabal-install tool  |      Version:
  Severity:  normal              |   Resolution:  fixed  
  Keywords:                      |   Difficulty:  unknown
Ghcversion:  6.10.4              |     Platform:  Linux  
Changes (by duncan):

  * status:  new => closed
  * resolution:  => fixed


 Fixed by editing the HDBC.cabal file for 2.2.5 and 2.2.6 on the server.

 The other workaround would have been to upgrade cabal-install.

 The problem is that the package was using the following syntax:
   Build-Depends: HUnit, QuickCheck (>= 2.0), testpack (>= 2.0)
 But it only declared
 Cabal-Version: >=1.2.3
 When in fact this version range syntax (using parentheses) requires Cabal
 1.8. The second problem is that the QA filters did not detect that this
 package was using the later syntax without properly declaring it.

 That is fixed by this patch
 Wed Jun  2 18:37:03 BST 2010  Duncan Coutts <duncan at haskell.org>
   * Fix QA check on version range syntax to detect use of ()'s
   The problem was that we do the QA check on using the new version range
   syntax after parsing. The new syntax allows ()'s but previously the
   code threw them away in the parser stage. We now retain them in the
   AST and deal with them appropriately. This now allows the QA check to
   be accurate and detect things like "build-depends: base (>= 4.2)".

 The hackage server and new versions of cabal-install will report:
 HDBC-2.2.5 $ cabal check
 The following errors will cause portability problems on other
 * The package uses full version-range expressions in a 'build-depends'
 testpack (>=2.0), QuickCheck (>=2.0). To use this new syntax the package
 to specify at least 'cabal-version: >= 1.8'. Alternatively, if broader
 compatibility is important, then convert to conjunctive normal form, and
 multiple 'build-depends:' lines, one conjunct per line.

 Hackage would reject this package.

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

More information about the cabal-devel mailing list