ndmitchell / ndmitchell/hoogle
Small local generation?
Nobody has claimed this yet.
- Dominant language
- Haskell
- Stars
- 803
- Forks
- 152
- PR merge metrics
- No merged PRs in 30d
Description
Hi!
I'd recently had a go at using stack hoogle and was delighted to see that it works, however the build times with --rebuild are really terrible and make it almost unusable, so I started digging a little bit to see what stack actually does when you call hoogle... which led me to https://github.com/commercialhaskell/stack/issues/55#issuecomment-155186311.
Even though that issue is pretty old, looking through the current source it seems about right. The bit that is really slow on the project I'm working on is building all the haddocks which I'm not really interested in anyway - I just want to use the type search, our code doesn't have api docs anyway really.
If I just run stack exec -- hoogle generate --local --database=.stack-work/hoogle then I get more tolerable build times of about 10 seconds, however it doesn't seem to actually be able to search any of our local types, it also seems to still be generating lots of stuff for dependencies.
So a few (possibly stupid!) questions:
- Is building the haddock stuff necessary for hoogle to work?
- Is it possible to not bother making stuff for dependencies and just generate the local stuff? I can just use the online hoogle or stackage's hoogle for non local stuff.
- It looks like you can pass arguments to local from the source but the formats in the directory pointed at in tests isn't familiar to me, what do you point it at + how do you pass and seperate multiple arguments? I'd be happy to update the docs for this and do a pull request
The tool is great and pretty much does everything you'd want it to, I just need to understand it a bit better to get the build times down a bit for our code.
Any help would be much appreciated :)
Cheers
Jonny
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the stack hoogle and hoogle generate --local --database=.stack-work/hoogle entry points, then inspect the source and the local-argument formats mentioned in the tests directory. Determine whether Haddock and dependency generation are required, and define how local-only generation should search project types and accept multiple arguments.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- haskell
- Domain
- cli, performance, search
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100