[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RFC : Hoogle in Debian (long)



On Wed, Jun 24, 2009 at 10:04:52PM +1000, Erik de Castro Lopo wrote:
> Hoogle relies on database files with the '.hoo' file extention which
> for my package sit in /usr/share/hoogle/database/ . These database
> files are generated using haddock with the --hoogle command line
> option. Currently the database files shipped with the hoogle .deb are
> the ones shipped with the upstream hoogle sources.

Aren't you leaving a step from that?  Quoting Cabal docs:

--hoogle
    Generate a file dist/doc/html/pkgid.txt, which can be converted by
    Hoogle into a database for searching. This is equivalent to
    running haddock with the --hoogle flag.

Do we want to ship .hoo files in Debian packages instead?  That'd make
hoogle a build dependency.

An alternative would be to put a trigger in hoogle that would generate
.hoo files from .txt files.  If I understand this right then this
wouldn't need the full source of the library in place.  Passing around
correct +package options for Hoogle is another step in this, but they
can be inferred from the cabal database.

I already made hlibrary.mk copy some fields from the
installed-pkg-file to the -doc package, but this change isn't yet in
the current haskell-devscripts package.  I added that so that
gen_contents_index in ghc6-doc does the right thing with a -doc
package even when the corresponding -dev package is missing.  This
could be useful for Hoogle, too.

How were you going to handle naming files in
/usr/share/hoogle/database/?  $CABALNAME.{hoo,txt} is the first
candidate, but that can conflict when there are multiple versions of a
library present.  That's QuickCheck currently and parsec if
haskell-parsec2 ever gets through NEW.  As far as hlibrary.mk is
concerned, then $(DEB_CABAL_PACKAGE).{txt,hoo} seems right.  That can
be overridden by a maintainer when necessary.

>  - That haskell-devscripts be updated to modify the rules that make
>    libghc6-@pkgname@-doc and @pkgname@-doc to also build and install
>    the hoogle database files.

Also, make ghc6's build system do that for ghc6-doc.  Preferrably
without needing hoogle as a build dependency.  Build dependency loops
should be avoided if possible.


Reply to: