purescript / registry-dev

Development work related to the PureScript Registry
https://github.com/purescript/registry
97 stars 80 forks source link

Add `pursVersions` CLI script #630

Closed colinwahl closed 1 year ago

colinwahl commented 1 year ago

To support https://github.com/purescript/registry-dev/issues/255 we need to know the full list of compilers that the registry supports.

628 added a script we can run to fetch all supported versions of the purs executable.

This PR adds the Registry.App.CLI.PursVersions module, which can be used to call that script within the registry codebase.

Errors are handled in the following way:

I've added a test that makes sure the output of this utility matches what we expect it to be. This means that when a new compiler version is released and purescript-overlay is updated, registry things will start failing until the new version is added to the snapshot. I've discussed this with @thomashoneyman and we think that behavior is desired, as it allows us to make sure we are supporting the full set of compiler versions we expect, without having to hard code them anywhere in registry app code.