{"action":"created","issue":{"url":"https://api.github.com/repos/ably/ably-js/issues/206","labels_url":"https://api.github.com/repos/ably/ably-js/issues/206/labels{/name}","comments_url":"https://api.github.com/repos/ably/ably-js/issues/206/comments","events_url":"https://api.github.com/repos/ably/ably-js/issues/206/events","html_url":"https://github.com/ably/ably-js/pull/206","id":127968632,"number":206,"title":"Stop shimming async for requirejs","user":{"login":"SimonWoolf","id":5908687,"avatar_url":"https://avatars.githubusercontent.com/u/5908687?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonWoolf","html_url":"https://github.com/SimonWoolf","followers_url":"https://api.github.com/users/SimonWoolf/followers","following_url":"https://api.github.com/users/SimonWoolf/following{/other_user}","gists_url":"https://api.github.com/users/SimonWoolf/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonWoolf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonWoolf/subscriptions","organizations_url":"https://api.github.com/users/SimonWoolf/orgs","repos_url":"https://api.github.com/users/SimonWoolf/repos","events_url":"https://api.github.com/users/SimonWoolf/events{/privacy}","received_events_url":"https://api.github.com/users/SimonWoolf/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-01-21T16:52:49Z","updated_at":"2016-01-22T11:12:51Z","closed_at":"2016-01-21T23:39:54Z","pull_request":{"url":"https://api.github.com/repos/ably/ably-js/pulls/206","html_url":"https://github.com/ably/ably-js/pull/206","diff_url":"https://github.com/ably/ably-js/pull/206.diff","patch_url":"https://github.com/ably/ably-js/pull/206.patch"},"body":"Most-frustrating-to-debug bug so far in IE8/9 project turns out not to have been an IE bug at all!\r\n\r\nWas looking at a test that used async.parallel, where in IE8, async wasn't calling the result callback even though all the subtests were calling their callbacks. But `console.log` statements in the functions in async.js somehow weren't getting printed, even though the file was definitely getting loaded.\r\n\r\nTurns out, when the tests were run in the browser, the `async` that was getting used is *not* the one pointed to by named_dependencies (node_modules/async/lib/async), but rather a rather old version that's copied-and-pasted inline into karma-nodeunit (!) -- https://github.com/karma-runner/karma-nodeunit/blob/master/lib/nodeunit.js#L500.\r\n\r\nWhy was it using that one? Because when setting up requirejs in the browser, [we apparently put a shim which tells requirejs to use the global `async` object, whatever that may be](https://github.com/ably/ably-js/blob/07e6e3b9ca88f34f6a1ac5e6c657ce068f16788b/spec/support/browser_setup.js#L57-L59) -- ie whichever async was loaded most recently, which was the nodeunit one.\r\n\r\nSo: this PR removes the shim, and points to a branch of async in ably-forks with the issue that was causing async's requirejs-loader not to work with ably-js fixed."},"comment":{"url":"https://api.github.com/repos/ably/ably-js/issues/comments/173883918","html_url":"https://github.com/ably/ably-js/pull/206#issuecomment-173883918","issue_url":"https://api.github.com/repos/ably/ably-js/issues/206","id":173883918,"user":{"login":"mattheworiordan","id":43789,"avatar_url":"https://avatars.githubusercontent.com/u/43789?v=3","gravatar_id":"","url":"https://api.github.com/users/mattheworiordan","html_url":"https://github.com/mattheworiordan","followers_url":"https://api.github.com/users/mattheworiordan/followers","following_url":"https://api.github.com/users/mattheworiordan/following{/other_user}","gists_url":"https://api.github.com/users/mattheworiordan/gists{/gist_id}","starred_url":"https://api.github.com/users/mattheworiordan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mattheworiordan/subscriptions","organizations_url":"https://api.github.com/users/mattheworiordan/orgs","repos_url":"https://api.github.com/users/mattheworiordan/repos","events_url":"https://api.github.com/users/mattheworiordan/events{/privacy}","received_events_url":"https://api.github.com/users/mattheworiordan/received_events","type":"User","site_admin":false},"created_at":"2016-01-22T11:12:51Z","updated_at":"2016-01-22T11:12:51Z","body":"Jeez, that's a shitty bug :confounded: \r\n\r\nNice one for finding and fixing it"}}