Ticket #534 (new enhancement)

Opened 4 years ago

Last modified 13 months ago

cabal haddock should --hyperlink-source by default

Reported by: adamvo Owned by:
Priority: normal Milestone: _|_
Component: Cabal library Version: 1.6.0.1
Severity: normal Keywords:
Cc: Difficulty: very easy (<1 hour)
GHC Version: Platform:

Description

The results from cabal haddock --hyperlink-source are very nice, but quite frequently the haddocks are not built with this (all recent hackage libs iirc).

Would there be a problem with generating the source links by default if and only if a HsColour? can be found?

Or should this issue instead be resolved at the haddock level?

Change History

  Changed 4 years ago by duncan

  • milestone set to _|_

The hackage libs do all have the sources. You're thinking of the docs that were built with ghc 6.10.1. That mistake has been corrected.

My personal opinion is that nothing need changing. I'll leave the ticket open to give others a chance to comment.

follow-up: ↓ 3   Changed 4 years ago by coeus

I like the hyperlinked sources, too. For this, I abuse cabal-install in bash scripts to download packages and their dependencies from hackage, because the following is still not possible:

cabal install --hyperlink-source packagename

I always have to unpack, configure, build, and "haddock --hyperlink-source" each package, just to have the sources hyperlinked. I don't know any other solution to this.

Imho, it would be nice to have an option for that default behaviour in the config file. "documentation: True" is just not enough.

in reply to: ↑ 2   Changed 4 years ago by duncan

Replying to coeus:

Imho, it would be nice to have an option for that default behaviour in the config file. "documentation: True" is just not enough.

Indeed. The implementation is unlikely to be difficult. All we are waiting for is for someone to come up with a coherent design. The existing ticket is: #517.

Making the default be --hyperlink-source is just a cop-out for not properly addressing the above ticket.

  Changed 17 months ago by elga

  Changed 17 months ago by edouard

Portabilite, portage, transfert de numero de telephone, un numero Rio ou Releve d'Identite Operateur peut presenter differentes appellations. Toutefois, l'objectif reste le meme: changer d'operateur de telephonie mobiun tout en gardant son numero de telephone actuel.  rio bouygues

  Changed 15 months ago by darrint

I agree with the sentiment that making --hyperlink-source a default is the wrong thing to do.

I burned at least a half hour last night looking for a cabal config option similar to "documentation: True," perhaps "hyperlink-source: true." I was surprised to learn that this isn't possible.

So I had to just do without.

I'm working with yesod, ghc 7.4.1 and virthualenv. So my normal workflow is:

1. download ghc 7.4.1 binaries 2. bunzip 3. run virthualenv --ghc=ghc-tarball 4. Edit cabal config to add "documentation: true." Here is where I wish I could add hyperlink-source. 4. cabal install yesod # wait a long time 5. scaffold site. 6. cabal install --only-dependencies # wait a long time again 7. realize I forgot cabal install alex. 8. cabal install alex 9. cabal install --only-dependencies # wait a long time yet again. 10. Use web browser to go see my 40 or 50 new packages with haddock docs. 11. Wish I knew how to make a root index page. 12. Wish those docs had source linked like I see on Hackage.

Because yesod has soooo many dependencies, it isn't practical to run cabal haddock --hyperlink-source for each one, or at least I haven't found a practical way to do the whole lot in one run.

  Changed 15 months ago by darrint

Sorry for the bad formatting.

  Changed 13 months ago by bfr

I have created a new feature request for adding a configuration item for this, see #941.

Note: See TracTickets for help on using tickets.