{"action":"created","issue":{"url":"https://api.github.com/repos/realm/realm-js/issues/1402","repository_url":"https://api.github.com/repos/realm/realm-js","labels_url":"https://api.github.com/repos/realm/realm-js/issues/1402/labels{/name}","comments_url":"https://api.github.com/repos/realm/realm-js/issues/1402/comments","events_url":"https://api.github.com/repos/realm/realm-js/issues/1402/events","html_url":"https://github.com/realm/realm-js/pull/1402","id":264404410,"number":1402,"title":"Remove configuration handling from Realm._waitForDownload","user":{"login":"bdash","id":54825,"avatar_url":"https://avatars3.githubusercontent.com/u/54825?v=4","gravatar_id":"","url":"https://api.github.com/users/bdash","html_url":"https://github.com/bdash","followers_url":"https://api.github.com/users/bdash/followers","following_url":"https://api.github.com/users/bdash/following{/other_user}","gists_url":"https://api.github.com/users/bdash/gists{/gist_id}","starred_url":"https://api.github.com/users/bdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdash/subscriptions","organizations_url":"https://api.github.com/users/bdash/orgs","repos_url":"https://api.github.com/users/bdash/repos","events_url":"https://api.github.com/users/bdash/events{/privacy}","received_events_url":"https://api.github.com/users/bdash/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"bdash","id":54825,"avatar_url":"https://avatars3.githubusercontent.com/u/54825?v=4","gravatar_id":"","url":"https://api.github.com/users/bdash","html_url":"https://github.com/bdash","followers_url":"https://api.github.com/users/bdash/followers","following_url":"https://api.github.com/users/bdash/following{/other_user}","gists_url":"https://api.github.com/users/bdash/gists{/gist_id}","starred_url":"https://api.github.com/users/bdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdash/subscriptions","organizations_url":"https://api.github.com/users/bdash/orgs","repos_url":"https://api.github.com/users/bdash/repos","events_url":"https://api.github.com/users/bdash/events{/privacy}","received_events_url":"https://api.github.com/users/bdash/received_events","type":"User","site_admin":false},"assignees":[{"login":"bdash","id":54825,"avatar_url":"https://avatars3.githubusercontent.com/u/54825?v=4","gravatar_id":"","url":"https://api.github.com/users/bdash","html_url":"https://github.com/bdash","followers_url":"https://api.github.com/users/bdash/followers","following_url":"https://api.github.com/users/bdash/following{/other_user}","gists_url":"https://api.github.com/users/bdash/gists{/gist_id}","starred_url":"https://api.github.com/users/bdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdash/subscriptions","organizations_url":"https://api.github.com/users/bdash/orgs","repos_url":"https://api.github.com/users/bdash/repos","events_url":"https://api.github.com/users/bdash/events{/privacy}","received_events_url":"https://api.github.com/users/bdash/received_events","type":"User","site_admin":false}],"milestone":null,"comments":0,"created_at":"2017-10-10T23:03:52Z","updated_at":"2017-10-11T05:42:40Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/realm/realm-js/pulls/1402","html_url":"https://github.com/realm/realm-js/pull/1402","diff_url":"https://github.com/realm/realm-js/pull/1402.diff","patch_url":"https://github.com/realm/realm-js/pull/1402.patch"},"body":"There's no reason for `_waitForDownload` to be responsible for constructing a new Realm instance when we can instead use the constructor for that. This eliminates the potential for different handling of the Realm configuration between `_waitForDownload` and `new Realm`, which was responsible for various issues (#1391, #1392, #1393). In turn, this requires that `_waitForDownload` become an instance method.\r\n\r\nIn addition, we update `Realm.openAsync` and `getSpecialPurposeRealm` to delegate to `Realm.open` rather than reimplementing equivalent logic themselves.\r\n\r\nFinally, the private mechanism for registering a download progress handler as part of the sync configuration (`_onDownloadProgress`) is removed in favor of the public API (`progress()` on the promise returned by `Realm.open`).\r\n\r\nThis is an alternative approach to that taken in #1394. I think it's a better long-term solution, but it's a more invasive change and carries a little more risk.\r\n\r\nFixes #1391, #1392, #1393."},"comment":{"url":"https://api.github.com/repos/realm/realm-js/issues/comments/335689221","html_url":"https://github.com/realm/realm-js/pull/1402#issuecomment-335689221","issue_url":"https://api.github.com/repos/realm/realm-js/issues/1402","id":335689221,"user":{"login":"bdash","id":54825,"avatar_url":"https://avatars3.githubusercontent.com/u/54825?v=4","gravatar_id":"","url":"https://api.github.com/users/bdash","html_url":"https://github.com/bdash","followers_url":"https://api.github.com/users/bdash/followers","following_url":"https://api.github.com/users/bdash/following{/other_user}","gists_url":"https://api.github.com/users/bdash/gists{/gist_id}","starred_url":"https://api.github.com/users/bdash/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bdash/subscriptions","organizations_url":"https://api.github.com/users/bdash/orgs","repos_url":"https://api.github.com/users/bdash/repos","events_url":"https://api.github.com/users/bdash/events{/privacy}","received_events_url":"https://api.github.com/users/bdash/received_events","type":"User","site_admin":false},"created_at":"2017-10-11T05:42:40Z","updated_at":"2017-10-11T05:42:40Z","author_association":"CONTRIBUTOR","body":"I'm not sure what's going on with the React Native test failures.\r\n```\r\nSessionTests_Chrome\r\n  testRealmOpenLocalRealm, TypeError: realm._waitForDownload is not a function\r\n  testRealmOpenAsyncLocalRealm, TypeError: realm._waitForDownload is not a function\r\n```\r\n\r\nIt's only happening on one of the two React Native tests. I'm not able to reproduce it locally, primarily because `nom test react-native` fails to even successfully build anything for me. I'd greatly appreciate if someone can either troubleshoot what's going on, or can give me pointers on how to get the tests working locally."}}
{"actor":{"display_login":"bdash"}}