{"action":"created","issue":{"url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/604","labels_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/604/labels{/name}","comments_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/604/comments","events_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/604/events","html_url":"https://github.com/mit-cml/appinventor-sources/pull/604","id":115569436,"number":604,"title":"Properly Report Errors during initial form load","user":{"login":"jisqyv","id":1596728,"avatar_url":"https://avatars.githubusercontent.com/u/1596728?v=3","gravatar_id":"","url":"https://api.github.com/users/jisqyv","html_url":"https://github.com/jisqyv","followers_url":"https://api.github.com/users/jisqyv/followers","following_url":"https://api.github.com/users/jisqyv/following{/other_user}","gists_url":"https://api.github.com/users/jisqyv/gists{/gist_id}","starred_url":"https://api.github.com/users/jisqyv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jisqyv/subscriptions","organizations_url":"https://api.github.com/users/jisqyv/orgs","repos_url":"https://api.github.com/users/jisqyv/repos","events_url":"https://api.github.com/users/jisqyv/events{/privacy}","received_events_url":"https://api.github.com/users/jisqyv/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/mit-cml/appinventor-sources/labels/pull%20request:%20needs%20review","name":"pull request: needs review","color":"e11d21"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-11-06T19:19:28Z","updated_at":"2015-11-06T19:22:12Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/mit-cml/appinventor-sources/pulls/604","html_url":"https://github.com/mit-cml/appinventor-sources/pull/604","diff_url":"https://github.com/mit-cml/appinventor-sources/pull/604.diff","patch_url":"https://github.com/mit-cml/appinventor-sources/pull/604.patch"},"body":"When we load the initial form, we tend to issue many Yail evaluation\r\nrequests in a row. Low level code in replmgr.js then consolidates\r\nthese changes into one XHR call instead of sending each one in its own\r\nrequest. This improves form loading performance significantly.\r\n\r\nHowever if an error occurs during code that is consolidated, we cannot\r\ndetermine where the error occurred. Also, because the code is\r\nconsolidated into one (begin ...) block, an error in the middle causes\r\nlater s-expressions to not be evaluated. This leaves the Companion in\r\nan undefined and usually broken state.\r\n\r\nThis code change detects an error when s-expressions are consolidated\r\nand arranges to resend the form (reset the screen) without the\r\noptimization in place. This results in the older “slow” code being\r\nused, but better handles errors in the consolidated code. After 20\r\nsuccessful calls sending s-expressions over, the optimized code is\r\nre-enabled.\r\n\r\nChange-Id: Ic29ecdca7d3842f91829169842802419dd1a9fcc"},"comment":{"url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/comments/154507907","html_url":"https://github.com/mit-cml/appinventor-sources/pull/604#issuecomment-154507907","issue_url":"https://api.github.com/repos/mit-cml/appinventor-sources/issues/604","id":154507907,"user":{"login":"halatmit","id":789431,"avatar_url":"https://avatars.githubusercontent.com/u/789431?v=3","gravatar_id":"","url":"https://api.github.com/users/halatmit","html_url":"https://github.com/halatmit","followers_url":"https://api.github.com/users/halatmit/followers","following_url":"https://api.github.com/users/halatmit/following{/other_user}","gists_url":"https://api.github.com/users/halatmit/gists{/gist_id}","starred_url":"https://api.github.com/users/halatmit/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/halatmit/subscriptions","organizations_url":"https://api.github.com/users/halatmit/orgs","repos_url":"https://api.github.com/users/halatmit/repos","events_url":"https://api.github.com/users/halatmit/events{/privacy}","received_events_url":"https://api.github.com/users/halatmit/received_events","type":"User","site_admin":false},"created_at":"2015-11-06T19:22:12Z","updated_at":"2015-11-06T19:22:12Z","body":"@jisqyv This looks pretty awesome?  Is there a good way to test it?\r\n"}}