{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/1355","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/1355/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/1355/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/1355/events","html_url":"https://github.com/dart-lang/pub/issues/1355","id":114336583,"number":1355,"title":"Unclear why user can't install specific package version","user":{"login":"sethladd","id":5479,"avatar_url":"https://avatars.githubusercontent.com/u/5479?v=3","gravatar_id":"","url":"https://api.github.com/users/sethladd","html_url":"https://github.com/sethladd","followers_url":"https://api.github.com/users/sethladd/followers","following_url":"https://api.github.com/users/sethladd/following{/other_user}","gists_url":"https://api.github.com/users/sethladd/gists{/gist_id}","starred_url":"https://api.github.com/users/sethladd/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sethladd/subscriptions","organizations_url":"https://api.github.com/users/sethladd/orgs","repos_url":"https://api.github.com/users/sethladd/repos","events_url":"https://api.github.com/users/sethladd/events{/privacy}","received_events_url":"https://api.github.com/users/sethladd/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/pub/labels/duplicate","name":"duplicate","color":"cccccc"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-10-30T19:13:31Z","updated_at":"2015-10-30T21:03:31Z","closed_at":"2015-10-30T20:29:52Z","body":"Hi, filing this on behalf of a few users that ran into this yesterday in our hackathon (and coincidentally, engineers not at the hackathon).\r\n\r\nConsider this scenario:\r\n\r\n* I have dart SDK 1.13.0-dev.4 installed\r\n* A version of sky_tools 0.0.30 exists in pub.dartlang.org: https://pub.dartlang.org/packages/sky_tools\r\n* My pubspec.yaml explicitly says I have a dependency on \"sky_tools: 0.0.30\"\r\n* I run `pub get`\r\n\r\nHere's the output:\r\n\r\n```\r\n~/tmp/test2 $ pub get\r\nResolving dependencies... (1.0s) \r\nPackage sky_tools has no versions that match 0.0.30 derived from:\r\n- test2 depends on version 0.0.30\r\n```\r\n\r\nThis was a real stumper for our users. Notice how pub says \"no versions match 0.0.30\" which is really weird because pub.dartlang.org clearly says there is a 0.0.30 that exists.\r\n\r\nAfter a lot of debugging, turns out, that sky_tools has an SDK constraint:\r\n\r\n```\r\n\"environment\": {\r\n        \"sdk\": \">=1.13.0-dev.7.4 <2.0.0\"\r\n      },\r\n```\r\n\r\nAh ha! That explains it. :)\r\n\r\nThe feedback I received was \"pub isn't telling me that my SDK is too new/old for the version of the package that I want, and the feedback is confusing because 0.0.30 does exists\"\r\n\r\n(FWIW we also ran with `pub --verbose get` and tried to look for a signal that the SDK version and constraint was the issue, but we didn't find that hint)\r\n\r\nMay we ask for more explanation when pub isn't able to install a specific version of a package because of an SDK constraint? That would be a big help, as we help our developers stay updated in our fast-moving world.\r\n\r\nThanks!\r\n"},"comment":{"url":"https://api.github.com/repos/dart-lang/pub/issues/comments/152650611","html_url":"https://github.com/dart-lang/pub/issues/1355#issuecomment-152650611","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/1355","id":152650611,"user":{"login":"nex3","id":188,"avatar_url":"https://avatars.githubusercontent.com/u/188?v=3","gravatar_id":"","url":"https://api.github.com/users/nex3","html_url":"https://github.com/nex3","followers_url":"https://api.github.com/users/nex3/followers","following_url":"https://api.github.com/users/nex3/following{/other_user}","gists_url":"https://api.github.com/users/nex3/gists{/gist_id}","starred_url":"https://api.github.com/users/nex3/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nex3/subscriptions","organizations_url":"https://api.github.com/users/nex3/orgs","repos_url":"https://api.github.com/users/nex3/repos","events_url":"https://api.github.com/users/nex3/events{/privacy}","received_events_url":"https://api.github.com/users/nex3/received_events","type":"User","site_admin":false},"created_at":"2015-10-30T21:03:30Z","updated_at":"2015-10-30T21:03:30Z","body":"This isn't something that's likely to be solvable incrementally. Because it works on such a difficult problem, the version solver is quite complicated and would probably require another substantial refactor to get the information we want out of it. I have some ideas for this refactor that I think are promising, but it'll probably take at least a month of dedicated work to get it in place, and that time hasn't been budgeted.\r\n\r\nI'm happy to do that work. I agree this is a serious issue that needs to be addressed. But over the past couple quarters it's been lower-priority than a number of other long-term issues. If I make enough progress on the test package in Q4, I'll talk to Dan about getting this into my OKRs for Q1."}}