commercialhaskell/all-cabal-hashes

Index of all packages

Closed this issue · 5 comments

For some tools, it would be useful to have an index of the available packages / versions in the repository. Then, tools wouldn't have to traverse the whole directory tree to get a list of available packages / versions.

I've used git-based tooling to provide the list of files when I've needed this. I'm sure there are better ways, but git archive and then asking tar for the list of files works. My reservation about adding any extra files is that it's just taking us farther from the standard 00-index.tar file format, which I'm hesitant to do.

The problem there is that even the tar file contains no index, so you still have to traverse the whole tar file if you want to get to the list of files.

Traversing the tar takes me less than 4 seconds (I measure 4 secs for traversing the entire tar, and also parsing the latest version of every Cabal file) - is that kind of performance problematic to you?

Also, I wasn't necessary saying using exactly that command, there are lots of other git commands available. That just happens to be the command that I'm using for other work I'm doing. Example:

git ls-tree -r --name-only current-hackage

thanks, I'll try that.