ndmitchell / hoogle

Haskell API search engine
http://hoogle.haskell.org/
Other
738 stars 134 forks source link

misc/tag-rename.txt: openFile: does not exist #116

Closed erikkaplun closed 9 years ago

erikkaplun commented 9 years ago

at 88e6025 on OS X 10.9.5, GHC 7.8.4, cabal-install 1.22.2.0:

~$ hoogle generate all
Downloading https://raw.githubusercontent.com/haskell/haskell-platform/master/hptool/src/Releases2014.hs... 3.27s
Downloading https://hackage.haskell.org/packages/index.tar.gz... 11.09s
Downloading https://hackage.haskell.org/packages/hoogle.tar.gz... 48.93s
Downloading http://packdeps.haskellers.com/reverse... 5.40s
hoogle: misc/tag-rename.txt: openFile: does not exist (No such file or directory)
ndmitchell commented 9 years ago

Did you cabal install it and then run hoogle from there? I don't think that's supported as I poke at misc/tag-rename.txt directly. I should do it by making it a data file, which would then work.

erikkaplun commented 9 years ago

oops, you're right: I had to run the command in the same directory as I cloned/sandboxed hoogle.

erikkaplun commented 9 years ago

but now I can't use the hoogle command:

$ hoogle foo hoogle: output/all.hoo: opening of 'output/all.hoo' failed: does not exist (No such file or directory)

ndmitchell commented 9 years ago

Yeah, you probably need to run hoogle from the same directory, which is a bit of a serious limitation. Certainly needs fixing.

erikkaplun commented 9 years ago

indeed — running from the same directory worked fine.

btw, as a side note: hoogle generate all seems to render hoogle unusable until I re-run just hoogle generate.

ndmitchell commented 9 years ago

In Hoogle 5 it does all of Stackage as standard, but if you pass all it restricts you to the package all. Since there is no package with that name, it searches nothing.

ndmitchell commented 9 years ago

I now pull the tag-rename out of the data dir, so you can install it then generate from elsewhere. You still have to generate and run from the same directory too though.

ndmitchell commented 9 years ago

OK, so now it's fully relocatable - using the data directory for the tag renaming and the getAppUserDataDirectory for downloads and installs. While I was at it, I also ignore the all argument, since it's harmful with Hoogle 5.

@eallik, I'd welcome if you could give the git version another try and see if it seems more friendly. I'm still polishing rough edges, but hopefully its usable now, and we can refine it future later.