Ticket #248 (closed defect: fixed)

Opened 9 months ago

Last modified 6 months ago

Running "haddock --hyperlink-source" fails with a "requires Haddock version 0.8 or later" message

Reported by: guest Assigned to:
Priority: normal Milestone:
Component: Cabal library Version: 1.2.3.0
Severity: normal Keywords:
Cc: Difficulty: normal
GHC Version: 6.8.2 Platform:

Description

Hello,

when running something like:

runhaskell Setup.lhs haddock --hyperlink-source --hscolour-css=/usr/local/share/hscolour-1.9/hscolour.css

Cabal fails with: Setup.lhs: haddock --hyperlink-source requires Haddock version 0.8 or later

This seems to be the involved code (from Distribution.Simple.Haddock (line 148):

when (hsColour && not have_src_hyperlink_flags) $

die "haddock --hyperlink-source requires Haddock version 0.8 or later"

Cabal 1.2.3.0 (with ghc-6.8.2) and Haddock 2.0.0.0.

Cheers, Andrea Rossato

Attachments

link_source_Haddock2.dpatch (58.6 kB) - added by guest on 02/27/08 04:14:35.

Change History

02/27/08 04:14:35 changed by guest

  • attachment link_source_Haddock2.dpatch added.

02/27/08 04:15:21 changed by guest

I attached a patch for this issue too.

please double check, but I think this could be the real meaning of that line: if we have hscolour, and we are running haddock version 2 or >= 0.8, then we link the source.

cheers,

ar

06/09/08 10:00:46 changed by duncan

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

Looks like this is already fixed:

Sun Dec  9 18:05:55 GMT 2007  David Waern <davve@dtek.chalmers.se>
  * Support --hyperlink-source for Haddock >= 2.0

    hunk ./Distribution/Simple/Haddock.hs 125
    -    let have_src_hyperlink_flags = version >= Version [0,8] [] && version < Version [2,0] []
    +    let have_src_hyperlink_flags = version >= Version [0,8] []

This patch is included in the 1.2 and 1.4 branches so will be in Cabal-1.2.4.0 and is already included in Cabal-1.3.11.