{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/1335","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/1335/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/1335/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/1335/events","html_url":"https://github.com/dart-lang/pub/pull/1335","id":107446875,"number":1335,"title":"Add github version range support","user":{"login":"computmaxer","id":1882730,"avatar_url":"https://avatars.githubusercontent.com/u/1882730?v=3","gravatar_id":"","url":"https://api.github.com/users/computmaxer","html_url":"https://github.com/computmaxer","followers_url":"https://api.github.com/users/computmaxer/followers","following_url":"https://api.github.com/users/computmaxer/following{/other_user}","gists_url":"https://api.github.com/users/computmaxer/gists{/gist_id}","starred_url":"https://api.github.com/users/computmaxer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/computmaxer/subscriptions","organizations_url":"https://api.github.com/users/computmaxer/orgs","repos_url":"https://api.github.com/users/computmaxer/repos","events_url":"https://api.github.com/users/computmaxer/events{/privacy}","received_events_url":"https://api.github.com/users/computmaxer/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2015-09-21T05:31:20Z","updated_at":"2015-12-09T18:42:51Z","closed_at":"2015-11-24T01:55:21Z","pull_request":{"url":"https://api.github.com/repos/dart-lang/pub/pulls/1335","html_url":"https://github.com/dart-lang/pub/pull/1335","diff_url":"https://github.com/dart-lang/pub/pull/1335.diff","patch_url":"https://github.com/dart-lang/pub/pull/1335.patch"},"body":"_I know this is not the proper way to submit contributions, but I want to get feedback from dart-lang folks and make sure it is something that could potentially be accepted before I spend any more time on this._\r\n\r\nThis is a fix for #1250. I work for Workiva (met some of you at the Dart Summit!) and we now have quite a few dart libraries in our Github organization. Some of these are public and OSS, but many of them cannot be. #1250 is a big issue for us for the private libraries as it requires us to update pubspecs all over the place anytime a patch version of some library is released, and consumers end up having a big list of dependency overrides while those transitions are in progress.\r\n\r\nThis PR implements version ranges for github dependencies with the following in a `pubspec.yaml`:\r\n\r\n```yaml\r\ndependencies:\r\n  w_flux:\r\n    version: \"^1.0.0\"\r\n    git: git@github.com:Workiva/w_flux.git\r\n```\r\n\r\nIt assumes that versions will exist as git tags on the repo, and uses `git tag -l` to list the tags. It then collects a list of the tags that are considered valid version strings using `Version.parse()`. \r\n\r\nThe biggest issue I have had so far is dealing with git tags that include the \"v\" in the name, i.e. \"v1.0.0\". I can strip the \"v\" before giving it to the version solver, but then when it tries to get the ref (`_getRef`) it of course cannot find it without the \"v\" that was previously removed. At Workiva we do not use the preceding \"v\" in our tag names, but it seems like many people do so I am assuming this will be a big issue for this feature.\r\n\r\nIt seems like it would be possible for the Version class to accept \"v\" versions strings in its `parse` constructor, and keep track of it so that it can put it back when `toString()` is called. This would require a change to pub_semver, though.\r\n\r\nI'm hoping to get some feedback from the Dart team on whether or not we should continue down this path. Please let me know your thoughts! \r\n\r\n@nex3 @kevmoo @munificent"},"comment":{"url":"https://api.github.com/repos/dart-lang/pub/issues/comments/163353442","html_url":"https://github.com/dart-lang/pub/pull/1335#issuecomment-163353442","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/1335","id":163353442,"user":{"login":"travissanderson-wf","id":1561330,"avatar_url":"https://avatars.githubusercontent.com/u/1561330?v=3","gravatar_id":"","url":"https://api.github.com/users/travissanderson-wf","html_url":"https://github.com/travissanderson-wf","followers_url":"https://api.github.com/users/travissanderson-wf/followers","following_url":"https://api.github.com/users/travissanderson-wf/following{/other_user}","gists_url":"https://api.github.com/users/travissanderson-wf/gists{/gist_id}","starred_url":"https://api.github.com/users/travissanderson-wf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/travissanderson-wf/subscriptions","organizations_url":"https://api.github.com/users/travissanderson-wf/orgs","repos_url":"https://api.github.com/users/travissanderson-wf/repos","events_url":"https://api.github.com/users/travissanderson-wf/events{/privacy}","received_events_url":"https://api.github.com/users/travissanderson-wf/received_events","type":"User","site_admin":false},"created_at":"2015-12-09T18:42:51Z","updated_at":"2015-12-09T18:42:51Z","body":"@kevmoo @nex3 I already gave @computmaxer and his team breakfast pizza to thank him for getting this fixed for us, as you know that is a morally binding contract so he is feeling a lot of heat right now since we still can't use version ranges on github dependencies :)"}}