Ticket #157 (closed defect: fixed)

Opened 1 year ago

Last modified 1 year ago

Haddock command fails when dependent documentation is not installed

Reported by: duncan Assigned to:
Priority: normal Milestone:
Component: Cabal library Version: 1.2.0
Severity: normal Keywords:
Cc: Difficulty: easy (<4 hours)
GHC Version: 6.4.2 Platform: Linux

Description

Cabal checks with ghc-pkg for where the .haddock file of dependent packages should be. However even though ghc-pkg says it's there, it very often isn't there. In this case we still ask haddock to use it, and haddock justifiably complains.

Cabal should check that the .haddock file actually exists. If it does not, Cabal should warn that links to this dependent package will not be generated because the docs for this dependent package are not installed. It should then not tell haddock to use that package.

Current behavior:

{{ $ runghc Setup.lhs haddock Preprocessing library bytestring-0.9... Running Haddock for bytestring-0.9... haddock: /usr/share/doc/ghc-6.4.2/html/libraries/base/base.haddock: openBinaryFile: does not exist (No such file or directory) }}

Desired behavior:

{{ $ runghc Setup.lhs haddock Preprocessing library bytestring-0.9... Running Haddock for bytestring-0.9... Warning: Documentation for package base is not installed. No links will be generated. Documentation created: dist/doc/html/bytestring/index.html }}

Or something like that, I'm sure someone can think of a clear friendly warning message

This should be an easy bug for some new Cabal hacker to have a go at. It should just require modifying makeReadInterface in the Distribution.Simple.Haddock module.

Change History

09/24/07 07:40:23 changed by duncan

  • status changed from new to closed.
  • resolution set to fixed.