schemedoc / srfi-metadata

Import SRFI metadata into the Scheme API
https://docs.scheme.org/srfi/support/
MIT License
10 stars 2 forks source link

Release vs pre-release SRFI support #3

Closed lassik closed 3 years ago

lassik commented 4 years ago

It would probably be a good policy to advertise the SRFI support in the latest released version of each Scheme implementation. Though in practice many/most Schemes keep their pre-release versions very stable, most users will probably prefer the official release versions.

Then again, it might be useful to track the pre-release versions (i.e. git master) separately.

The current scrapers (.sh files in the listings directory) are unfortunately a mix of release and pre-release versions with no logic behind it.

erkin commented 4 years ago

I think pinning down versions would significantly complicate things. Going by 'whatever is on master branch right now' would be safer for the time being.

lassik commented 4 years ago

We could display the SRFIs that are only implemented in a pre-release version in a different shade of color. It doesn't really complicate things much - you just have to grep in two git refs instead of one :) [one ref being the master branch, and the other ref being the git tag corresponding to the latest release]

The thing is that casual users who install a Scheme implementation from an OS package manager (which is the easy thing to do) could be misled. It's true that package managers also ship different versions of Schemes, but that would be best remedied by helping them upgrade to the latest versions :)

lassik commented 4 years ago

I added some -head.scm versions into the listings directory next to the existing .scm files, which are now dedicated to the latest release versions.

There started to be a lot of duplication so I wrote a Scheme script listings.scm to generate the listings/*.sh scripts.

Commit 95f2554

lassik commented 4 years ago

The -head.scm ones are not yet read into the HTML table.

lassik commented 4 years ago

listings.scm has a table that says how to find the supported SRFIs for each Scheme implementation. Everything starts from here, the rest is just plumbing.

It's based on the assumption that all Schemes have an up-to-date GitHub repo. This is not currently the case. I'll look into establishing GitHub mirrors for all Schemes that are hosted elsewhere. For jobs like this, downloading the master.tar.gz archives auto-generated by the GitHub API is much more convenient than doing a git clone of the repo into a temp directory and poking around the file system.

We could download and grep the files in Scheme/Racket instead of shell, but I stayed with shell because it's faster to deal with. Scheme libraries for these tasks are not yet as convenient.

lassik commented 4 years ago

Downloading tar files and poking around in them currently looks like this in Racket: https://github.com/schemedoc/rnrs-metadata/blob/6afc3e9d16546963ffe2ab99a7c0e545bd84f41c/download.rkt Gauche is probably similar. This is way verbose compared to shell command lines; we've got some catching up to do :)

erkin commented 4 years ago

How about generating separate tables for the master branch and for the latest stable version?

erkin commented 3 years ago

I think this functionality is pretty much complete at this point. Thank you for your work!