<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span><br></span></div><div><span>Aha, I'd missed that; thanks - I'll try the fix after going pumpkin hunting with the kids!</span></div><div><span><br></span></div><div><span>Doug</span></div><div><span><br></span></div><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><div style="font-size: 12pt; font-family: 'times new roman', 'new york', times, serif; "><font size="2" face="Arial"><hr size="1"><b><span style="font-weight:bold;">From:</span></b> JP Moresmau <jpmoresmau@gmail.com><br><b><span style="font-weight: bold;">To:</span></b> Doug Burke <doug_j_burke@yahoo.com><br><b><span style="font-weight: bold;">Cc:</span></b> "Haskell-Cafe@haskell.org" <Haskell-Cafe@haskell.org><br><b><span style="font-weight: bold;">Sent:</span></b> Saturday, October 22, 2011 1:15
PM<br><b><span style="font-weight: bold;">Subject:</span></b> Re: [Haskell-cafe] hackage and cabal test support: why does it claim I have no type field when I do?<br></font><br>
Maybe the issue is that the test modules are missing from the<br>distribution file, which is a known bug.<br>(http://hackage.haskell.org/trac/hackage/ticket/792)<br><br>JP<br><br>On Sat, Oct 22, 2011 at 7:04 PM, Doug Burke <<a ymailto="mailto:doug_j_burke@yahoo.com" href="mailto:doug_j_burke@yahoo.com">doug_j_burke@yahoo.com</a>> wrote:<br>><br>> I've just been updating my code to take advantage of the test support in<br>> Cabal. I have it so that<br>> cabal configure --enable-tests<br>> cabal build<br>> cabal test<br>> works. However, when I try to upload to hackage, I get<br>> cabal upload -c dist/swish-0.6.2.0.tar.gz<br>> Checking dist/swish-0.6.2.0.tar.gz...<br>> Error: dist/swish-0.6.2.0.tar.gz: 400 Error in upload<br>> 400 Error in upload<br>> line 271: The 'type' field is required for test suites. The available test<br>> types are:
exitcode-stdio-1.0<br>> and here are the relevant lines from the cabal file:<br>> 267 if flag(developer)<br>> 268 ghc-options: -Werror<br>> 269 ghc-prof-options: -auto-all<br>> 270<br>> 271 Test-Suite test-builtinmap<br>> 272 type: exitcode-stdio-1.0<br>> 273 Hs-Source-Dirs: tests/ src/<br>> 274 Main-Is: BuiltInMapTest.hs<br>> 275 Other-Modules: TestHelpers<br>> 276<br>> As you can see, there's a type field for the Test-Suite and I don't see any<br>> obvious discrepancy with the information from the user's guide<br>> (<a href="http://www.haskell.org/cabal/users-guide/#test-suites"
target="_blank">http://www.haskell.org/cabal/users-guide/#test-suites</a>). I also have<br>> Cabal-Version: >= 1.9.2<br>><br>> in the file; the full version can be found at<br>> <a href="https://bitbucket.org/doug_burke/swish/src/4545220d88e2/swish.cabal#cl-271" target="_blank">https://bitbucket.org/doug_burke/swish/src/4545220d88e2/swish.cabal#cl-271</a><br>><br>> What am I doing wrong?<br>> Thanks in advance,<br>> Doug<br>><br>> _______________________________________________<br>> Haskell-Cafe mailing list<br>> <a ymailto="mailto:Haskell-Cafe@haskell.org" href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>> http://www.haskell.org/mailman/listinfo/haskell-cafe<br>><br>><br><br><br><br>-- <br>JP Moresmau<br>http://jpmoresmau.blogspot.com/<br><br><br></div></div></div></body></html>