You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Haddock links to types in other packages are broken #1231
open .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc/html/penny/index.html
Click on "Penny.Commodity", then "Text"
I get a 404. Links work to other types in the same package, but all links to types in other packages are broken. I believe this used to work with older versions of stack.
Output from stack --version:
Version 0.1.6.0, Git revision e22271f (2313 commits) x86_64
open
.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc/html/penny/index.html
7.
Click on "Penny.Commodity", then "Text"
I get a 404. Links work to other types in the same package, but all links
to types in other packages are broken. I believe this used to work with
older versions of stack.
Output from stack --version:
Version 0.1.6.0, Git revision e22271f e22271f
(2313 commits) x86_64
—
Reply to this email directly or view it on GitHub #1231.
After looking at issue #1105 I see a few things that aren't working:
The Haddock HTML links to other packages in the package's .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc directory are still pointing at the .stack-work directory, when they need to be pointing at the .stack/snapshots directory.
The Haddock index.html in my ~/.stack/snapshots/x86_64-osx/nightly-2015-09-21/7.10.2/doc directory has no links to the Data.Text modules or to many other modules that are part of that snapshot. It appears there are no links to packages that were originally installed as part of other snapshots and that are being linked to from this snapshot.
@massysett: I haven't been able to reproduce your exact issue, but in the process of trying I did come across other problems with haddocks for packages that were copied from another snapshot. I've overhauled the way haddocks for dependencies are found and then put where they belong, and I don't think the issue you're describing should happen anymore. Can you try the latest master, and close this issue if it is resolved for you?
The Haddock HTML links to other packages in the package's .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc directory are still pointing at the .stack-work directory, when they need to be pointing at the .stack/snapshots directory.
This is actually expected. All links in the HTML are relative to make it easy to copy the haddocks elsewhere (e.g. to a web server) and have all the inter-package links continue to work. What was broken is that the haddocks for dependencies were not copied to .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc properly.
After doing stack build --haddock --haddock-deps I have only the Haddocks for my project in .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc. None of the other dependencies are in there. Links to other packages in the Haddocks for my project are broken; I've got a link to Text that points to something in a Turtle directory in .stack-work. My index.html in /Users/massysett/unix/penny/.stack-work/install/x86_64-osx/nightly-2015-11-08/7.10.2/doc/all/index.html also is not fully populated with all packages. This is with stack from Git 7019ed3.
I made a tarball of my project directory with the Haddocks and put it here:
Nuking the ~/.stack directory and rerunning stack build --haddock --haddock-deps improves the quality of /Users/massysett/unix/penny/.stack-work/install/x86_64-osx/nightly-2015-11-08/7.10.2/doc/all/index.html but none of the hyperlinks to types to other packages in .stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc/html/penny/index.html are working.
Based on what I see in your tarball, this looks like the same problem reported in #1317. When I run stack haddock in there, the files end up in the right places (I'm on Yosemite).
Activity
snoyberg commentedon Oct 25, 2015
I think I saw that this was just fixed on master. Can you try upgrading and
see if the behavior is corrected?
On Sun, Oct 25, 2015 at 6:37 PM, Omari Norman notifications@github.com
wrote:
massysett commentedon Oct 25, 2015
Unfortunately I'm getting the same behavior on master. Output from
stack --version:Version 0.1.7.0, Git revision b6c5233 (2413 commits) x86_64
massysett commentedon Oct 26, 2015
After looking at issue #1105 I see a few things that aren't working:
massysett commentedon Oct 26, 2015
Because this bug seems to depend on what other snapshots are installed, it may not replicate on different systems.
Overhaul dependencies' haddocks copying (#1231)
borsboom commentedon Nov 8, 2015
@massysett: I haven't been able to reproduce your exact issue, but in the process of trying I did come across other problems with haddocks for packages that were copied from another snapshot. I've overhauled the way haddocks for dependencies are found and then put where they belong, and I don't think the issue you're describing should happen anymore. Can you try the latest master, and close this issue if it is resolved for you?
@massysett said:
This is actually expected. All links in the HTML are relative to make it easy to copy the haddocks elsewhere (e.g. to a web server) and have all the inter-package links continue to work. What was broken is that the haddocks for dependencies were not copied to
.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/docproperly.massysett commentedon Nov 9, 2015
After doing
stack build --haddock --haddock-depsI have only the Haddocks for my project in.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc. None of the other dependencies are in there. Links to other packages in the Haddocks for my project are broken; I've got a link toTextthat points to something in aTurtledirectory in.stack-work. My index.html in/Users/massysett/unix/penny/.stack-work/install/x86_64-osx/nightly-2015-11-08/7.10.2/doc/all/index.htmlalso is not fully populated with all packages. This is withstackfrom Git 7019ed3.I made a tarball of my project directory with the Haddocks and put it here:
https://drive.google.com/file/d/0B2jkntipVFPZOEZ5clQ5S2tOdFk/view?usp=sharing
I will try nuking my
~/.stackdirectory and trying again.massysett commentedon Nov 9, 2015
Nuking the
~/.stackdirectory and rerunningstack build --haddock --haddock-depsimproves the quality of/Users/massysett/unix/penny/.stack-work/install/x86_64-osx/nightly-2015-11-08/7.10.2/doc/all/index.htmlbut none of the hyperlinks to types to other packages in.stack-work/dist/x86_64-osx/Cabal-1.22.4.0/doc/html/penny/index.htmlare working.massysett commentedon Nov 9, 2015
I'm on Mac OS X El Capitan if that makes any difference.
borsboom commentedon Nov 12, 2015
Based on what I see in your tarball, this looks like the same problem reported in #1317. When I run
stack haddockin there, the files end up in the right places (I'm on Yosemite).borsboom commentedon Nov 19, 2015
I've pushed a fix for #1317. Can you try the latest master and close this
issue if that fixes it?
On Sun, Nov 8, 2015 at 8:00 PM Omari Norman notifications@github.com
wrote:
massysett commentedon Nov 19, 2015
It's working great with the latest master, thanks!