-
-
Notifications
You must be signed in to change notification settings - Fork 255
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
Inconsistency with registry / RELEASE file and API #2248
Comments
Semantic version can only consist of three elements (https://semver.org/spec/v2.0.0.html). Everything else is wrong. |
@johnoliver thoughts on this? |
we discussed this at length, the current (not great) solution is the best without breaking the semver spec. There are not really any good ways to represent a java version as a semver without breaking the spec in someway. A suggested alternative would be to add the point number on to the semver metadata i.e The current choice does maintain ordering as |
Maybe my initial report is a bit cumbersome :) I'd like to clarify. I'm happy with current numbering scheme. What I'm asking about, is:
so all the three sources (API, The objective is to allow for my updater to read versions in similar formats, without having to figure how to compare As of (2), I assume it was a numbering issue that is solved by switching to |
Description of the inconsistency:
"semver": "11.0.9+101"
At the same time,
release
file for that release containsbut not
"semver": "11.0.9+101"
.For updater, this makes comparing versions more complicated (although not impossible), as there are no two fields that can be compared directly. The updater tool has to perform computations on its own, which is better to be avoided.
This may not seem like a major issue, but it may give wrong results in some exotic cases. And yes, I can parse
SEMANTIC_VERSION
and then compare standalone fields, if this fails, but I it is possible that new fields may be introduced, so I prefer to give control to API (by ordering byrevision/semver
) rather then trying to compute something on updater's side, which, ironically, may not always be the latest available updater (not everyone updates everything regularly).11.0.9+11.1
, the API had"semver": "11.0.9+11.1"
while the corresponding release file hadSEMANTIC_VERSION="11.0.9+11"
and MSI version was11.0.9.11
.Thus my updater will never be able to determine that locally installed version is "11.0.9+11.1", it will assume that the user has "11.0.9+11" and will always suggest to update until 11.0.9+12 or greater arrives. (adoptium/adoptium-support#209 (comment))
Proposed solution
SEMANTIC_VERSION="11.0.9.1+1"
intact inrelease
file, but introduce one more field, something likeAPI_SEMVERSION="11.0.9+101"
Computer\HKEY_LOCAL_MACHINE\SOFTWARE\AdoptOpenJDK\JRE\11.0.9.11\hotspot\MSI
, such asSEMANTIC_VERSION="11.0.9.1+1"
andAPI_SEMVERSION="11.0.9+101"
The text was updated successfully, but these errors were encountered: