flora-pm / flora-server

A package index for the Haskell ecosystem
https://flora.pm/about
Other
123 stars 38 forks source link

[FLORA-414] Store archive hashes #560

Closed tchoutri closed 3 weeks ago

tchoutri commented 3 weeks ago

Proposed changes

The astute reader will notice that an IORef is used. It is because when we read the tarball, we encounter the JSON file of a release before the cabal file. As such, the release is not yet present in the database, so we store it in memory until we encounter the cabal file. Then we collect the hash and delete it from the in-memory map.

Contributor checklist