ipm
ipm copied to clipboard
Version resolution is problematic with pre-release/maintenance versions
While branching HealthConnect 7.2.0-1.r1, whose dependencies are all with -1.r1 pre-release flag, it was noticed that the dependency graph builder does not correctly grab the -1.r1 prerelease version for its dependencies. After some investigation, it turns out to be a bug in semanticVersionExpression.Comparator class, and is addressed in HSIEO-10520.
However, this only fixes the issue for pre-release, and I believe the "+" sign, which was designed to be used for maintenance release, also have this issue; and since maintenance release version do not have a explicitly defined comparator like pre-release version, some different change might needed. It is also one of the reasons why HC started to use "-" for maintenance release since a few years ago.
We have HSIEO-10642 to track the maintenance version fix, but thought it might be better to have a github issue created for this. Ideally, we should use some third party version handler to deal with all IPM versions, so we do not need to work out the different types of versions' behaviors outselves.
IMO using different versions with + to distinguish releases with a meaningful order of precedence is bad and goes against the semver spec, and the solution is to actually follow semantic versioning properly (bugfixes are a patch version bump and assumed always safe to pick up).
That's probably oversimplifying things though, and there should probably be a broader conversation about this that happens purely internally.
I believe the needs here have been addressed between #557 and other recent discussions. (Plus some upcoming discussions about internal processes.)