purescript / registry-dev

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

Add purs-versions script to list supported registry versions #628

Closed thomashoneyman closed 1 year ago

thomashoneyman commented 1 year ago

To support #255 we need to know the full list of compilers that the registry supports. The registry supports whatever the compilers attrset in the flake.nix is, and that in turn comes from the purescript-overlay repository, which seeks to support all compilers from 0.13.0 onwards.

This PR adds a script named purs-versions that, when called, will spit out all the compilers supported by the registry separated by spaces. For example:

λ purs-versions
0.13.0 0.13.2 0.13.3 0.13.4 0.13.5 0.13.6 0.13.8 0.14.0 0.14.1 0.14.2 0.14.3 0.14.4 0.14.5 0.14.6 0.14.7 0.14.8 0.14.9 0.15.0 0.15.10 0.15.2 0.15.3 0.15.4 0.15.5 0.15.6 0.15.7 0.15.9

Note: the output is sorted by the string keys seen here, which is not suitable to order by versions because (for example) a string "0.15.10" is considered greater than "0.15.1" but less than "0.15.2", which is obviously incorrect as far as SemVer goes. So anyone consuming this should parse these strings into actual Versions and sort them, if they need a sorted order.