Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add pursVersions CLI script #630

Merged
merged 3 commits into from
Jul 19, 2023
Merged

Add pursVersions CLI script #630

merged 3 commits into from
Jul 19, 2023

Conversation

colinwahl
Copy link
Collaborator

@colinwahl colinwahl commented Jul 19, 2023

To support #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:

  • An error that occurs calling purs-versions is thrown
  • An error is thrown with all output of purs-version which fail to parse
  • An error is thrown if the output of purs-versions is empty

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.

@thomashoneyman thomashoneyman merged commit a99f487 into master Jul 19, 2023
@thomashoneyman thomashoneyman deleted the colin/purs-versions-cli branch July 19, 2023 23:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants