Skip to content
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

Package Manager should not throw errors incorrectly on valid semantic versions #531

Open
isc-kiyer opened this issue Jul 30, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@isc-kiyer
Copy link
Collaborator

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 isc-kiyer added the bug Something isn't working label Jul 30, 2024
@isc-shuliu isc-shuliu self-assigned this Sep 13, 2024
@isc-shuliu
Copy link
Collaborator

@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"
+-----------------------------------------------------

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: In progress
Development

No branches or pull requests

2 participants