You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Alpha and beta releases sort above the final release #58
ReleasesCollection::sortByVersion() ranks alpha and beta pre-releases above the final release of the same version. Sorting v2024.1.0-alpha.1, v2024.1.0, v2024.1.0-beta.1, v2024.1.0-rc.1 gives:
get-binary and download-protoc-binary install the first release of the sorted list that passes the stability filter. With --stability=beta (or lower) they pick the beta over the final release that is already out.
comparisonVersionString() replaces -<stability> with .<weight>.. v2024.1.0-beta.1 therefore compares as v2024.1.0.2..1, and version_compare() ranks it above v2024.1.0 because it has more numeric parts. Lower-case -rc tags are left untouched (the stability is RC), so they happen to sort correctly. Upper-case -RC tags have the same problem as beta and alpha. #2 was about the order among pre-releases.
One more consequence of the same comparisonVersionString() logic: lower-case -rc tags are left untouched while -beta is rewritten into extra numeric parts, so v3.5.0-beta.1 also ranks above v3.5.0-rc.1. With --stability=beta and both pre-releases published, rr get installs the older beta instead of the RC.
The acceptance tests in #66 cover it in VersionSelectionTest::prefersReleaseCandidateOverOlderBeta (skipped with a reference here). The lower-case --stability=rc part of that test is #67.
Activity
test: align tests with the RoadRunner v3 version handling
roxblnfk commentedon Oct 9, 2026
One more consequence of the same
comparisonVersionString()logic: lower-case-rctags are left untouched while-betais rewritten into extra numeric parts, sov3.5.0-beta.1also ranks abovev3.5.0-rc.1. With--stability=betaand both pre-releases published,rr getinstalls the older beta instead of the RC.The acceptance tests in #66 cover it in
VersionSelectionTest::prefersReleaseCandidateOverOlderBeta(skipped with a reference here). The lower-case--stability=rcpart of that test is #67.