-
Notifications
You must be signed in to change notification settings - Fork 7
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
Respect "use for snapshots" and "use for prereleases" #91
Comments
I'm pretty sure it was not implemented, at all, for the registry. And I think, best way to implement it, on both sides |
I'm hoping to carve out some more time this month for open source projects - can possibly contribute on both ends. |
@isc-tleavitt zpm-registry/src/cls/ZPM/Package.cls Lines 52 to 60 in f7e4087
Any chance that we actually want this part to be |
@isc-shuliu the Semantic Versioning spec places prerelease designations before build metadata, so a semver that has + before - is invalid. |
I think this is time to define snapshots correctly: if versionPrerelease is SNAPSHOT, it's a snapshot. if versionPrerelease is something else non-null, it's a prerelease. |
Previously we've had some use of build metadata "+snapshot" treated specially, but if we're adding new repo-level support around snapshots this is the way to go. |
@isc-tleavitt Set version = ##class(%IPM.General.SemanticVersion).FromString("2.0.0-SNAPSHOT")
Do ##class(%IPM.General.SemanticVersionExpression).FromString("1.x", .expression)
Write version.Satisfies(expression)
// Output: 1 |
@isc-shuliu that feels like a bug on the IPM end. |
In
It appears this is expected behavior |
Assuming we consider |
That's what 1.x means, but this actually boils down to some meaningful changes in the node-semver spec we used as an original basis; see: npm/node-semver@059a5ad. Need a fix in IPM for this - I'll create an issue there. It's a good catch. |
@isc-tleavitt |
Just did but it looks like you figured it out faster than I could. |
Not sure if this is here, zpm, or both, but I suspect it's here.
If I disable "Use for Snapshots" and/or "Use for Prereleases" - e.g.:
Snapshot and prerelease versions are still listed (
zpm "repo -list-modules"
) and installed (viazpm "install"
).The text was updated successfully, but these errors were encountered: