Stop! Tickets are now managed at GitHub.

Please enter new tickets, and find and edit existing tickets there:

Ticket #149 (closed defect: wontfix)

Opened 7 years ago

Last modified 5 years ago

No Haddock index for global installs

Reported by: Orphi Owned by: DavidWaern
Priority: major Milestone:
Component: haddock Keywords:


If you add the lines

  documentation: True
  doc-index-file: $datadir\doc\index.html

to the cabal-install configuration file, then cabal-install generates a Haddock master index file with hyperlinks to the documentation for all the packages you've installed. However, this works if and only if you do a user-install. In other words, the cabal-install configuration files contains

  user-install: True

If you set this to False, then the packages go in a different folder (and are registered in a different GHC package DB). But also, for reasons unknown, the master index file is no longer generated. I don't know whether this is a fault with cabal-install, the Cabal library, or Haddock, but it's quite irritating.

As a minimum, there should be a warning that the request for an index file is being ignored, rather than silently doing nothing. But ideally, the index file should be generated.

(As an aside, it would be nice if the start menu or something would link to this file - but that would of course require it to exist at install-time...)

Change History

Changed 7 years ago by MtnViewMark

This is a hard one for several reasons:

1) The logic for doing a rebuild of the haddock index is in the cabal executable (from the cabal-install package, not the library from Cabal). This logic is a bit tricky and hard to recreate by hand. Cabal doesn't give a command to invoke it directly. I have some shell scripts that recreate it more or less. I think this logic should be moved to haddock.

2) There are really two haddock indexes that should be updated: a) The --global index (assuming there is one) that only includes the packages installed --global. b) The user's local index, since even though their packages didn't change, their index usually includes all the --global packages. (a) has the issue that it probably requires sudo privileges. (b) leaves other users' in need of an update.

Changed 5 years ago by MtnViewMark

  • status changed from new to closed
  • resolution set to wontfix

If anyone want to re-raise this issue, it should be filed at both cabal-install and haddock - as they both need to think through the index strategy.

Note: See TracTickets for help on using tickets.