-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Pub allows leading zeros in versions, semantic versioning does not #23425
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
Comments
I recall we had to add some special case support in the Dart code for pub to handle this, but I don't remember exactly why. I think support for leading zeroes may have initially been a bug in pub that we then had to deliberately support for backwards compatibility. Natalie might remember the details. If not, I can dig through the commit history. cc @nex3. |
For reasons I can get into further if you're curious, Pub supports semantic versioning 2.0.0-rc.1 (http://semver.org/spec/v2.0.0-rc.1.html), which has nothing in particular to say about leading zeros. The pub_semver package treats them as identical to versions without leading zeros, but will display them with the leading zeros. Can the server use the "display version" for linking? |
1 similar comment
For reasons I can get into further if you're curious, Pub supports semantic versioning 2.0.0-rc.1 (http://semver.org/spec/v2.0.0-rc.1.html), which has nothing in particular to say about leading zeros. The pub_semver package treats them as identical to versions without leading zeros, but will display them with the leading zeros. Can the server use the "display version" for linking? |
This issue has been moved to dart-lang/pub#20. |
Example:
browser_controller has version 0.00.2-dev
Semantic versioning says:
A normal version number MUST take the form X.Y.Z where X, Y, and Z are non-negative integers, and MUST NOT contain leading zeroes.
There is a discrepancy between the dart and python versions of pub.dartlang.org on how this is displayed and linked to (basically the python version will show 0.0.2, but link to 0.00.2, the dart version will show 0.00.2, but link to 0.0.2).
The text was updated successfully, but these errors were encountered: