-
Notifications
You must be signed in to change notification settings - Fork 16
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
Single version constraint does not allow prerelease #59
Comments
I somewhat agree that this is different from how I read https://semver.org/spec/v2.0.0-rc.1.html#spec-item-10 .
I don't think we should change how we interpret this. The spec does not really tell us anything else about "constraints" and what it means to "satisfy". We should probably document how our constraints work to avoid confusion. @jonasfj might have more opinion here :) |
It's unclear to me that semver specifies what a version range is. Pub uses semantic Versioning spec version 2.0.0-rc.1, which as far as I can read it provides a total ordering of all version numbers.
from https://semver.org/spec/v2.0.0-rc.1.html#spec-item-12
This is the closest to a formal specification of version ranges we have. I generally understand it as:
It's possible that we should distill this into a formal specification. But a long with the total precedence ordering from Paragraph 12 from Semantic Versioning version 2.0.0-rc.1, I think this is sound and reasonably unsurprising. If anything the documentation would probably benefit from more examples, rather than a formal specification. Regardless, my point would be that https://jubianchi.github.io/semver-check/#/ probably doesn't understand |
Big +1 for clarifying examples!
I think that whatever some tool is doing is besides the point that the quoted part of https://semver.org/spec/v2.0.0-rc.1.html#spec-item-10 could be interpreted as pre-release versions satisfying the constraints, and that is not what we do in pub_semver. We'd better clarify that in the pub_semver docs. (And actually I'm really curious what that sentence is supposed to mean if not exactly that). Fwiw. I don't think we should change our semantics, just the docs, and examples would be plenty good here. |
According to https://jubianchi.github.io/semver-check, the following is valid:
However, when I try this using
pub_semver
, I get that the prerelease version is not compatible with the constraint:The text was updated successfully, but these errors were encountered: