[Haskell-cafe] hackage and cabal test support: why does it claim I have no type field when I do?

Doug Burke doug_j_burke at yahoo.com
Sat Oct 22 19:04:57 CEST 2011



I've just been updating my code to take advantage of the test support in Cabal. I have it so that 

  cabal configure --enable-tests
  cabal build
  cabal test

works. However, when I try to upload to hackage, I get 

  cabal upload -c dist/swish-0.6.2.0.tar.gz
  Checking dist/swish-0.6.2.0.tar.gz...
  Error: dist/swish-0.6.2.0.tar.gz: 400 Error in upload
  400 Error in upload
  line 271: The 'type' field is required for test suites. The available test
  types are: exitcode-stdio-1.0 

and here are the relevant lines from the cabal file:

   267     if flag(developer)
   268        ghc-options: -Werror
   269        ghc-prof-options: -auto-all
   270  
   271  Test-Suite test-builtinmap
   272     type:       exitcode-stdio-1.0
   273     Hs-Source-Dirs: tests/ src/
   274     Main-Is:    BuiltInMapTest.hs
   275     Other-Modules:  TestHelpers
   276  

As you can see, there's a type field for the Test-Suite and I don't see any obvious discrepancy with the information from the user's guide (http://www.haskell.org/cabal/users-guide/#test-suites). I also have

  Cabal-Version:      >= 1.9.2


in the file; the full version can be found at

https://bitbucket.org/doug_burke/swish/src/4545220d88e2/swish.cabal#cl-271


What am I doing wrong?

Thanks in advance,
Doug
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111022/22cdfc63/attachment.htm>


More information about the Haskell-Cafe mailing list