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

'stack hoogle generate' erroneously considers packages to be missing documentation #3362

Closed
jchia opened this Issue Aug 18, 2017 · 4 comments

Comments

Projects
None yet
4 participants
@jchia

jchia commented Aug 18, 2017

General summary/comments (optional)

"stack hoogle generate --rebuild -- --local" gives "Packages missing documentation" for 'vector' package. This is a regression from Stack 1.4.0 to 1.5.0. The issue remains in 1.5.1.

Steps to reproduce

This was reproduced on Fedora 22 using downloaded stack binary ~/.local/bin/stack.

$ stack upgrade --binary-version 1.5.1 # Also repros with 1.5.0 but not with 1.4.0.
$ rm -rf ~/.stack
$ stack new --resolver=lts-9.1 doc
$ cd doc
$ vim doc.cabal # Add vector to the library build-depends
$ stack setup
$ stack haddock
$ stack hoogle generate --rebuild -- --local

The stack hoogle command complains about "Packages missing documentation" and 'vector' is one of the affected packages. There's nothing special about 'vector'. I'm just using it as an example of a package affected by this issue.

Expected

'vector' should not be one of the "packages missing documentation".

Actual

...
Generated DB.
Starting generate
Reading ghc-pkg... 0.02s
[6/30] containers... 0.11s
[10/30] ghc... 1.87s
[26/30] xhtml... 0.05s
Packages missing documentation: doc primitive rts vector
Found 42 warnings when processing items
...

Stack version

Repros with 1.5.0 & 1.5.1 but not with 1.4.0.

$  stack --version
Version 1.5.1, Git revision 600c1f01435a10d127938709556c1682ecfd694e (4861 commits) x86_64 hpack-0.17.1

Method of installation

  • Official binary, downloaded from stackage.org or fpcomplete's package repository
@kadoban

This comment has been minimized.

Collaborator

kadoban commented Aug 19, 2017

Thanks for the report!

I'm trying to narrow down the commit that caused this change, but it's taking a while (having trouble coming up with a reproduction script that takes less than about an hour per test). I should be able to narrow it down eventually though.

Or someone that actually knows what they're doing might come along first :)

@bmjames

This comment has been minimized.

bmjames commented Oct 5, 2017

I spent some time investigating this and determined that the missing modules don't have the <module>.txt file (produced by haddock for consumption by the hoogle indexer) in their docs directory. I didn't get as far as determining whether this is caused by a problem in haddock, cabal, or stack.

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Oct 7, 2017

The bug was introduced at d0ab69c#diff-890614cc04afa326f5d48aac897e4aa8 - specifically it added support for haddock-arguments and removed hoogle. I'll send a PR.

ndmitchell added a commit that referenced this issue Oct 7, 2017

@ndmitchell

This comment has been minimized.

Contributor

ndmitchell commented Oct 7, 2017

Rather than raise a PR, since I'm an idiot with too many permissions, I accidentally pushed direct to the Stack repo. Ticket to review/revert the patches is at #3478.

tswelsh added a commit to tswelsh/stack that referenced this issue Nov 7, 2017

tswelsh added a commit to tswelsh/stack that referenced this issue Nov 7, 2017

@jchia jchia closed this May 23, 2018

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