Skip to content

Produce a graph of package versions and their dependencies from the registry index #214

@thomashoneyman

Description

@thomashoneyman

The registry contains a registry index, which is a list of all packages in the registry along with their manifests (which themselves include information about dependencies, licenses, and so on):

https://github.com/purescript/registry/blob/3f5c48e518f657ab03c4178df976648c9fb1437f/ci/src/Registry/Index.purs#L24

In order to upload a new registry index as part of our pipeline, we need to be able to order packages at specific versions by their dependencies, so that we only upload packages that already have all their dependencies present (at correct versions) in the registry. That way the registry index is always correct.

I'm proposing we implement a function:

toVersionsGraph :: RegistryIndex -> PackageVersionsGraph

where a PackageVersionsGraph contains every package version in the registry, and we can order it topologically:

toOrderedArray :: PackageVersionsGraph -> Array Manifest

...so as to walk through each package version in order and upload it to the registry index.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions