{"action":"created","issue":{"url":"https://api.github.com/repos/Khan/live-editor/issues/610","repository_url":"https://api.github.com/repos/Khan/live-editor","labels_url":"https://api.github.com/repos/Khan/live-editor/issues/610/labels{/name}","comments_url":"https://api.github.com/repos/Khan/live-editor/issues/610/comments","events_url":"https://api.github.com/repos/Khan/live-editor/issues/610/events","html_url":"https://github.com/Khan/live-editor/issues/610","id":177966932,"number":610,"title":"Oh Noes should offer a \"Show me where\" for invalid getImage() argument","user":{"login":"darrylyeo","id":13970789,"avatar_url":"https://avatars.githubusercontent.com/u/13970789?v=3","gravatar_id":"","url":"https://api.github.com/users/darrylyeo","html_url":"https://github.com/darrylyeo","followers_url":"https://api.github.com/users/darrylyeo/followers","following_url":"https://api.github.com/users/darrylyeo/following{/other_user}","gists_url":"https://api.github.com/users/darrylyeo/gists{/gist_id}","starred_url":"https://api.github.com/users/darrylyeo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/darrylyeo/subscriptions","organizations_url":"https://api.github.com/users/darrylyeo/orgs","repos_url":"https://api.github.com/users/darrylyeo/repos","events_url":"https://api.github.com/users/darrylyeo/events{/privacy}","received_events_url":"https://api.github.com/users/darrylyeo/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2016-09-20T05:21:35Z","updated_at":"2016-09-21T16:00:54Z","closed_at":null,"body":"Programmer: `getImage(\"foo\");`\r\n\r\nError Buddy: \"Oh noes! Image 'foo' was not found.\"\r\n\r\nProgrammer: \"But where?\""},"comment":{"url":"https://api.github.com/repos/Khan/live-editor/issues/comments/248658415","html_url":"https://github.com/Khan/live-editor/issues/610#issuecomment-248658415","issue_url":"https://api.github.com/repos/Khan/live-editor/issues/610","id":248658415,"user":{"login":"kevinbarabash","id":1044413,"avatar_url":"https://avatars.githubusercontent.com/u/1044413?v=3","gravatar_id":"","url":"https://api.github.com/users/kevinbarabash","html_url":"https://github.com/kevinbarabash","followers_url":"https://api.github.com/users/kevinbarabash/followers","following_url":"https://api.github.com/users/kevinbarabash/following{/other_user}","gists_url":"https://api.github.com/users/kevinbarabash/gists{/gist_id}","starred_url":"https://api.github.com/users/kevinbarabash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kevinbarabash/subscriptions","organizations_url":"https://api.github.com/users/kevinbarabash/orgs","repos_url":"https://api.github.com/users/kevinbarabash/repos","events_url":"https://api.github.com/users/kevinbarabash/events{/privacy}","received_events_url":"https://api.github.com/users/kevinbarabash/received_events","type":"User","site_admin":false},"created_at":"2016-09-21T16:00:54Z","updated_at":"2016-09-21T16:00:54Z","body":"Resource location is done by https://github.com/Khan/live-editor/blob/master/js/output/pjs/pjs-ast-transforms.js#L266-L291.  It's a little inexact because it searches for string literals.  The reason for this is that a user might put an image name string in a variable and then pass it to `getImage` and we need to load the images before because `getImage` is synchronous (unfortunately).\r\n\r\nDuring the rewriting we know where the string is defined, but not necessarily where it's being used.  We update `getImage` to accept a second param which is the location of the `getImage` call and then rewrite all `getImage` calls such that we pass it the location which we can get from the AST node."}}
{"actor":{"display_login":"kevinbarabash"}}