{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/corefx/issues/13526","repository_url":"https://api.github.com/repos/dotnet/corefx","labels_url":"https://api.github.com/repos/dotnet/corefx/issues/13526/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/corefx/issues/13526/comments","events_url":"https://api.github.com/repos/dotnet/corefx/issues/13526/events","html_url":"https://github.com/dotnet/corefx/issues/13526","id":188341116,"number":13526,"title":"Proposal: Adding System.SemanticVersion","user":{"login":"NickCraver","id":454813,"avatar_url":"https://avatars.githubusercontent.com/u/454813?v=3","gravatar_id":"","url":"https://api.github.com/users/NickCraver","html_url":"https://github.com/NickCraver","followers_url":"https://api.github.com/users/NickCraver/followers","following_url":"https://api.github.com/users/NickCraver/following{/other_user}","gists_url":"https://api.github.com/users/NickCraver/gists{/gist_id}","starred_url":"https://api.github.com/users/NickCraver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickCraver/subscriptions","organizations_url":"https://api.github.com/users/NickCraver/orgs","repos_url":"https://api.github.com/users/NickCraver/repos","events_url":"https://api.github.com/users/NickCraver/events{/privacy}","received_events_url":"https://api.github.com/users/NickCraver/received_events","type":"User","site_admin":false},"labels":[{"id":153714228,"url":"https://api.github.com/repos/dotnet/corefx/labels/api-needs-work","name":"api-needs-work","color":"207de5","default":false},{"id":174276033,"url":"https://api.github.com/repos/dotnet/corefx/labels/area-System.Runtime","name":"area-System.Runtime","color":"d4c5f9","default":false},{"id":145399958,"url":"https://api.github.com/repos/dotnet/corefx/labels/up%20for%20grabs","name":"up for grabs","color":"159818","default":false}],"state":"open","locked":false,"assignee":{"login":"NickCraver","id":454813,"avatar_url":"https://avatars.githubusercontent.com/u/454813?v=3","gravatar_id":"","url":"https://api.github.com/users/NickCraver","html_url":"https://github.com/NickCraver","followers_url":"https://api.github.com/users/NickCraver/followers","following_url":"https://api.github.com/users/NickCraver/following{/other_user}","gists_url":"https://api.github.com/users/NickCraver/gists{/gist_id}","starred_url":"https://api.github.com/users/NickCraver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickCraver/subscriptions","organizations_url":"https://api.github.com/users/NickCraver/orgs","repos_url":"https://api.github.com/users/NickCraver/repos","events_url":"https://api.github.com/users/NickCraver/events{/privacy}","received_events_url":"https://api.github.com/users/NickCraver/received_events","type":"User","site_admin":false},"assignees":[{"login":"NickCraver","id":454813,"avatar_url":"https://avatars.githubusercontent.com/u/454813?v=3","gravatar_id":"","url":"https://api.github.com/users/NickCraver","html_url":"https://github.com/NickCraver","followers_url":"https://api.github.com/users/NickCraver/followers","following_url":"https://api.github.com/users/NickCraver/following{/other_user}","gists_url":"https://api.github.com/users/NickCraver/gists{/gist_id}","starred_url":"https://api.github.com/users/NickCraver/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NickCraver/subscriptions","organizations_url":"https://api.github.com/users/NickCraver/orgs","repos_url":"https://api.github.com/users/NickCraver/repos","events_url":"https://api.github.com/users/NickCraver/events{/privacy}","received_events_url":"https://api.github.com/users/NickCraver/received_events","type":"User","site_admin":false}],"milestone":null,"comments":26,"created_at":"2016-11-09T20:12:03Z","updated_at":"2016-12-02T19:08:25Z","closed_at":null,"body":"One of the issues I keep running into with the \"default open\" world: prereleases. As more and more projects move to semantic versioning, it'd be nice to have a built-in type to handle these. Today, this fails:\r\n\r\n```C#\r\nVersion.Parse(\"1.0.0-beta1\");\r\n```\r\nBecause [`System.Version`](https://msdn.microsoft.com/en-us/library/system.version_properties.aspx) has no concept of pre-release suffixes. I'm not arguing it should be added (that's maybe a little to breaking). \r\n\r\nInstead how about a new type? `System.SemanticVersion` The *main* property most people would be interested in is the prerelease label, but other tenants of semantic versioning should be included. Comparisons being a big one. A lot of devs get this wrong on corner cases. I was looking for how to do best structure this and noticed: NuGet is already doing it. Here's their `SemanticVersion` class: ([part 1](https://github.com/NuGet/NuGet.Client/blob/4cccb13833ad29d6a0bcff055460d964f1b49cfe/src/NuGet.Core/NuGet.Versioning/SemanticVersion.cs), [part2](https://github.com/NuGet/NuGet.Client/blob/4cccb13833ad29d6a0bcff055460d964f1b49cfe/src/NuGet.Core/NuGet.Versioning/SemanticVersionBase.cs)).\r\n\r\nThe API likely needs a little refinement for general use in the BCL, but is there a desire for this from others? I have use cases from parsing package versions to determining which version of Elasticsearch a client is connected to. There's a broad spectrum of semantic versioning use cases now.\r\n\r\nSuggestions from others (collating here):  \r\n- It should be comparable to `Version` (additional operator overloads)"},"comment":{"url":"https://api.github.com/repos/dotnet/corefx/issues/comments/264535998","html_url":"https://github.com/dotnet/corefx/issues/13526#issuecomment-264535998","issue_url":"https://api.github.com/repos/dotnet/corefx/issues/13526","id":264535998,"user":{"login":"vcsjones","id":361677,"avatar_url":"https://avatars.githubusercontent.com/u/361677?v=3","gravatar_id":"","url":"https://api.github.com/users/vcsjones","html_url":"https://github.com/vcsjones","followers_url":"https://api.github.com/users/vcsjones/followers","following_url":"https://api.github.com/users/vcsjones/following{/other_user}","gists_url":"https://api.github.com/users/vcsjones/gists{/gist_id}","starred_url":"https://api.github.com/users/vcsjones/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vcsjones/subscriptions","organizations_url":"https://api.github.com/users/vcsjones/orgs","repos_url":"https://api.github.com/users/vcsjones/repos","events_url":"https://api.github.com/users/vcsjones/events{/privacy}","received_events_url":"https://api.github.com/users/vcsjones/received_events","type":"User","site_admin":false},"created_at":"2016-12-02T19:08:25Z","updated_at":"2016-12-02T19:08:25Z","body":"Another question:\r\n\r\nSemVer does not have 4 components in its version number, it has `major`, `minor`, `patch`. However, this API proposal allows creating an instance from a `Version`, either by cast or through the constructor. There are also constructor overloads that accept `revision`. However, it isn't exposed as a property like the other components?\r\n\r\nWhat is the purpose of this 4th component? Are we just ignoring it? If so, then @sharwell's suggestion of an implicit case is a no-go since the 4th component is ignored. If we aren't ignoring it, are we OK deviating from the SemVer spec?"}}
{"actor":{"display_login":"vcsjones"}}