Closed chrisdone closed 7 years ago
It does ghc-pkg and then looks for the docs where the haddock field points (on a mobile, so I can't see the precise fields). Did you install haddock/Hoogle for each of those packages? Were they installed with stack or cabal? If stack, have you upgraded?
I ran stack haddock
, but let me upgrade stack, that might be the cause.
Also, any chance they are what your test suite requires but not your exe/lib? Makes no difference to Hoogle, but might to stack.
@chrisdone, how did the upgrade work? Do you still have issues?
@ndmitchell
I just experiences a similar behaviour:
[...]
[129/165] word8... 0.02s
[130/165] xhtml... 0.08s
[131/165] yaml... 0.02s
[132/165] zlib... 0.04s
Packages not found: ansi-wl-pprint apply-refact bytestring-builder cabal-helper cereal cpphs djinn-ghc djinn-lib either extra fclabels ghc-exactprint ghc-mod ghc-syb-utils haskell-src-exts hlint hscolour monad-journal MonadRandom nats optparse-applicative pipes polyparse refact rts split strict stylish-haskell temporary temporary-rc transformers-compat uniplate utf8-string
Found 46 warnings when processing items
Reodering items... 0.01s
Writing tags... 0.09s
Writing names... 0.16s
Writing types... 0.63s
Took 9.71s
my guess is that those Packages not found
are those I installed manually via stack install
(e.g. stack install hlint
)
Since they are not related to my build plan, stack haddock
didn't generate documentation for them.
That makes sense, so if you want them installing, you'd need to talk to stack people - I'm not sure what it should do though. Were you hoping for docs for everything that goes into this package? Everything you've ever installed?
I think it is doing the right thing as of now.
Indeed stack haddock
only asks stack to generate haddock for direct project dependencies, not for the whole snapshot.
if I want to generate doc for those other packages installed, but not in the dependency tree, I can still do
stack build --haddock \
ansi-wl-pprint apply-refact bytestring-builder cabal-helper cereal cpphs djinn-ghc djinn-lib either extra fclabels ghc-exactprint ghc-mod ghc-syb-utils haskell-src-exts hlint hscolour monad-journal MonadRandom nats optparse-applicative pipes polyparse refact rts split strict stylish-haskell temporary temporary-rc transformers-compat uniplate utf8-string
And just copy-paste the list given by your command :)
A possible resolution to that could be to improve the error message:
Or I could take a --stack
command line and run stack build --haddock
on all the things in the package DB. It's mostly a case of figuring out what users want. Do they want docs for this project? Docs for all projects that they directly depend on? Docs for everything they've ever installed?
@ndmitchell Indeed, nothing changed but @rvion's explanation clears up why.
My motivation for trying this out, apart from because I want it for myself, was to see what would be necessary to have a stack hoogle
single command to do this. So it seems that such a command could run:
$ stack haddock <every> <package> <available>
$ stack exec -- hoogle generate --local
What do you think?
This issue might be helpful https://github.com/commercialhaskell/stack/issues/1479 in serving this purpose.
Thanks @chrisdone - seems entirely reasonable.
I should use this ticket to make the message clearer, so users can answer their own questions. Not sure there's much more required than that.
I still think its worth improving the error message, so leaving this open for now.
Error message improved.
I just tried this out with the latest master on hoogle and I got this curious message:
Why weren't these ones found?