{"action":"created","issue":{"url":"https://api.github.com/repos/golang/dep/issues/1033","repository_url":"https://api.github.com/repos/golang/dep","labels_url":"https://api.github.com/repos/golang/dep/issues/1033/labels{/name}","comments_url":"https://api.github.com/repos/golang/dep/issues/1033/comments","events_url":"https://api.github.com/repos/golang/dep/issues/1033/events","html_url":"https://github.com/golang/dep/issues/1033","id":251251502,"number":1033,"title":"Version string confusion for 0-versions","user":{"login":"jsageryd","id":48153,"avatar_url":"https://avatars0.githubusercontent.com/u/48153?v=4","gravatar_id":"","url":"https://api.github.com/users/jsageryd","html_url":"https://github.com/jsageryd","followers_url":"https://api.github.com/users/jsageryd/followers","following_url":"https://api.github.com/users/jsageryd/following{/other_user}","gists_url":"https://api.github.com/users/jsageryd/gists{/gist_id}","starred_url":"https://api.github.com/users/jsageryd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsageryd/subscriptions","organizations_url":"https://api.github.com/users/jsageryd/orgs","repos_url":"https://api.github.com/users/jsageryd/repos","events_url":"https://api.github.com/users/jsageryd/events{/privacy}","received_events_url":"https://api.github.com/users/jsageryd/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-08-18T13:50:50Z","updated_at":"2017-08-18T14:06:28Z","closed_at":null,"body":"Reading the section on [Semantic Versioning](https://github.com/golang/dep#semantic-versioning) in the project readme, it seems the description (a) is in conflict with the examples (b) in that `0`-versions seem to be treated differently.\r\n\r\n(a)\r\n> Note: When you specify a version without an operator, dep automatically uses the ^ operator by default.\r\n\r\n(b)\r\n> * 1.2.3 becomes the range >=1.2.3, <2.0.0\r\n> * 0.2.3 becomes the range >=0.2.3, <0.3.0\r\n> * 0.0.3 becomes the range >=0.0.3, <0.1.0\r\n\r\nFollowing (a), a constraint`\"0.2.0\"` would be equivalent to `\"^0.2.0\"`, yet `dep` will not, as it seems, fetch a version `0.3.0`. Digging deeper,\r\n\r\n> Refer to the [semver library](https://github.com/Masterminds/semver) documentation for more info.\r\n\r\nhttps://play.golang.org/p/BB934lUCEj\r\n\r\nThe semver library seems to accept `0.3.0` as valid for the constraint `^0.2.0`.\r\n\r\nIf `dep` behaves as intended in that it does not accept `0.3.0` for a version string saying `\"0.2.0\"`, it would be helpful if the documentation could explain this in more detail.\r\n\r\nVersions:\r\n* Go `go version go1.9rc2 darwin/amd64`\r\n* `dep` `v0.3.0-142-g6ca8a48`"},"comment":{"url":"https://api.github.com/repos/golang/dep/issues/comments/323363263","html_url":"https://github.com/golang/dep/issues/1033#issuecomment-323363263","issue_url":"https://api.github.com/repos/golang/dep/issues/1033","id":323363263,"user":{"login":"jsageryd","id":48153,"avatar_url":"https://avatars0.githubusercontent.com/u/48153?v=4","gravatar_id":"","url":"https://api.github.com/users/jsageryd","html_url":"https://github.com/jsageryd","followers_url":"https://api.github.com/users/jsageryd/followers","following_url":"https://api.github.com/users/jsageryd/following{/other_user}","gists_url":"https://api.github.com/users/jsageryd/gists{/gist_id}","starred_url":"https://api.github.com/users/jsageryd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jsageryd/subscriptions","organizations_url":"https://api.github.com/users/jsageryd/orgs","repos_url":"https://api.github.com/users/jsageryd/repos","events_url":"https://api.github.com/users/jsageryd/events{/privacy}","received_events_url":"https://api.github.com/users/jsageryd/received_events","type":"User","site_admin":false},"created_at":"2017-08-18T14:06:28Z","updated_at":"2017-08-18T14:06:28Z","body":"As pointed out by @sdboyer in `#vendor` on Slack at `2017-08-18T13:56:54Z`, `dep` is using `NewConstraintIC` on the `2.x` branch of the semver library, which treats versions below `1.0.0` differently.\r\n\r\nUpdated example to illustrate: https://play.golang.org/p/zZcvI_2bCO\r\n\r\nIt would perhaps still be of use to clarify the docs to explain this more clearly."}}
{"actor":{"display_login":"jsageryd"}}