-
Notifications
You must be signed in to change notification settings - Fork 80
Description
The legacy importer is intended to take packages from the Bower, psc-package, and new-packages.json "registries" and package them for upload to the PureScript registry. It was originally meant to be a one-off script, which has instead morphed into a more than a thousand-line monster which has been taking care of daily uploads to the registry for several years now.
The basic idea of the legacy importer is that you can take a completely bare registry and registry-index, spin up the legacy importer, and finish with a fully-populated registry with storage, manifests, metadata, etc. using nothing but the list of package names to import. Along the way it has to do a lot of work to make this possible.
When #669 merges, though, we won't need to support this kind of "reupload the whole registry" anymore — since we'll be leaving alpha, in fact, we really can't do it anymore because it can result in changing the hashes of packages uploaded. Instead, we've included a new daily importer job which extracts only the parts of the legacy importer relevant to detect new tags on registered packages and attempt to publish them, by hitting the API with publish jobs. This can just as well be extracted from the registry-dev repo altogether and be put into a GitHub Action or something if we want. It's not core.
When the legacy importer ceases to exist we will also no longer need the associated scripts PackageDeleter or ArchiveSeeder. We also don't need the associated caching mechanisms.
Once the legacy importer no longer exists, only the following caches are relevant to uploading new packages or running matrix jobs: the registryCache and the storageCache. All the others can be torn out.