Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Firefox dislikes Haddock master index on Windows #218

Closed
ghc-mirror opened this issue May 8, 2014 · 3 comments
Closed

Firefox dislikes Haddock master index on Windows #218

ghc-mirror opened this issue May 8, 2014 · 3 comments
Assignees

Comments

@ghc-mirror
Copy link

Original reporter: mark+haskell@

(NB: This bug was ported here from the haskell platform trac: http://trac.haskell.org/haskell-platform/ticket/148 -- it might very well be fixed already!)

If you edit the cabal configuration file and add the lines

documentation: True
doc-index-file: $datadir\doc\index.html
then cabal-install generates a master package index every time it installs a new package. Internet Explorer is perfectly happy with this page, and the W3C validator passes it, but Firefox dislikes it.

Specifically, Firefox won't follow any of the links, complaining that "the transfer protocol is not registered". Basically, all of the links are absolute paths that begin "C:\Documents and Settings...", and Firefox apparently thinks that "C:" is a transfer protocol specification, just like "http:" or "mailto:". (I'm using Firefox 3.5 for Windows, in case it makes a difference.)

Note that this bug does not affect the index of packages supplied with HP, which uses relative paths. This index page works with every browser I've tried. It's the absolute paths in the cabal-install package index that are failing.

Since the document index is always in the folder above the individual package documentation, I would suggest that making Haddock always use relative paths would fix this. (The alternative is to prefix all absolute paths with "file:", which seems to make Firefox happy.)

@ghc-mirror ghc-mirror self-assigned this May 8, 2014
@ghc-mirror
Copy link
Author

Original reporter: sol@

If I understand correctly, this is a Cabal/cabal-install issue. Haddock can read interface files with e.g.

--read-interface=<base-url>,<path-to-haddock-interface-file>

where base-url has to be a a valid URL. On Windows, Cabal passes something like C:\foo\bar\baz as base-url which is not a valid URL.

@ghc-mirror
Copy link
Author

Original reporter: sol@

I opened a corresponding ticket on Cabal's issue tracker: haskell/cabal#1064

I'll still investigated whether we can workaround this in Haddock.

@ghc-mirror
Copy link
Author

Original reporter: roma@

This has been fixed in Cabal: haskell/cabal#1407

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant