Skip to content
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

Haddocks not copied for dependencies (was: Installing and using offline documentations?) #1105

Closed
rongcuid opened this issue Oct 5, 2015 · 11 comments
Assignees
Milestone

Comments

@rongcuid
Copy link

rongcuid commented Oct 5, 2015

I use only stack for my local haskell installation. However, I don't see a way to locally install documents from packages, and hoogle does not find them either. It may be a nice feature to have because when I used the haskell platform in Ubuntu official repo, I can easily just search using hoogle, or look into local documentations.

@snoyberg
Copy link
Contributor

snoyberg commented Oct 6, 2015

stack haddock should generate the documents locally. See #55 about a stack hoogle command

@snoyberg snoyberg added this to the Support milestone Oct 6, 2015
@diegs
Copy link

diegs commented Oct 7, 2015

Running stack haddock or stack build --haddock seems to populate local haddock in .stack-work and snapshot-wide haddock ~/.stack/snapshots/x86_64-osx/lts-3.8/7.10.2/doc/. Very cool! Unfortunately the snapshot-wide haddocks appear to be missing the documentation for Base. Is there any way for that to be included?

I'd love to be able to go offline and easily browse all the version-correct docs for my current project.

@snoyberg
Copy link
Contributor

snoyberg commented Oct 7, 2015

Are you using a Stack installed GHC, or something else? The GHC which Stack
installs should include documents for bundled libraries.

On Wed, Oct 7, 2015, 9:46 AM Diego Pontoriero notifications@github.com
wrote:

Running stack haddock or stack build --haddock seems to populate local
haddock in .stack-work and snapshot-wide haddock
~/.stack/snapshots/x86_64-osx/lts-3.8/7.10.2/doc/. Very cool!
Unfortunately the snapshot-wide haddocks appear to be missing the
documentation for Base. Is there any way for that to be included?

I'd love to be able to go offline and easily browse all the
version-correct docs for my current project.


Reply to this email directly or view it on GitHub
#1105 (comment)
.

@rongcuid
Copy link
Author

rongcuid commented Oct 7, 2015

I am using stack installed GHC. I found the offline docs after I installed packages using stack install <pkg> --haddock. However, hoogle does not find all documentations about the packages I installed. For example:

hoogle blit
Graphics.Rendering.OpenGL.GL.ReadCopyPixels blitFramebuffer :: Position -> Position -> Position -> Position -> [BlitBuffer] -> TextureFilter -> IO ()
Graphics.Rendering.OpenGL.GL.ReadCopyPixels data BlitBuffer

There should also be results from SDL and sdl2.

@snoyberg
Copy link
Contributor

snoyberg commented Oct 7, 2015

This sounds more like a question about how best to use hoogle, rather than a feature in stack, unless I'm mistaken.

@rongcuid
Copy link
Author

rongcuid commented Oct 7, 2015

No, it is about stack. If I use Ubuntu official version of GHC, then any package I installed will automatically be in database of Hoogle, but stack packagages do not.

@borsboom
Copy link
Contributor

borsboom commented Oct 7, 2015

stack hoogle (#55) is going to be the way to do this. Stack doesn't install packages and documentation to the default locations where globally installed hoogle looks. stack haddock does output the .txt input files for hoogle, so it is possible to use hoogle commands to generate a database from those and search them, but installing into the global databases is not something Stack will ever do.

@rongcuid
Copy link
Author

rongcuid commented Oct 7, 2015

I see. Will stack hoogle be supported in some future release?

@borsboom
Copy link
Contributor

borsboom commented Oct 7, 2015

Yes, it's also a feature that I want.

@diegs
Copy link

diegs commented Oct 8, 2015

I am using stack installed GHC as well, which I assume lives in .stack/snapshots/x86_64-osx/lts-3.8/ but there's no documentation in there. Is it somewhere else?

It would be nice if it were all in one place, but as long as it's somewhere local I could make do.

@borsboom
Copy link
Contributor

borsboom commented Oct 8, 2015

There does seem to be something going wrong with stack haddock putting documentation for dependencies where it should be. There's a regression here.

Expected behaviour is for stack haddock to put documentation for snapshot packages and their dependencies included with GHC in, e.g., ~/.stack/snapshots/x86_64-osx/lts-3.0/7.10.2/doc. It does seem to be putting the docs for the snapshot packages it builds, but it's not linking in the GHC-included docs (e.g. for base).

In addition, all of a project's dependencies' docs should get put in, e.g., .stack-work/install/x86_64-osx/lts-3.0/7.10.2/doc/all/, but that doesn't seem to be happening. It is correctly putting the project's local packages' docs in .stack-work/install/x86_64-osx/lts-3.0/7.10.2/doc, though.

@borsboom borsboom modified the milestones: P1: Must, Support Oct 8, 2015
@borsboom borsboom self-assigned this Oct 8, 2015
@borsboom borsboom changed the title Installing and using offline documentations? Haddocks not copied for dependencies (was: Installing and using offline documentations?) Oct 12, 2015
dysinger added a commit that referenced this issue Nov 13, 2015
* master: (106 commits)
  Fix ghci -package-id for lib dep from test #1222
  Fix passing of include dirs to GHCI #1222
  Minor change to some local var naming
  Fix a copy-o which breaks ghci test targets #1222
  Only ask for commit count once when compiling
  Move Windows installers above manual download
  Import all modules after loading them (#995)
  replace if then else with case matching (multiway if)
  Control/Concurrent/Execute.hs : redundant do
  Use stack setup so you can ignore most of the output
  Don't cache the GHC folder
  Strip -static before passing to GHCi (#1094)
  Fix: unlisted files in tests and benchmarks trigger extraneous second build (fixes #838)
  Don't fail when registering/looking up library for executable-only packages #1232
  Fix help for default true bool flag's enable hint
  Rebuild when cabal file is changed
  watched command: show files, not directories
  Update changelog
  Fix: Haddocks not copied for dependencies (fixes #1105)
  Remove redundant Version from InstalledMap
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants