{"action":"created","comment":{"url":"https://api.github.com/repos/facebook/prepack/pulls/comments/194738301","pull_request_review_id":127964416,"id":194738301,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDE5NDczODMwMQ==","diff_hunk":"@@ -1003,7 +1035,9 @@ export function applyObjectAssignConfigsForReactElement(realm: Realm, to: Object\n                 Properties.Set(realm, to, propName, Get(realm, source, propName), true);\n               }\n             }\n-            delayedSources.push(source.getSnapshot());\n+            let snapshot = source.getSnapshot();\n+            delayedSources.push(snapshot);\n+            source.temporalAlias = snapshot;","path":"src/react/utils.js","position":64,"original_position":64,"commit_id":"f08a31cf90e5b779c56850331d3edec0b98bff8a","original_commit_id":"f08a31cf90e5b779c56850331d3edec0b98bff8a","user":{"login":"gaearon","id":810438,"node_id":"MDQ6VXNlcjgxMDQzOA==","avatar_url":"https://avatars0.githubusercontent.com/u/810438?v=4","gravatar_id":"","url":"https://api.github.com/users/gaearon","html_url":"https://github.com/gaearon","followers_url":"https://api.github.com/users/gaearon/followers","following_url":"https://api.github.com/users/gaearon/following{/other_user}","gists_url":"https://api.github.com/users/gaearon/gists{/gist_id}","starred_url":"https://api.github.com/users/gaearon/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gaearon/subscriptions","organizations_url":"https://api.github.com/users/gaearon/orgs","repos_url":"https://api.github.com/users/gaearon/repos","events_url":"https://api.github.com/users/gaearon/events{/privacy}","received_events_url":"https://api.github.com/users/gaearon/received_events","type":"User","site_admin":false},"body":"This looks suspicious to me. We're mutating the source here? What if the same source is used in multiple calls, or even many times in a single call? We'd lose this information for all but the last call. So it seems inconsistent.","created_at":"2018-06-12T13:32:01Z","updated_at":"2018-06-12T13:32:02Z","html_url":"https://github.com/facebook/prepack/pull/2112#discussion_r194738301","pull_request_url":"https://api.github.com/repos/facebook/prepack/pulls/2112","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/facebook/prepack/pulls/comments/194738301"},"html":{"href":"https://github.com/facebook/prepack/pull/2112#discussion_r194738301"},"pull_request":{"href":"https://api.github.com/repos/facebook/prepack/pulls/2112"}}},"pull_request":{"url":"https://api.github.com/repos/facebook/prepack/pulls/2112","id":194277488,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk0Mjc3NDg4","html_url":"https://github.com/facebook/prepack/pull/2112","diff_url":"https://github.com/facebook/prepack/pull/2112.diff","patch_url":"https://github.com/facebook/prepack/pull/2112.patch","issue_url":"https://api.github.com/repos/facebook/prepack/issues/2112","number":2112,"state":"open","locked":false,"title":"Ensure we clone temporalAlias values when we clone ReactElements","user":{"login":"trueadm","id":1519870,"node_id":"MDQ6VXNlcjE1MTk4NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1519870?v=4","gravatar_id":"","url":"https://api.github.com/users/trueadm","html_url":"https://github.com/trueadm","followers_url":"https://api.github.com/users/trueadm/followers","following_url":"https://api.github.com/users/trueadm/following{/other_user}","gists_url":"https://api.github.com/users/trueadm/gists{/gist_id}","starred_url":"https://api.github.com/users/trueadm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueadm/subscriptions","organizations_url":"https://api.github.com/users/trueadm/orgs","repos_url":"https://api.github.com/users/trueadm/repos","events_url":"https://api.github.com/users/trueadm/events{/privacy}","received_events_url":"https://api.github.com/users/trueadm/received_events","type":"User","site_admin":false},"body":"Release notes: none\r\n\r\nWhen working on https://github.com/facebook/prepack/pull/2107, I noticed that we weren't cloning `temporalAlias` values, which is the wrong approach. We instead were re-using them on cloned ReactElements. The current approach worked fine with concrete ReactElement values, but when we introduce temporal ReactElement values that have dependencies on a shared `temporalAlias`, we run into very complex problems.\r\n\r\nThis PR makes it so we can clone `temporalAlias` values on `ObjectValues` (used for snapshotting).  This only used for React code – so it should not affect the other parts of Prepack. I've tested this on our internal bundle and our tests and they all pass, we create more code – but this is a *better* approach. We can remove the bloated code at a later point, but this aims to keep our approach consistent.","created_at":"2018-06-12T13:20:17Z","updated_at":"2018-06-12T13:32:02Z","closed_at":null,"merged_at":null,"merge_commit_sha":"a8c7c5b097bbc1716caeeab911c665507a6747c8","assignee":null,"assignees":[],"requested_reviewers":[{"login":"hermanventer","id":4325251,"node_id":"MDQ6VXNlcjQzMjUyNTE=","avatar_url":"https://avatars2.githubusercontent.com/u/4325251?v=4","gravatar_id":"","url":"https://api.github.com/users/hermanventer","html_url":"https://github.com/hermanventer","followers_url":"https://api.github.com/users/hermanventer/followers","following_url":"https://api.github.com/users/hermanventer/following{/other_user}","gists_url":"https://api.github.com/users/hermanventer/gists{/gist_id}","starred_url":"https://api.github.com/users/hermanventer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hermanventer/subscriptions","organizations_url":"https://api.github.com/users/hermanventer/orgs","repos_url":"https://api.github.com/users/hermanventer/repos","events_url":"https://api.github.com/users/hermanventer/events{/privacy}","received_events_url":"https://api.github.com/users/hermanventer/received_events","type":"User","site_admin":false},{"login":"NTillmann","id":6457462,"node_id":"MDQ6VXNlcjY0NTc0NjI=","avatar_url":"https://avatars2.githubusercontent.com/u/6457462?v=4","gravatar_id":"","url":"https://api.github.com/users/NTillmann","html_url":"https://github.com/NTillmann","followers_url":"https://api.github.com/users/NTillmann/followers","following_url":"https://api.github.com/users/NTillmann/following{/other_user}","gists_url":"https://api.github.com/users/NTillmann/gists{/gist_id}","starred_url":"https://api.github.com/users/NTillmann/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/NTillmann/subscriptions","organizations_url":"https://api.github.com/users/NTillmann/orgs","repos_url":"https://api.github.com/users/NTillmann/repos","events_url":"https://api.github.com/users/NTillmann/events{/privacy}","received_events_url":"https://api.github.com/users/NTillmann/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[{"id":279345275,"node_id":"MDU6TGFiZWwyNzkzNDUyNzU=","url":"https://api.github.com/repos/facebook/prepack/labels/CLA%20Signed","name":"CLA Signed","color":"009900","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/facebook/prepack/pulls/2112/commits","review_comments_url":"https://api.github.com/repos/facebook/prepack/pulls/2112/comments","review_comment_url":"https://api.github.com/repos/facebook/prepack/pulls/comments{/number}","comments_url":"https://api.github.com/repos/facebook/prepack/issues/2112/comments","statuses_url":"https://api.github.com/repos/facebook/prepack/statuses/f08a31cf90e5b779c56850331d3edec0b98bff8a","head":{"label":"trueadm:termporal-fixes","ref":"termporal-fixes","sha":"f08a31cf90e5b779c56850331d3edec0b98bff8a","user":{"login":"trueadm","id":1519870,"node_id":"MDQ6VXNlcjE1MTk4NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1519870?v=4","gravatar_id":"","url":"https://api.github.com/users/trueadm","html_url":"https://github.com/trueadm","followers_url":"https://api.github.com/users/trueadm/followers","following_url":"https://api.github.com/users/trueadm/following{/other_user}","gists_url":"https://api.github.com/users/trueadm/gists{/gist_id}","starred_url":"https://api.github.com/users/trueadm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueadm/subscriptions","organizations_url":"https://api.github.com/users/trueadm/orgs","repos_url":"https://api.github.com/users/trueadm/repos","events_url":"https://api.github.com/users/trueadm/events{/privacy}","received_events_url":"https://api.github.com/users/trueadm/received_events","type":"User","site_admin":false},"repo":{"id":101437011,"node_id":"MDEwOlJlcG9zaXRvcnkxMDE0MzcwMTE=","name":"prepack","full_name":"trueadm/prepack","owner":{"login":"trueadm","id":1519870,"node_id":"MDQ6VXNlcjE1MTk4NzA=","avatar_url":"https://avatars0.githubusercontent.com/u/1519870?v=4","gravatar_id":"","url":"https://api.github.com/users/trueadm","html_url":"https://github.com/trueadm","followers_url":"https://api.github.com/users/trueadm/followers","following_url":"https://api.github.com/users/trueadm/following{/other_user}","gists_url":"https://api.github.com/users/trueadm/gists{/gist_id}","starred_url":"https://api.github.com/users/trueadm/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trueadm/subscriptions","organizations_url":"https://api.github.com/users/trueadm/orgs","repos_url":"https://api.github.com/users/trueadm/repos","events_url":"https://api.github.com/users/trueadm/events{/privacy}","received_events_url":"https://api.github.com/users/trueadm/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/trueadm/prepack","description":"Prepack is a partial evaluator for JavaScript. Prepack rewrites a JavaScript bundle, resulting in JavaScript code that executes more efficiently.","fork":true,"url":"https://api.github.com/repos/trueadm/prepack","forks_url":"https://api.github.com/repos/trueadm/prepack/forks","keys_url":"https://api.github.com/repos/trueadm/prepack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/trueadm/prepack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/trueadm/prepack/teams","hooks_url":"https://api.github.com/repos/trueadm/prepack/hooks","issue_events_url":"https://api.github.com/repos/trueadm/prepack/issues/events{/number}","events_url":"https://api.github.com/repos/trueadm/prepack/events","assignees_url":"https://api.github.com/repos/trueadm/prepack/assignees{/user}","branches_url":"https://api.github.com/repos/trueadm/prepack/branches{/branch}","tags_url":"https://api.github.com/repos/trueadm/prepack/tags","blobs_url":"https://api.github.com/repos/trueadm/prepack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/trueadm/prepack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/trueadm/prepack/git/refs{/sha}","trees_url":"https://api.github.com/repos/trueadm/prepack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/trueadm/prepack/statuses/{sha}","languages_url":"https://api.github.com/repos/trueadm/prepack/languages","stargazers_url":"https://api.github.com/repos/trueadm/prepack/stargazers","contributors_url":"https://api.github.com/repos/trueadm/prepack/contributors","subscribers_url":"https://api.github.com/repos/trueadm/prepack/subscribers","subscription_url":"https://api.github.com/repos/trueadm/prepack/subscription","commits_url":"https://api.github.com/repos/trueadm/prepack/commits{/sha}","git_commits_url":"https://api.github.com/repos/trueadm/prepack/git/commits{/sha}","comments_url":"https://api.github.com/repos/trueadm/prepack/comments{/number}","issue_comment_url":"https://api.github.com/repos/trueadm/prepack/issues/comments{/number}","contents_url":"https://api.github.com/repos/trueadm/prepack/contents/{+path}","compare_url":"https://api.github.com/repos/trueadm/prepack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/trueadm/prepack/merges","archive_url":"https://api.github.com/repos/trueadm/prepack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/trueadm/prepack/downloads","issues_url":"https://api.github.com/repos/trueadm/prepack/issues{/number}","pulls_url":"https://api.github.com/repos/trueadm/prepack/pulls{/number}","milestones_url":"https://api.github.com/repos/trueadm/prepack/milestones{/number}","notifications_url":"https://api.github.com/repos/trueadm/prepack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/trueadm/prepack/labels{/name}","releases_url":"https://api.github.com/repos/trueadm/prepack/releases{/id}","deployments_url":"https://api.github.com/repos/trueadm/prepack/deployments","created_at":"2017-08-25T19:46:20Z","updated_at":"2018-06-12T13:21:13Z","pushed_at":"2018-06-12T13:21:11Z","git_url":"git://github.com/trueadm/prepack.git","ssh_url":"git@github.com:trueadm/prepack.git","clone_url":"https://github.com/trueadm/prepack.git","svn_url":"https://github.com/trueadm/prepack","homepage":"https://prepack.io","size":10038,"stargazers_count":1,"watchers_count":1,"language":"JavaScript","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"facebook:master","ref":"master","sha":"8fcb686470e1d765c7f85185bc9f54eb4c0ccc58","user":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"repo":{"id":45147841,"node_id":"MDEwOlJlcG9zaXRvcnk0NTE0Nzg0MQ==","name":"prepack","full_name":"facebook/prepack","owner":{"login":"facebook","id":69631,"node_id":"MDEyOk9yZ2FuaXphdGlvbjY5NjMx","avatar_url":"https://avatars3.githubusercontent.com/u/69631?v=4","gravatar_id":"","url":"https://api.github.com/users/facebook","html_url":"https://github.com/facebook","followers_url":"https://api.github.com/users/facebook/followers","following_url":"https://api.github.com/users/facebook/following{/other_user}","gists_url":"https://api.github.com/users/facebook/gists{/gist_id}","starred_url":"https://api.github.com/users/facebook/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/facebook/subscriptions","organizations_url":"https://api.github.com/users/facebook/orgs","repos_url":"https://api.github.com/users/facebook/repos","events_url":"https://api.github.com/users/facebook/events{/privacy}","received_events_url":"https://api.github.com/users/facebook/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/facebook/prepack","description":"A JavaScript bundle optimizer.","fork":false,"url":"https://api.github.com/repos/facebook/prepack","forks_url":"https://api.github.com/repos/facebook/prepack/forks","keys_url":"https://api.github.com/repos/facebook/prepack/keys{/key_id}","collaborators_url":"https://api.github.com/repos/facebook/prepack/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/facebook/prepack/teams","hooks_url":"https://api.github.com/repos/facebook/prepack/hooks","issue_events_url":"https://api.github.com/repos/facebook/prepack/issues/events{/number}","events_url":"https://api.github.com/repos/facebook/prepack/events","assignees_url":"https://api.github.com/repos/facebook/prepack/assignees{/user}","branches_url":"https://api.github.com/repos/facebook/prepack/branches{/branch}","tags_url":"https://api.github.com/repos/facebook/prepack/tags","blobs_url":"https://api.github.com/repos/facebook/prepack/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/facebook/prepack/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/facebook/prepack/git/refs{/sha}","trees_url":"https://api.github.com/repos/facebook/prepack/git/trees{/sha}","statuses_url":"https://api.github.com/repos/facebook/prepack/statuses/{sha}","languages_url":"https://api.github.com/repos/facebook/prepack/languages","stargazers_url":"https://api.github.com/repos/facebook/prepack/stargazers","contributors_url":"https://api.github.com/repos/facebook/prepack/contributors","subscribers_url":"https://api.github.com/repos/facebook/prepack/subscribers","subscription_url":"https://api.github.com/repos/facebook/prepack/subscription","commits_url":"https://api.github.com/repos/facebook/prepack/commits{/sha}","git_commits_url":"https://api.github.com/repos/facebook/prepack/git/commits{/sha}","comments_url":"https://api.github.com/repos/facebook/prepack/comments{/number}","issue_comment_url":"https://api.github.com/repos/facebook/prepack/issues/comments{/number}","contents_url":"https://api.github.com/repos/facebook/prepack/contents/{+path}","compare_url":"https://api.github.com/repos/facebook/prepack/compare/{base}...{head}","merges_url":"https://api.github.com/repos/facebook/prepack/merges","archive_url":"https://api.github.com/repos/facebook/prepack/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/facebook/prepack/downloads","issues_url":"https://api.github.com/repos/facebook/prepack/issues{/number}","pulls_url":"https://api.github.com/repos/facebook/prepack/pulls{/number}","milestones_url":"https://api.github.com/repos/facebook/prepack/milestones{/number}","notifications_url":"https://api.github.com/repos/facebook/prepack/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/facebook/prepack/labels{/name}","releases_url":"https://api.github.com/repos/facebook/prepack/releases{/id}","deployments_url":"https://api.github.com/repos/facebook/prepack/deployments","created_at":"2015-10-28T23:25:08Z","updated_at":"2018-06-12T08:14:53Z","pushed_at":"2018-06-12T13:20:51Z","git_url":"git://github.com/facebook/prepack.git","ssh_url":"git@github.com:facebook/prepack.git","clone_url":"https://github.com/facebook/prepack.git","svn_url":"https://github.com/facebook/prepack","homepage":"prepack.io","size":11983,"stargazers_count":12263,"watchers_count":12263,"language":"JavaScript","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":387,"mirror_url":null,"archived":false,"open_issues_count":179,"license":{"key":"other","name":"Other","spdx_id":null,"url":null,"node_id":"MDc6TGljZW5zZTA="},"forks":387,"open_issues":179,"watchers":12263,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/facebook/prepack/pulls/2112"},"html":{"href":"https://github.com/facebook/prepack/pull/2112"},"issue":{"href":"https://api.github.com/repos/facebook/prepack/issues/2112"},"comments":{"href":"https://api.github.com/repos/facebook/prepack/issues/2112/comments"},"review_comments":{"href":"https://api.github.com/repos/facebook/prepack/pulls/2112/comments"},"review_comment":{"href":"https://api.github.com/repos/facebook/prepack/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/facebook/prepack/pulls/2112/commits"},"statuses":{"href":"https://api.github.com/repos/facebook/prepack/statuses/f08a31cf90e5b779c56850331d3edec0b98bff8a"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"gaearon"}}