
Hello, Could someone explain why some packages in Hackage have links to the haddock for exposed modules and others don't? Also some seem to have links to a "buildlog", but others don't. What's going on? Thanks -- Adrian Hey

On Jan 21, 2008 2:29 PM, Thomas Schilling
On Mon, 2008-01-21 at 21:09 +0000, Adrian Hey wrote:
Hello,
Could someone explain why some packages in Hackage have links to the haddock for exposed modules and others don't?
I think that's due to Haddock errors.
Would it be possible to get better reporting of errors that prevent Haddock docs from being built? Some packages without docs list a build log, but many others don't. For example, the editline package was posted about 5-6 days ago, and still doesn't have haddock links (probably because libedit isn't installed on the hackage server). It would be nice to see the build errors, if any, so that I could request for any missing libraries to be installed. Thanks, -Judah

On Mon, 2008-01-21 at 14:57 -0800, Judah Jacobson wrote:
On Jan 21, 2008 2:29 PM, Thomas Schilling
wrote: On Mon, 2008-01-21 at 21:09 +0000, Adrian Hey wrote:
Hello,
Could someone explain why some packages in Hackage have links to the haddock for exposed modules and others don't?
I think that's due to Haddock errors.
Would it be possible to get better reporting of errors that prevent Haddock docs from being built? Some packages without docs list a build log, but many others don't.
For example, the editline package was posted about 5-6 days ago, and still doesn't have haddock links (probably because libedit isn't installed on the hackage server). It would be nice to see the build errors, if any, so that I could request for any missing libraries to be installed.
FWIW, using $ cabal install -v3 editline I get [...lots] configure: error: editline not found, so this package cannot be built I guess we'd have the same error on Hackage.

On Mon, 2008-01-21 at 14:57 -0800, Judah Jacobson wrote:
On Jan 21, 2008 2:29 PM, Thomas Schilling
wrote: On Mon, 2008-01-21 at 21:09 +0000, Adrian Hey wrote:
Hello,
Could someone explain why some packages in Hackage have links to the haddock for exposed modules and others don't?
I think that's due to Haddock errors.
Would it be possible to get better reporting of errors that prevent Haddock docs from being built? Some packages without docs list a build log, but many others don't.
We're trying to do even better than that: http://hackage.haskell.org/trac/hackage/ticket/184 You're most welcome to help out. There are several sub-tasks to this. In the medium term, expecting the hackage server to be able to build each package is unrealistic. It will never have all the system libs and eventually will probably not have the cpu time to even build them all. The solution is to have separate building and have hackage just report the results. Duncan

On Jan 21, 2008 4:53 PM, Duncan Coutts
On Mon, 2008-01-21 at 14:57 -0800, Judah Jacobson wrote:
Would it be possible to get better reporting of errors that prevent Haddock docs from being built? Some packages without docs list a build log, but many others don't.
[...]
In the medium term, expecting the hackage server to be able to build each package is unrealistic. It will never have all the system libs and eventually will probably not have the cpu time to even build them all. The solution is to have separate building and have hackage just report the results.
That makes sense; but if the packages aren't built on the server, will we still be able to display the Haddock docs? Maybe there should be some way for the person uploading a package to also upload its Haddock files? Thanks, -Judah

Judah Jacobson wrote:
That makes sense; but if the packages aren't built on the server, will we still be able to display the Haddock docs?
Presumably it doesn't have to do a full build just to generate the Haddock, which is the immediate problem. Users can't tell much about a package without this. Is it just errors being thrown by Haddock that's stopping this? If so, it seems to me that obvious solution is just to link to whatever html haddock generated, regardless. Regards -- Adrian Hey

On Tue, 2008-01-22 at 09:32 +0000, Adrian Hey wrote:
Judah Jacobson wrote:
That makes sense; but if the packages aren't built on the server, will we still be able to display the Haddock docs?
Presumably it doesn't have to do a full build just to generate the Haddock, which is the immediate problem. Users can't tell much about a package without this.
That's right. All it needs is to be able to configure.
Is it just errors being thrown by Haddock that's stopping this? If so, it seems to me that obvious solution is just to link to whatever html haddock generated, regardless.
Haddock generates nothing if there are parse errors in the markup. Duncan

Duncan Coutts wrote:
On Tue, 2008-01-22 at 09:32 +0000, Adrian Hey wrote:
Judah Jacobson wrote:
That makes sense; but if the packages aren't built on the server, will we still be able to display the Haddock docs? Presumably it doesn't have to do a full build just to generate the Haddock, which is the immediate problem. Users can't tell much about a package without this.
That's right. All it needs is to be able to configure.
So is that what's going wrong with packages that aren't haddocked? I guess if some dependencies are missing this might be the case. Maybe a cabal mod would be possible to still enable building of haddock. or just run haddock some other way? or just upload haddock separately, as Judah suggests? (not so keen on this option as it may contain even more broken links). I'm just trying to find out if lack of haddock is deliberate policy, or a problem with hackage, or cabal, or uploaded packages or what, and what (if anything) package authors can do to get their packages properly documented in hackage.
Is it just errors being thrown by Haddock that's stopping this? If so, it seems to me that obvious solution is just to link to whatever html haddock generated, regardless.
Haddock generates nothing if there are parse errors in the markup.
But in 99% of cases people will have checked this before they upload, so I don't think this can be what's going wrong. Thanks -- Adrian Hey

On Tue, Jan 22, 2008 at 11:04:31AM +0000, Adrian Hey wrote:
So is that what's going wrong with packages that aren't haddocked?
Often they just haven't been processed yet. It's not yet a fully automated process, though that is the aim. There's an extra delay at the moment because I'm switching it to the new version of haddock, and have struck a few glitches that I'll post about shortly. (COrdering and AvlTree are fine, though.)
I guess if some dependencies are missing this might be the case.
At present Cabal has no way to specify a dependency on a foreign library, so that could cause a build failure, but the docs can still be generated. However if a package can't be built, it can't be installed, and any packages that depend on it cannot be configured, so no docs for those.
I'm just trying to find out if lack of haddock is deliberate policy, or a problem with hackage, or cabal, or uploaded packages or what, and what (if anything) package authors can do to get their packages properly documented in hackage.
No deliberate policy, and nothing you should or can do. The docs will appear shortly.
But in 99% of cases people will have checked this before they upload, so I don't think this can be what's going wrong.
You'd think people would check this before releasing, but 99% is an overestimate.

On Mon, Jan 21, 2008 at 05:47:18PM -0800, Judah Jacobson wrote:
On Jan 21, 2008 4:53 PM, Duncan Coutts
wrote: In the medium term, expecting the hackage server to be able to build each package is unrealistic. It will never have all the system libs and eventually will probably not have the cpu time to even build them all. The solution is to have separate building and have hackage just report the results.
That makes sense; but if the packages aren't built on the server, will we still be able to display the Haddock docs? Maybe there should be some way for the person uploading a package to also upload its Haddock files?
Yes, Duncan's scheme will provide lots of useful information, but it might not be a replacement for building the docs under controlled conditions (though not necessarily on the server). The docs we want on the server have different links from the local ones people would usually want to generate. It would also require a great deal of care to ensure that docs produced remotely could be trusted.

On Sat, 2008-01-26 at 02:16 +0000, Ross Paterson wrote:
On Mon, Jan 21, 2008 at 05:47:18PM -0800, Judah Jacobson wrote:
On Jan 21, 2008 4:53 PM, Duncan Coutts
wrote: In the medium term, expecting the hackage server to be able to build each package is unrealistic. It will never have all the system libs and eventually will probably not have the cpu time to even build them all. The solution is to have separate building and have hackage just report the results.
That makes sense; but if the packages aren't built on the server, will we still be able to display the Haddock docs? Maybe there should be some way for the person uploading a package to also upload its Haddock files?
Yes, Duncan's scheme will provide lots of useful information, but it might not be a replacement for building the docs under controlled conditions (though not necessarily on the server). The docs we want on the server have different links from the local ones people would usually want to generate. It would also require a great deal of care to ensure that docs produced remotely could be trusted.
Yes, I think that's right for the short and medium term. Offloading package builds is a good deal easier than offloading building of documentation. Duncan

On Mon, Jan 21, 2008 at 02:57:03PM -0800, Judah Jacobson wrote:
Would it be possible to get better reporting of errors that prevent Haddock docs from being built? Some packages without docs list a build log, but many others don't.
They should be up-to-date now, with an indication of success or failure (and a log in the latter case, though in a different place on the page from previously). Note that only packages containing libraries are built.
For example, the editline package was posted about 5-6 days ago, and still doesn't have haddock links (probably because libedit isn't installed on the hackage server). It would be nice to see the build errors, if any, so that I could request for any missing libraries to be installed.
Your package failed to build, because editline.h is not in a subdirectory on Debian systems (like the one used for the build). You'd need to check for plain editline.h too. But then it fails the sign of read_history test, presumably because it's an old version (1.12).
participants (5)
-
Adrian Hey
-
Duncan Coutts
-
Judah Jacobson
-
Ross Paterson
-
Thomas Schilling