mirror of
https://github.com/semver/semver.git
synced 2026-07-10 19:50:47 -05:00
[GH-ISSUE #306] Problem with plus sign + in semantic version - use web safe underscore _ instead. #2935
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 @mkboel on GitHub (May 3, 2016).
Original GitHub issue: https://github.com/semver/semver/issues/306
Example: "0.2.0+Metadata" is web unsafe, and is translated to "0.2.0 Metadata" by many web tools.
Many tools use web related url's to refer to versions, but the plus sign + is translated to a space. You should allow a web safe character as delimiter between version and metadata info. Safe characters could be hyphen, underscore, or tilde.
I suggest sematic versioning use underscore _ as an valid metadata delimiter.
Example "0.2.0_Metadata"
@FichteFoll commented on GitHub (May 3, 2016):
The solution is to use
%2Bin urls, as any url-escaping function does.@crazedsanity commented on GitHub (May 3, 2016):
I agree with @FichteFoll. It might not seem fair, but going down this road (changing the format to accomodate URL-friendly characters) would pave the way for things like "removing the periods, because those have to be escaped in regular expressions" (which is just a fact of life).
@mkboel, you could create an "extension" of SemVer that swaps
+for_.@benmarten commented on GitHub (May 4, 2017):
We are seeing issues with the plus sign with CocoaPods and with Gradle. It leads to unpredictable builds because they interpret plus sign as anything.
2.0.0-SNAPSHOT+1493919587would lead to any snapshot2.0.0-SNAPSHOT*we replaced it with a dot a such:
2.0.0-SNAPSHOT.1493919587@efunkenbusch commented on GitHub (Aug 14, 2018):
@benmarten And that would be correct. Metadata is not taken into account at all in precedence, and thus two versions that differ only by metadata would be considered identical.
@jwdonahue commented on GitHub (Oct 8, 2018):
@mkboel, unless you have further questions/comments or intend to issue PR, please close this issue at your earliest possible convenience.
@mkboel commented on GitHub (Apr 15, 2020):
My solution was to stop using the plus sign. And hereby stop using correct
semver. Works like a charm anyway...
tir. d. 14. apr. 2020 19.34 skrev Pavel Erokhin notifications@github.com:
@MairwunNx commented on GitHub (Apr 15, 2020):
@mkboel thanks