ipm
ipm copied to clipboard
Package Manager should not throw errors incorrectly on valid semantic versions
The package manager incorrectly throws errors on a semantic version like the following:
2.1.0-1m1
This had to be tweaked to 2.1.0-1.m1 for the package manager to consider it valid. However, such a version is valid as per semver: https://semver.org/.
The bug is is %IPM.General.SemanticVersion:%OnValidateObject().
The logic there should probably be re-written entirely to validate simply against a regular expression.
@isc-kiyer This bug seems to have been fixed already. On v1-next, I did the following successfully
USER>set ver = ##class(%IPM.General.SemanticVersion).FromString("2.1.0-1m1")
USER>zw ver
ver=54@%IPM.General.SemanticVersion ; <OREF>
+----------------- general information ---------------
| oref value: 54
| class name: %IPM.General.SemanticVersion
| reference count: 2
+----------------- attribute values ------------------
| Build = ""
| Major = 2
| Minor = 1
| Patch = 0
| Prerelease = "1m1"
+-----------------------------------------------------
Verified once again that this works on v1 and v1-next. Closing for now.