Hackage complains about data-dir

Hi, The new version of Hoogle uses data-dir in the main section of the Cabal file. http://code.haskell.org/hoogle/hoogle.cabal Uploading to hackage gives: 400 Error in upload hoogle-4.0.0.5/hoogle.cabal: Unknown fields: data-dir (line 19) Fields allowed in this section: name, version, cabal-version, build-type, license, license-file, copyright, maintainer, build-depends, stability, homepage, package-url, synopsis, description, category, author, tested-with, data-files, extra-source-files, extra-tmp-files But the documentation says: http://haskell.org/cabal/release/latest/doc/users-guide/authors.html#general... Who is right? Who is wrong? If I'm wrong, what is the fix? Thanks Neil

On Wed, 2008-08-27 at 01:34 +0100, Neil Mitchell wrote:
Hi,
The new version of Hoogle uses data-dir in the main section of the Cabal file. http://code.haskell.org/hoogle/hoogle.cabal
Uploading to hackage gives:
400 Error in upload hoogle-4.0.0.5/hoogle.cabal: Unknown fields: data-dir (line 19) Fields allowed in this section: name, version, cabal-version, build-type, license, license-file, copyright, maintainer, build-depends, stability, homepage, package-url, synopsis, description, category, author, tested-with, data-files, extra-source-files, extra-tmp-files
But the documentation says: http://haskell.org/cabal/release/latest/doc/users-guide/authors.html#general...
Who is right? Who is wrong? If I'm wrong, what is the fix?
I think Cabal is right. Both 1.4 and HEAD parse hoogle.cabal without complaint. I suspect that the fix is to recompile the hackage scripts against a more recent Cabal version (ideally the latest stable 1.4.x release). Duncan

On Wed, Aug 27, 2008 at 03:29:48AM +0100, Duncan Coutts wrote:
I think Cabal is right. Both 1.4 and HEAD parse hoogle.cabal without complaint. I suspect that the fix is to recompile the hackage scripts against a more recent Cabal version (ideally the latest stable 1.4.x release).
I've recompiled them against 1.5.3

On Wed, 2008-08-27 at 10:01 +0100, Ross Paterson wrote:
On Wed, Aug 27, 2008 at 03:29:48AM +0100, Duncan Coutts wrote:
I think Cabal is right. Both 1.4 and HEAD parse hoogle.cabal without complaint. I suspect that the fix is to recompile the hackage scripts against a more recent Cabal version (ideally the latest stable 1.4.x release).
I've recompiled them against 1.5.3
Unfortunately there seems to be a problem with an old .cabal file that does not parse. This means that the pkg-list program fails and the package list html file is empty. Specifically, catch-0.1.1 contains: Other-Modules: [..snip...] Yhc.binarytrees which does not parse as a module name. I'm not sure why it ever did. I should investigate that. Because of that, http://hackage.haskell.org/cgi-bin/hackage-scripts/package/catch-0.1.1 gives: 500 Internal Server Error exit: ExitFailure 1 and running ./packages/bin/pkg-list gives: pkg-list: /srv/www/hackage.haskell.org/public_html/packages/archive/catch/0.1.1/catch.cabal:140: Parse of field 'other-modules' failed. A quick fix would be to just edit that file to correct the syntax error, or remove it from the index and then re-generate the package list. This clearly indicates the danger of making the .cabal file parser stricter, though as I say I'm not aware of recent changes there. I'll have to look into it. Duncan

HI
Unfortunately there seems to be a problem with an old .cabal file that does not parse. This means that the pkg-list program fails and the package list html file is empty.
Specifically, catch-0.1.1 contains: ...
A quick fix would be to just edit that file to correct the syntax error, or remove it from the index and then re-generate the package list.
Just remove the package (its mine), I don't think it will build anyway (and I guess it probably never did :-( ). Thanks Neil

On Wed, 2008-08-27 at 10:54 +0100, Neil Mitchell wrote:
HI
Unfortunately there seems to be a problem with an old .cabal file that does not parse. This means that the pkg-list program fails and the package list html file is empty.
Specifically, catch-0.1.1 contains: ...
A quick fix would be to just edit that file to correct the syntax error, or remove it from the index and then re-generate the package list.
Just remove the package (its mine), I don't think it will build anyway (and I guess it probably never did :-( ).
Unfortunately I do not have the permissions to do so, but I'll see if I can find someone who does. Duncan

Hi
400 Error in upload hoogle-4.0.0.5/hoogle.cabal: Unknown fields: data-dir (line 19) Fields allowed in this section: name, version, cabal-version, build-type, license, license-file, copyright, maintainer, build-depends, stability, homepage, package-url, synopsis, description, category, author, tested-with, data-files, extra-source-files, extra-tmp-files
I think Cabal is right. Both 1.4 and HEAD parse hoogle.cabal without complaint. I suspect that the fix is to recompile the hackage scripts against a more recent Cabal version (ideally the latest stable 1.4.x release).
With the current situation I have just uploaded Hoogle, which worked, even thought I couldn't check the package. The Hoogle package displays fine: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hoogle-4.0.0.5 But now the main page seems to be down: http://hackage.haskell.org/packages/archive/pkg-list.html - is that my fault? Thanks Neil

On Wed, 2008-08-27 at 10:02 +0100, Neil Mitchell wrote:
Hi
400 Error in upload hoogle-4.0.0.5/hoogle.cabal: Unknown fields: data-dir (line 19) Fields allowed in this section: name, version, cabal-version, build-type, license, license-file, copyright, maintainer, build-depends, stability, homepage, package-url, synopsis, description, category, author, tested-with, data-files, extra-source-files, extra-tmp-files
I think Cabal is right. Both 1.4 and HEAD parse hoogle.cabal without complaint. I suspect that the fix is to recompile the hackage scripts against a more recent Cabal version (ideally the latest stable 1.4.x release).
With the current situation I have just uploaded Hoogle, which worked, even thought I couldn't check the package.
The Hoogle package displays fine: http://hackage.haskell.org/cgi-bin/hackage-scripts/package/hoogle-4.0.0.5
But now the main page seems to be down: http://hackage.haskell.org/packages/archive/pkg-list.html - is that my fault?
No and yes. :-) No of course it's not your fault. The scripts are suppose to validate everything and not fall over. So it'd never be your fault. That said, it's actually a syntax error in catch-0.1.1.cabal which for some reason slipped through the upload checks but with the scripts re-compiled against a newer Cabal now fails with a parse error. That did not get triggered until the following upload when the package index page got re-generated (which involves reading every .cabal file in the archive). Duncan
participants (3)
-
Duncan Coutts
-
Neil Mitchell
-
Ross Paterson