{"action":"created","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/152","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/152/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/152/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/152/events","html_url":"https://github.com/dart-lang/pub/issues/152","id":85641950,"number":152,"title":"Better reporting for pubspec errors","user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/dart-lang/pub/labels/enhancement","name":"enhancement","color":"84b6eb"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/NotPlanned","name":"NotPlanned","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/Priority-Medium","name":"Priority-Medium","color":"ededed"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-06-05T21:59:48Z","updated_at":"2015-06-05T21:59:49Z","closed_at":null,"body":"<a href=\"https://github.com/nex3\"><img src=\"https://avatars.githubusercontent.com/u/188?v=3\" align=\"left\" width=\"96\" height=\"96\"hspace=\"10\"></img></a> **Issue by [nex3](https://github.com/nex3)**\n_Originally opened as dart-lang/sdk#5418_\n\n----\n\nMalformed pubspecs could stand to have better error reports. Some examples identified by dgrove:\n\n&nbsp;&nbsp;&nbsp;&nbsp;name: map\n&nbsp;&nbsp;&nbsp;&nbsp;dependencies:\n&nbsp;&nbsp;&nbsp;&nbsp;js-interop:\n&nbsp;&nbsp;&nbsp;&nbsp;git: https://github.com/dart-lang/js-interop.git\n\n&nbsp;&nbsp;&nbsp;&nbsp;name: map\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dependencies:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;js-interop:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;git: https://github.com/dart-lang/js-interop.git\n\n&nbsp;&nbsp;&nbsp;&nbsp;name: map\n&nbsp;&nbsp;&nbsp;&nbsp;dependencies:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;js_interop:\n&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;git: https://github.com/dart-lang/js-interop.git\n\nIt's not really possible for Pub to figure out exactly what the user intended in all of these examples, but at least including source span information for all the errors would be useful. This probably means that the YAML parser needs to track and expose more metadata than it does right now.\n\nThe error messages themselves should also provide more contextual information. For example, pubspec #­3 above produces the error 'Could not parse &quot;https://github.com/dart-lang/js-interop.git&quot;' when in fact the issue is that the &quot;git&quot; key needs to be indented within the &quot;js_interop&quot; key. Having the error explain that &quot;https://github.com/dart-lang/js-interop.git&quot; was being parsed as a version for the package &quot;git&quot; could make that somewhat clearer."},"comment":{"url":"https://api.github.com/repos/dart-lang/pub/issues/comments/109452233","html_url":"https://github.com/dart-lang/pub/issues/152#issuecomment-109452233","issue_url":"https://api.github.com/repos/dart-lang/pub/issues/152","id":109452233,"user":{"login":"DartBot","id":8958862,"avatar_url":"https://avatars.githubusercontent.com/u/8958862?v=3","gravatar_id":"","url":"https://api.github.com/users/DartBot","html_url":"https://github.com/DartBot","followers_url":"https://api.github.com/users/DartBot/followers","following_url":"https://api.github.com/users/DartBot/following{/other_user}","gists_url":"https://api.github.com/users/DartBot/gists{/gist_id}","starred_url":"https://api.github.com/users/DartBot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/DartBot/subscriptions","organizations_url":"https://api.github.com/users/DartBot/orgs","repos_url":"https://api.github.com/users/DartBot/repos","events_url":"https://api.github.com/users/DartBot/events{/privacy}","received_events_url":"https://api.github.com/users/DartBot/received_events","type":"User","site_admin":false},"created_at":"2015-06-05T21:59:49Z","updated_at":"2015-06-05T21:59:49Z","body":"<a href=\"https://github.com/munificent\"><img src=\"https://avatars.githubusercontent.com/u/46275?v=3\" align=\"left\" width=\"48\" height=\"48\"hspace=\"10\"></img></a> **Comment by [munificent](https://github.com/munificent)**\n\n----\n\nWe haven't gotten feedback in a long time about problems here, so I think I'm just going to close it out.\n______\n*Added [NotPlanned](../labels/NotPlanned) label.*\n"}}