Skip to content

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

Closed

Description

@dysinger

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.

Activity

  1. snoyberg commented on Jul 2, 2015

    @snoyberg
    Contributor

    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?

  2. added this to the milestone on Jul 2, 2015
  3. dysinger commented on Jul 3, 2015

    @dysinger
    ContributorAuthor

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

  4. snoyberg commented on Jul 7, 2015

    @snoyberg
    Contributor

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

  5. PierreR commented on Nov 8, 2015

    @PierreR

    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

  6. angerman commented on Apr 1, 2016

    @angerman
    Contributor

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

  7. angerman commented on Apr 1, 2016

    @angerman
    Contributor

    We currently have two docset generators:

  8. mgsloan commented on Apr 1, 2016

    @mgsloan
    Contributor

    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.

  9. reopened this on Apr 1, 2016
  10. angerman commented on Apr 3, 2016

    @angerman
    Contributor

    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.

  11. PierreR commented on Apr 21, 2016

    @PierreR

    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)

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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions