mirror of
https://github.com/semver/semver.git
synced 2026-07-10 19:50:47 -05:00
[GH-ISSUE #364] What is the maximum version number size (ie unsigned integer, signed long?) #5388
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @agentgt on GitHub (Apr 13, 2017).
Original GitHub issue: https://github.com/semver/semver/issues/364
It is unclear what exactly an integer is in terms of parsing and storage. I would assume the maximum would be a signed integer: 2^31 = 2147483648 but since negative numbers are not allowed other parsers may assume otherwise.
@zafarkhaja commented on GitHub (Apr 13, 2017):
Seems like a duplicate of #304.
@jwdonahue commented on GitHub (Oct 11, 2018):
@agentgt wrote
First, only non-negative-integers (unsigned integers) are referenced in the spec. It would have been better to state it as positive integers, but either way, it's strongly defined in mathematics. The spec deliberately and rightly avoids implementation details such as which programming language to use or which data types. From an engineering perspective however, I think it would be absurd to use any kind of signed data types for the numeric fields.
Tool chain writers will think hard about their design choices or they will fail.
Please close this issue at your earliest possible convenience.
@agentgt commented on GitHub (Oct 11, 2018):
I'm fine with closing it. I don't really care that much and IIRC the issue I had was third party library decided to use a date for a version and the implementation failed because it was using Java 32 bit int (I think it was Java... it might have been python..).
So yeah I agree its the onus of the library to work correctly but some sort of max version length would be a good thing vs data types (and I believe somewhere there was talks of putting that in?).