Combining databases
Hi,
I'm trying to set up a local hoogle database for code that I'm working on. I'd like it to include all my dependencies as well as my own code. I can do
hoogle generate --local=. --database local.hoo
to construct a database of my stuff, and I can do
hoogle generate --local --database deps.hoo
to construct a database of my dependencies, but I can't figure out how to do one call to get both. Calling --local without arguments is a special case in the command line argument parsing, so doing:
hoogle generate --local --local=.
fails with the error
Starting generate
hoogle: : getDirectoryContents:openDirStream: does not exist (No such file or directory)
(Note the bonus colon there -- it's trying to find the directory named "".)
Searching online for help reveals that there used to be a combine feature, but it looks like that was removed in Hoogle 5.
Is there a Hoogle 5 way to combine databases? Or, is there a better way to generate a database like what I want?
Thanks!
In Hoogle 5 there's no way to combine databases, and likely never will be - they throw away lots of the essential information during construction.
The Hoogle flags for specifying what goes in the database are woefully incomplete. There are comments in https://github.com/ndmitchell/hoogle/blob/master/src/Action/Generate.hs#L40 about a potential design, but it never got finished. Likely as not, you can't merge local and remote information - which is very sad. The part of the code that probably needs changing is https://github.com/ndmitchell/hoogle/blob/master/src/Action/Generate.hs#L200-L203 - observe that the absence of any local_ is used to trigger fetching from the remote. Patches and design ideas most welcome!