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

No package names in haddock index #2886

Closed
feuerbach opened this Issue Dec 30, 2016 · 4 comments

Comments

Projects
None yet
3 participants
@feuerbach
Contributor

feuerbach commented Dec 30, 2016

The package index generated by stack haddock does not contain the package names. The package names seem to be present for the packages distributed with ghc but not for the packages installed with stack.

Here's a screenshot of my ~/.stack/snapshots/x86_64-linux/lts-7.0/8.0.1/doc/index.html. Notice the difference between, say, BasicTypes (distributed with ghc) and Bio.Core (from the biocore package, installed with stack from hackage).

stack-haddock

It's been a while since I looked at haddock, but my guess is that it has a command line option to specify the package name that stack does not pass.

The practical significance of this is that it makes it harder to search the index page, especially for packages that are named differently from their modules.

Stack version

$ stack --version
Version 1.3.3, Git revision 87068d8edb64e81f4062ae889472ef74452a2b97 (4441 commits) x86_64 hpack-0.15.0

Method of installation

from git master

@mgsloan

This comment has been minimized.

Collaborator

mgsloan commented Feb 1, 2017

Hmm, not sure why that would be, considering we are essentially using runhaskell Setup.hs haddock, which should know about the package name / version. I tried passing them in manually at

cabal False (concat [["haddock", "--html", "--hoogle", "--html-location=../$pkg-$version/"]
with

                                 ,"--haddock-options=--package-name=" ++ packageNameString (packageName package) ++ " --package-version=" ++ versionString (packageVersion package)

But no difference in the index :/

@mgsloan mgsloan added this to the P3: Optional milestone Feb 1, 2017

judah added a commit to judah/stack that referenced this issue Jun 21, 2017

Fix commercialhaskell#2886: include package names in the haddock cont…
…ents.

It turned out that Haddock expects to see packages with those names
in the GHC package DB.  Pointing Haddock to the local and snapshot DBs
resolved the issue.

judah added a commit to judah/stack that referenced this issue Jun 21, 2017

Fix commercialhaskell#2886: include package names in the haddock cont…
…ents.

It turned out that Haddock expects to see packages with those names
in the GHC package DB, and omits the names otherwise.  Pointing
Haddock to the local and snapshot DBs resolved the issue.

judah added a commit to judah/stack that referenced this issue Jun 21, 2017

Fix commercialhaskell#2886: include package names in the haddock cont…
…ents.

It turned out that Haddock expects to see packages with those names
in the GHC package DB, and omits the names otherwise.  Pointing
Haddock to the local and snapshot DBs resolved the issue.

judah added a commit to judah/stack that referenced this issue Jun 21, 2017

Fix commercialhaskell#2886: include package names in the haddock index.
It turned out that Haddock expects to see packages with those names
in the GHC package DB, and omits the names otherwise.  Pointing
Haddock to the local and snapshot DBs resolved the issue.

@snoyberg snoyberg closed this in 1fcf46e Jul 13, 2017

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jul 13, 2017

PR #3226 has been merged.

@feuerbach

This comment has been minimized.

Contributor

feuerbach commented Jul 13, 2017

Thanks a lot!

@snoyberg

This comment has been minimized.

Contributor

snoyberg commented Jul 13, 2017

Sure, thanks goes to @judah for figuring out the problem and writing the patch!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment