{"action":"closed","issue":{"url":"https://api.github.com/repos/dart-lang/pub/issues/1181","labels_url":"https://api.github.com/repos/dart-lang/pub/issues/1181/labels{/name}","comments_url":"https://api.github.com/repos/dart-lang/pub/issues/1181/comments","events_url":"https://api.github.com/repos/dart-lang/pub/issues/1181/events","html_url":"https://github.com/dart-lang/pub/issues/1181","id":85646343,"number":1181,"title":"Pub's binstubs should be resilient to snapshot version issues","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/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/Fixed","name":"Fixed","color":"ededed"},{"url":"https://api.github.com/repos/dart-lang/pub/labels/Pub-Run","name":"Pub-Run","color":"ededed"}],"state":"closed","locked":false,"assignee":{"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},"milestone":null,"comments":3,"created_at":"2015-06-05T22:23:55Z","updated_at":"2015-06-05T22:23:56Z","closed_at":"2015-06-05T22:23:56Z","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#21463_\n\n----\n\nCurrently, when pub generates a binstub that runs a snapshotted executable, that binstub doesn't do any validation that the snapshot version is compatible with the current version of the VM. This means once the user updates their VM far enough, their binstubs will stop working and need to be re-activated.\n\nThe binstub should check for the VM exit code indicating an invalid snapshot version and fall back on &quot;pub global run&quot; if the snapshot is out-of-date. This fallback should then regenerate the snapshot.\n\nIn addition, &quot;pub cache repair&quot; should fix the old-style binstubs so that they have this check."}}