-
Notifications
You must be signed in to change notification settings - Fork 841
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Links with absolute paths in --haddock #4971
Comments
I can confirm this is a difference in behaviour between stack-1.9.3 (got relative paths) and stack-2.1.3 (got absolute paths), using official binaries on macOS. It's definitely supposed to use relative paths for exactly the reason you articulate. |
borsboom
added a commit
that referenced
this issue
Jul 23, 2019
I believe I've fixed this in #4974 |
pbrisbin
added a commit
to restyled-io/restyler
that referenced
this issue
Aug 2, 2019
Workaround for commercialhaskell/stack#4971
borsboom
added a commit
that referenced
this issue
Sep 20, 2019
…tive-links Haddock use relative paths in output (fixed #4971)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
General summary/comments (optional)
Prior to stack-2,
stack build --haddock
would produce HTML files with relative links. This made it simple to (e.g.)aws s3 sync
to serve the documentation, and also worked when viewing the files locally.Since stack-2, I get absolute filesystem paths in all the links:
This still works locally, but won't work when served.
I've looked through the documentation for Stack and Haddock (specifically
--source-base
and friends) but nothing I try will recover the old behavior.My general question is, does anyone know how to get relative links back? For now, I'm resorting to
sed
ing them out before uploading.CAVEAT: I'm only 90% sure this is a stack-2 thing. I don't refresh my documentation super frequently so it's possible it worked on an old resolver/GHC/haddock and is breaking on a newer one, but I believe it was the upgrade to stack-2 that did it. Apologies in advance if I'm incorrect.This has been confirmed below.Steps to reproduce
Have an S3 bucket as a website to serve documentation from
Run something like:
Expected
Links from the main S3 website should work (because they are relative).
Actual
Links do not work because they include
/home/$USER/blah/blah
in them.Stack version
Method of installation
https://aur.archlinux.org/packages/stack-static/, which packages the official binary for Arch.
The text was updated successfully, but these errors were encountered: