Skip to content

Stack cmd to produce docset(s) for https://kapeli.com/dash or http://zealdocs.org/ #491

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

Closed
dysinger opened this issue Jul 2, 2015 · 10 comments

Comments

@dysinger
Copy link
Contributor

dysinger commented Jul 2, 2015

I would like to be able to quickly generate docsets for zeal (or dash.app) for a project. Offline hotkey search of APIs is handy.

Currently I use the cabal based dash-haskell with some command line foo:
cabal list --installed|grep -e '^\*'|sed 's/\* //g'|parallel --no-notice dash-haskell -o ~/.local/share/Zeal/Zeal/docsets
... but it doesn't yet work with cabal 1.22 and I'm lazily relying on my .zsh_history to remember how to type that.

It would be handy to have stack do this sort of thing for me.

@snoyberg
Copy link
Contributor

snoyberg commented Jul 2, 2015

If we can get this added to stackage-curator, then we can generate that output for all users with each build. What is the resulting artifact from the above command? Is it a single file, a directory, etc?

@snoyberg snoyberg added this to the 0.3.0.0 milestone Jul 2, 2015
@dysinger
Copy link
Contributor Author

dysinger commented Jul 3, 2015

stackage-curator is probably the best place for this (not stack). the output is a directory.

@snoyberg
Copy link
Contributor

snoyberg commented Jul 7, 2015

Since this will be part of stackage-curator instead, closing.

@snoyberg snoyberg closed this as completed Jul 7, 2015
@PierreR
Copy link

PierreR commented Nov 8, 2015

What about generating docsets for a local library ?

Any plan to have docsets for all stackage packages ? I am using Zeal but unfortunately Haskell docsets are quite incomplete (and out-of-dated).

Is stackage-curator able to generate docsets currently ?

Updated As a note, the best bet is probably to use https://github.com/philopon/haddocset for now

@angerman
Copy link
Contributor

angerman commented Apr 1, 2016

Bump. What happened to this? Is there a corresponding stockage-curator issue somewhere?

@angerman
Copy link
Contributor

angerman commented Apr 1, 2016

We currently have two docset generators:

@mgsloan
Copy link
Contributor

mgsloan commented Apr 1, 2016

Considering that stack has haddocks support, it seems consistent to also have something for these tools, if there's demand.

We'd want to do it elsewhere than stackage-curator so that such lookup is available for private / local projects.

@mgsloan mgsloan reopened this Apr 1, 2016
@mgsloan mgsloan modified the milestones: P3: Optional, P2: Should Apr 1, 2016
@angerman
Copy link
Contributor

angerman commented Apr 3, 2016

You can actually have multiple docsets.
I would go with:

  • Stackage (lts-xxx or nightly).docset
  • MyProject.docset

Here's basically the haddocset work flow (though incomplete):

$ stack exec -- haddocset -t stackage-lts create
$ stack exec -- haddocset -t stackage-ltd.docset add -f $(stack path --snapshot-pkg-db)/*.conf
$ stack exec -- haddocset -t myproj create
$ stack exec -- haddocset -t myproj.docset add -f $(stack path --local-pkg-db)/*.conf

After that I'm having two docsets, one which contains the stockage docs for the packages I depend on only. (Hence I won't be able to lookup any functionality that would be in stockage, but is not yet a dependency in the cabal file.) And another one which contains my local project and dependencies.
I'd much prefer to get the full stackage docset from stackage and just install it.

I guess I could fake it, by creating a project that depended on all packages in stackage; but this seems like something that should be shared, instead of having everyone compile this for their own.

@PierreR
Copy link

PierreR commented Apr 21, 2016

When I try it (on nixos) I have got a puzzling error message:

stack exec -- haddocset -t stackage-lts create
[1/5] Create Directory.
[2/5] Writing plist.
[3/5] Migrate Database.
    Global package directory: /nix/store/zzagkgsmb66gxng1819fyqrz7n08l7j4-ghc-7.10.3/lib/ghc-7.10.3/package.conf.d
    Global package count:     25
[4/5] Copy and populate Documents.
    filepath-1.4.0.0 .haddocset: stackage-lts.docset/Contents/Resources/Documents/filepath-1.4.0.0/doc-index.html: commitAndReleaseBuffer: invalid argument (invalid character)

but it works outside a project (the project is nix enable)

@snoyberg
Copy link
Contributor

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

5 participants