jfeltz / dash-haskell

dash docset builder for Haskell packages and cabal project dependencies
GNU Lesser General Public License v3.0
79 stars 12 forks source link

"setq helm-dash-docsets-path" does not work with package version #3

Closed PierreR closed 10 years ago

PierreR commented 10 years ago

From the README:

(defun activate-package-docsets (root) 
  "activate all docsets in a given directory"
  (progn
     ; force docsets in root to be recognized as installed docsets
     (setq helm-dash-docsets-path root) 
     ; append those to the docset list
     (setq
        helm-dash-common-docsets
        (append (helm-dash-installed-docsets) helm-dash-common-docsets ))
  ))

Unfortunately it does not seem to work for me as it creates :

helm-dash-common-docsets is a variable defined in `helm-dash.el'.
Its value is
("Diff-0" "HUnit-1" "aeson-0" "ansi-wl-pprint-0" "attoparsec-0" "base-4" "base16-bytestring-0" "bytestring-0" "case-insensitive-1" "containers-0" "cryptohash-0" "directory-1" "either-4" "hashable-1" "hslogger-1" "hslua-0" "hspec-1" "http-conduit-2" "http-types-0" "mtl-2" "optparse-applicative-0" "parsec-3" "process-1" "regex-pcre-builtin-0" "scientific-0" "split-0" "stm-2" "temporary-1" "text-1" "time-1" "transformers-0" "unix-2" "unordered-containers-0" "vector-0" "yaml-0")

While the docsets dir looks like this

@arch-docker ~/.docsets/cabal > la 
total 148K
drwxr-xr-x 37 vagrant users 4.0K Sep 12 17:30 .
drwxr-xr-x  3 vagrant users 4.0K Sep 12 17:30 ..
drwxr-xr-x  3 vagrant users 4.0K Sep 11 06:44 aeson-0.7.0.6.docset
drwxr-xr-x  3 vagrant users 4.0K Sep 11 06:44 ansi-wl-pprint-0.6.7.1.docset
drwxr-xr-x  3 vagrant users 4.0K Sep 11 06:44 attoparsec-0.11.3.4.docset
drwxr-xr-x  3 vagrant users 4.0K Sep 11 06:44 base16-bytestring-0.1.1.6.docset
drwxr-xr-x  3 vagrant users 4.0K Sep 11 06:44 base-4.7.0.1.docset

Thanks for your help.

jfeltz commented 10 years ago

The docset path bug strikes again, and at the very least my activate-package-docsets may be taking too many packages. Are you using the latest helm-dash?

PierreR commented 10 years ago

Yep the latest version from github (acee4e4b31af5326fb147bdc673b5e51b9aa4c20) . I have been using dash-docklet from the root of a cabal sandbox project. The generated docklet folders looks ok. But the output of activate-package-docsets seems wrong. For instance, aeson-0 instead of aeson-0.7.0.6 ?

jfeltz commented 10 years ago

Understood. I patched a fix for a similar bug in helm-dash recently: https://github.com/areina/helm-dash/pull/57 I'm aiming to complete a fix for this as well, along with a fix to stop the function from union'ing packages, this weekend.

PierreR commented 10 years ago

I have just tried your patch by manually installing the master version of helm-dash. It works ! Thanks for the tip (and the patch ;-)

jfeltz commented 10 years ago

activate-package-docsets updated with d16fb637c6b7f734c468a058ca7bd069eb9948f0