"invalid spreadNames" when many packages
running hoogle generate --local on about 7000 packages results in
Writing types... hoogle: Invalid spreadNames
Digging a bit further into spreadNames (Output/Types.hs) finds that length xs in this situation is 67331, exceeding the maximum for the Word16 inside of the Name type.
Thanks for the report. I'm rather surprised that you have 7000 packages! Is that a consequence of auto generated code? Or are you indexing all of Hackage? Splitting each module into its own package? Or fundamentally, do you just have a lot of code? I think that spread names only really cares about the number of type constructors, and a standard build of Stackage has 28783 of them.
This error results from indexing a significant portion of Hackage.
The submitted pull request works for me locally, but for production, we probably want the database to be versioned indicating a new schema so tools don't fail reading incompatible databases. Also probably want tools for converting databases.
I changed the code for "sizeOf" for "instance Storable Fingerprint" because I suspect there is a bug there (the old size would have been correct if sizeOf were expressed in bits (64 bits), but it's actually bytes. However, I'm not really sure if that was the reason for "64".
Yep, I think that sizeOf was totally dubious. We probably just padded the arrays by a huge chunk for no good reason. Fortunately the size consumed by this information was small enough not to matter. I've merged the PR, and will bump the 3rd digit with the next release. Would you like a release sooner?