Ticket #248 (closed defect: fixed)

Opened 5 years ago

Last modified 5 years ago

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

Reported by: guest Owned by:
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 Download (58.6 KB) - added by guest 5 years ago.

Change History

Changed 5 years ago by guest

Changed 5 years ago 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

Changed 5 years ago 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.

Note: See TracTickets for help on using tickets.