-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Prerelease support was not added in #3 due to identifying additional requirements for this feature.
One issue is that the input include-all-prereleases
does not let us specify on a per-version specifier which ones should allow prereleases.
Addtionally, the pre
alias which is supported by setup-julia
is problematic over the long term. Say we were to use pre
this action a user may want to use ["1", "pre"]
to attempt to indicate they want to test against the latest v1 release and latest v1 prerelease of Julia. Supposing that the latest version of Julia was 1.11.0
then ["1.11.0"]
would be returned while if the latest version was 1.12.0-alpha
then ["1.11.0", "1.12.0-alpha"]
. The problem occurs when the latest version is say 2.0.0-alpha
. Then the returned versions are ["1.11.0", "2.0.0-alpha"]
which is not what the user intended.
The solution to both of these problems is to have a syntax for version specifiers which states that a specifier supports prereleases. The NPM semver package does have some prerelease support within specifiers when you use the ^X.Y.Z-0
syntax but doesn't support ^X.Y-0
, ^X-0
, ~X.Y-0
, or X.Y.Z-0
(there may be more). Even the support that does exist is a bit weird:
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "2.0.0"], "^1.0.0-0") // Odd
'1.0.0'
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "2.0.0"], "^1.1.0-0")
'1.1.0-beta'
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "1.2.0", "2.0.0"], "^1.0.0-0")
'1.2.0'
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "1.2.0", "2.0.0"], "^1.1.0-0")
'1.2.0'
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "2.0.0"], "~1.0.0-0")
'1.0.0'
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "2.0.0"], "~1.1.0-0")
'1.1.0-beta'
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "1.2.0", "2.0.0"], "~1.0.0-0")
'1.0.0'
> semver.maxSatisfying(["1.0.0", "1.1.0-beta", "1.2.0", "2.0.0"], "~1.1.0-0")
'1.1.0-beta'
Finally, Julia uses the syntax v"1-"
for the lowest version of 1.0.0
including all prereleases so we may want to adopt that syntax here as well.
Alias "pre" should only return a version on prereleases and not official versions (Punted)
Possibly alias "min" should be ignored when no Julia compat entry exists
Drop include-all-prereleases input in favor of Julia style trailing - (Punted)