[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:19:24 CEST 2011

Aha, I'd missed that; thanks - I'll try the fix after going pumpkin hunting with the kids!


From: JP Moresmau <jpmoresmau at gmail.com>
To: Doug Burke <doug_j_burke at yahoo.com>
Cc: "Haskell-Cafe at haskell.org" <Haskell-Cafe at haskell.org>
Sent: Saturday, October 22, 2011 1:15 PM
Subject: Re: [Haskell-cafe] hackage and cabal test support: why does it claim I have no type field when I do?

Maybe the issue is that the test modules are missing from the
distribution file, which is a known bug.


On Sat, Oct 22, 2011 at 7:04 PM, Doug Burke <doug_j_burke at yahoo.com> wrote:
> 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-
>   Checking dist/swish-
>   Error: dist/swish- 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
> _______________________________________________
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
> http://www.haskell.org/mailman/listinfo/haskell-cafe

JP Moresmau
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20111022/dc0f12f6/attachment.htm>

More information about the Haskell-Cafe mailing list