{"action":"closed","number":3443,"pull_request":{"url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3443","id":175779683,"html_url":"https://github.com/tidyverse/dplyr/pull/3443","diff_url":"https://github.com/tidyverse/dplyr/pull/3443.diff","patch_url":"https://github.com/tidyverse/dplyr/pull/3443.patch","issue_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3443","number":3443,"state":"closed","locked":false,"title":"Avoid cleaning the data mask","user":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars0.githubusercontent.com/u/1741643?v=4","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"body":"by only sharing proxy objects with a weak reference to the data source. Closes #3318.\r\n\r\n@romainfrancois: This patch covers pretty much all of the current implementation to access variables in a grouped (and also ungrouped) operation. The patch only changes ownership: Previously we held ownership of objects used to handle the callbacks from R, now we create proxy objects that are owned by an `XPtr` and are aware if the underlying real object is still alive.\r\n\r\n@romainfrancois @lionel-: I haven't found a way around using two proxy objects: one, because I need a `shared_ptr<>`, and the second which I actually share that contains the weak reference to the first proxy object. Is there a better way? Also, happy to take feedback on the naming and the comments, and of course the implementation.","created_at":"2018-03-18T23:15:41Z","updated_at":"2018-03-19T15:18:07Z","closed_at":"2018-03-19T15:18:07Z","merged_at":"2018-03-19T15:18:07Z","merge_commit_sha":"20ef7bf653af884c55b7e26f810090dbce5a17fd","assignee":null,"assignees":[],"requested_reviewers":[{"login":"romainfrancois","id":2625526,"avatar_url":"https://avatars3.githubusercontent.com/u/2625526?v=4","gravatar_id":"","url":"https://api.github.com/users/romainfrancois","html_url":"https://github.com/romainfrancois","followers_url":"https://api.github.com/users/romainfrancois/followers","following_url":"https://api.github.com/users/romainfrancois/following{/other_user}","gists_url":"https://api.github.com/users/romainfrancois/gists{/gist_id}","starred_url":"https://api.github.com/users/romainfrancois/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/romainfrancois/subscriptions","organizations_url":"https://api.github.com/users/romainfrancois/orgs","repos_url":"https://api.github.com/users/romainfrancois/repos","events_url":"https://api.github.com/users/romainfrancois/events{/privacy}","received_events_url":"https://api.github.com/users/romainfrancois/received_events","type":"User","site_admin":false},{"login":"lionel-","id":4465050,"avatar_url":"https://avatars2.githubusercontent.com/u/4465050?v=4","gravatar_id":"","url":"https://api.github.com/users/lionel-","html_url":"https://github.com/lionel-","followers_url":"https://api.github.com/users/lionel-/followers","following_url":"https://api.github.com/users/lionel-/following{/other_user}","gists_url":"https://api.github.com/users/lionel-/gists{/gist_id}","starred_url":"https://api.github.com/users/lionel-/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lionel-/subscriptions","organizations_url":"https://api.github.com/users/lionel-/orgs","repos_url":"https://api.github.com/users/lionel-/repos","events_url":"https://api.github.com/users/lionel-/events{/privacy}","received_events_url":"https://api.github.com/users/lionel-/received_events","type":"User","site_admin":false}],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3443/commits","review_comments_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/3443/comments","review_comment_url":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments{/number}","comments_url":"https://api.github.com/repos/tidyverse/dplyr/issues/3443/comments","statuses_url":"https://api.github.com/repos/tidyverse/dplyr/statuses/314b76f6fc355453715158a55851b98f6ab384b8","head":{"label":"krlmlr:f-#3318-hybrid-proxy","ref":"f-#3318-hybrid-proxy","sha":"314b76f6fc355453715158a55851b98f6ab384b8","user":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars0.githubusercontent.com/u/1741643?v=4","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"repo":{"id":13851553,"name":"dplyr","full_name":"krlmlr/dplyr","owner":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars0.githubusercontent.com/u/1741643?v=4","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/krlmlr/dplyr","description":"Plyr specialised for data frames: faster & with remote datastores","fork":true,"url":"https://api.github.com/repos/krlmlr/dplyr","forks_url":"https://api.github.com/repos/krlmlr/dplyr/forks","keys_url":"https://api.github.com/repos/krlmlr/dplyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/krlmlr/dplyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/krlmlr/dplyr/teams","hooks_url":"https://api.github.com/repos/krlmlr/dplyr/hooks","issue_events_url":"https://api.github.com/repos/krlmlr/dplyr/issues/events{/number}","events_url":"https://api.github.com/repos/krlmlr/dplyr/events","assignees_url":"https://api.github.com/repos/krlmlr/dplyr/assignees{/user}","branches_url":"https://api.github.com/repos/krlmlr/dplyr/branches{/branch}","tags_url":"https://api.github.com/repos/krlmlr/dplyr/tags","blobs_url":"https://api.github.com/repos/krlmlr/dplyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/krlmlr/dplyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/krlmlr/dplyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/krlmlr/dplyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/krlmlr/dplyr/statuses/{sha}","languages_url":"https://api.github.com/repos/krlmlr/dplyr/languages","stargazers_url":"https://api.github.com/repos/krlmlr/dplyr/stargazers","contributors_url":"https://api.github.com/repos/krlmlr/dplyr/contributors","subscribers_url":"https://api.github.com/repos/krlmlr/dplyr/subscribers","subscription_url":"https://api.github.com/repos/krlmlr/dplyr/subscription","commits_url":"https://api.github.com/repos/krlmlr/dplyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/krlmlr/dplyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/krlmlr/dplyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/krlmlr/dplyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/krlmlr/dplyr/contents/{+path}","compare_url":"https://api.github.com/repos/krlmlr/dplyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/krlmlr/dplyr/merges","archive_url":"https://api.github.com/repos/krlmlr/dplyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/krlmlr/dplyr/downloads","issues_url":"https://api.github.com/repos/krlmlr/dplyr/issues{/number}","pulls_url":"https://api.github.com/repos/krlmlr/dplyr/pulls{/number}","milestones_url":"https://api.github.com/repos/krlmlr/dplyr/milestones{/number}","notifications_url":"https://api.github.com/repos/krlmlr/dplyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/krlmlr/dplyr/labels{/name}","releases_url":"https://api.github.com/repos/krlmlr/dplyr/releases{/id}","deployments_url":"https://api.github.com/repos/krlmlr/dplyr/deployments","created_at":"2013-10-25T04:34:13Z","updated_at":"2016-03-15T10:37:53Z","pushed_at":"2018-03-18T23:00:30Z","git_url":"git://github.com/krlmlr/dplyr.git","ssh_url":"git@github.com:krlmlr/dplyr.git","clone_url":"https://github.com/krlmlr/dplyr.git","svn_url":"https://github.com/krlmlr/dplyr","homepage":null,"size":19203,"stargazers_count":0,"watchers_count":0,"language":"R","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":1,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"tidyverse:master","ref":"master","sha":"706099c10f4c5c7615c78b8d80c875dcaf1db34d","user":{"login":"tidyverse","id":22032646,"avatar_url":"https://avatars2.githubusercontent.com/u/22032646?v=4","gravatar_id":"","url":"https://api.github.com/users/tidyverse","html_url":"https://github.com/tidyverse","followers_url":"https://api.github.com/users/tidyverse/followers","following_url":"https://api.github.com/users/tidyverse/following{/other_user}","gists_url":"https://api.github.com/users/tidyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/tidyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tidyverse/subscriptions","organizations_url":"https://api.github.com/users/tidyverse/orgs","repos_url":"https://api.github.com/users/tidyverse/repos","events_url":"https://api.github.com/users/tidyverse/events{/privacy}","received_events_url":"https://api.github.com/users/tidyverse/received_events","type":"Organization","site_admin":false},"repo":{"id":6427813,"name":"dplyr","full_name":"tidyverse/dplyr","owner":{"login":"tidyverse","id":22032646,"avatar_url":"https://avatars2.githubusercontent.com/u/22032646?v=4","gravatar_id":"","url":"https://api.github.com/users/tidyverse","html_url":"https://github.com/tidyverse","followers_url":"https://api.github.com/users/tidyverse/followers","following_url":"https://api.github.com/users/tidyverse/following{/other_user}","gists_url":"https://api.github.com/users/tidyverse/gists{/gist_id}","starred_url":"https://api.github.com/users/tidyverse/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tidyverse/subscriptions","organizations_url":"https://api.github.com/users/tidyverse/orgs","repos_url":"https://api.github.com/users/tidyverse/repos","events_url":"https://api.github.com/users/tidyverse/events{/privacy}","received_events_url":"https://api.github.com/users/tidyverse/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/tidyverse/dplyr","description":"Dplyr: A grammar of data manipulation","fork":false,"url":"https://api.github.com/repos/tidyverse/dplyr","forks_url":"https://api.github.com/repos/tidyverse/dplyr/forks","keys_url":"https://api.github.com/repos/tidyverse/dplyr/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tidyverse/dplyr/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tidyverse/dplyr/teams","hooks_url":"https://api.github.com/repos/tidyverse/dplyr/hooks","issue_events_url":"https://api.github.com/repos/tidyverse/dplyr/issues/events{/number}","events_url":"https://api.github.com/repos/tidyverse/dplyr/events","assignees_url":"https://api.github.com/repos/tidyverse/dplyr/assignees{/user}","branches_url":"https://api.github.com/repos/tidyverse/dplyr/branches{/branch}","tags_url":"https://api.github.com/repos/tidyverse/dplyr/tags","blobs_url":"https://api.github.com/repos/tidyverse/dplyr/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tidyverse/dplyr/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tidyverse/dplyr/git/refs{/sha}","trees_url":"https://api.github.com/repos/tidyverse/dplyr/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tidyverse/dplyr/statuses/{sha}","languages_url":"https://api.github.com/repos/tidyverse/dplyr/languages","stargazers_url":"https://api.github.com/repos/tidyverse/dplyr/stargazers","contributors_url":"https://api.github.com/repos/tidyverse/dplyr/contributors","subscribers_url":"https://api.github.com/repos/tidyverse/dplyr/subscribers","subscription_url":"https://api.github.com/repos/tidyverse/dplyr/subscription","commits_url":"https://api.github.com/repos/tidyverse/dplyr/commits{/sha}","git_commits_url":"https://api.github.com/repos/tidyverse/dplyr/git/commits{/sha}","comments_url":"https://api.github.com/repos/tidyverse/dplyr/comments{/number}","issue_comment_url":"https://api.github.com/repos/tidyverse/dplyr/issues/comments{/number}","contents_url":"https://api.github.com/repos/tidyverse/dplyr/contents/{+path}","compare_url":"https://api.github.com/repos/tidyverse/dplyr/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tidyverse/dplyr/merges","archive_url":"https://api.github.com/repos/tidyverse/dplyr/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tidyverse/dplyr/downloads","issues_url":"https://api.github.com/repos/tidyverse/dplyr/issues{/number}","pulls_url":"https://api.github.com/repos/tidyverse/dplyr/pulls{/number}","milestones_url":"https://api.github.com/repos/tidyverse/dplyr/milestones{/number}","notifications_url":"https://api.github.com/repos/tidyverse/dplyr/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tidyverse/dplyr/labels{/name}","releases_url":"https://api.github.com/repos/tidyverse/dplyr/releases{/id}","deployments_url":"https://api.github.com/repos/tidyverse/dplyr/deployments","created_at":"2012-10-28T13:39:17Z","updated_at":"2018-03-19T03:06:52Z","pushed_at":"2018-03-19T15:18:07Z","git_url":"git://github.com/tidyverse/dplyr.git","ssh_url":"git@github.com:tidyverse/dplyr.git","clone_url":"https://github.com/tidyverse/dplyr.git","svn_url":"https://github.com/tidyverse/dplyr","homepage":"http://dplyr.tidyverse.org","size":16579,"stargazers_count":2285,"watchers_count":2285,"language":"R","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":870,"mirror_url":null,"archived":false,"open_issues_count":179,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":870,"open_issues":179,"watchers":2285,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3443"},"html":{"href":"https://github.com/tidyverse/dplyr/pull/3443"},"issue":{"href":"https://api.github.com/repos/tidyverse/dplyr/issues/3443"},"comments":{"href":"https://api.github.com/repos/tidyverse/dplyr/issues/3443/comments"},"review_comments":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3443/comments"},"review_comment":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/tidyverse/dplyr/pulls/3443/commits"},"statuses":{"href":"https://api.github.com/repos/tidyverse/dplyr/statuses/314b76f6fc355453715158a55851b98f6ab384b8"}},"author_association":"MEMBER","merged":true,"mergeable":null,"rebaseable":null,"mergeable_state":"unknown","merged_by":{"login":"krlmlr","id":1741643,"avatar_url":"https://avatars0.githubusercontent.com/u/1741643?v=4","gravatar_id":"","url":"https://api.github.com/users/krlmlr","html_url":"https://github.com/krlmlr","followers_url":"https://api.github.com/users/krlmlr/followers","following_url":"https://api.github.com/users/krlmlr/following{/other_user}","gists_url":"https://api.github.com/users/krlmlr/gists{/gist_id}","starred_url":"https://api.github.com/users/krlmlr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/krlmlr/subscriptions","organizations_url":"https://api.github.com/users/krlmlr/orgs","repos_url":"https://api.github.com/users/krlmlr/repos","events_url":"https://api.github.com/users/krlmlr/events{/privacy}","received_events_url":"https://api.github.com/users/krlmlr/received_events","type":"User","site_admin":false},"comments":8,"review_comments":0,"maintainer_can_modify":false,"commits":1,"additions":125,"deletions":44,"changed_files":4}}
{"actor":{"display_login":"krlmlr"}}