-
Notifications
You must be signed in to change notification settings - Fork 8
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 a way to override the default version of a tool #16
Comments
If this is just a short-term solution, then we can just hardcode the compiler version into the branch, so anyone on the As a longer-term solution we do have other options. For example, we could add "latest-unstable" in addition to "latest" which pulls in the release candidates, so folks could use that downstream. We could also add support to setup-purescript for SemVer ranges, so you could do something like Curious to hear what you think of both the short-term and long-term solutions available to us. |
I think I would definitely gravitate towards a long-term solution, as I think we'd have to go through this process with every new release of the PureScript compiler. Personally, my preference would be introducing a Does |
When the user supplies "latest" as their desired version for a tool, we look it up in the versions.json file (https://github.com/purescript-contrib/setup-purescript/blob/main/dist/versions.json). We do that rather than hit the GitHub API because otherwise we get rate limited by GitHub like one out of every 10 builds with setup-purescript. So I'd like to avoid using the API if we can. The versions.json file is really simple at the moment: it's just a mapping of a tool to its latest release. We could expand the file to be a mapping of a tool to its latest stable & unstable release, or go all-in and have the file contain a mapping of a tool to all its valid releases. That would also allow us to be smarter about things like version ranges, because we'd have all available versions already stored. The file is managed by the and gets executed once per day: to update the versions.json file with the latest information. |
This idea came to me while reading through purescript/purescript#3942, specifically the part about updating CI to use the
v0.14.0-rc2
tag:Thinking about how this would map onto GitHub Actions, the obvious thing to do would be to go through all of the
purescript-contrib
libraries and update theirci.yml
files to point to a specific tag:However, doing it this way seems like it would cause headaches if we get into the situation where a future release candidate is needed, as we would then have to go through all the libraries again to update the tag.
As an alternative solution, I'd like to propose creating a new branch (
purescript-0.14
, for example) for the PureScript v0.14.0 release. On this branch we'd reference whatever the latest v0.14.0 tag is as the default instead oflatest
.We can then update all of the
purescript-contrib
libraries to point to our separate branch:This way if we did end up having to go through multiple release candidates we could just bump the version of PureScript referenced on the
purescript-0.14
branch and all of the projects referencing that branch would then pull the correct version.In order to accomplish this it seems like we would need to add a way to override the default version of a tool that should be used if one is not provided by the consumer of the Action.
The text was updated successfully, but these errors were encountered: