{"action":"closed","number":2525,"pull_request":{"url":"https://api.github.com/repos/google/protobuf/pulls/2525","id":98858039,"html_url":"https://github.com/google/protobuf/pull/2525","diff_url":"https://github.com/google/protobuf/pull/2525.diff","patch_url":"https://github.com/google/protobuf/pull/2525.patch","issue_url":"https://api.github.com/repos/google/protobuf/issues/2525","number":2525,"state":"closed","locked":false,"title":"Eliminate redundant methods in C++ generated code for lite protos","user":{"login":"camillol","id":196272,"avatar_url":"https://avatars.githubusercontent.com/u/196272?v=3","gravatar_id":"","url":"https://api.github.com/users/camillol","html_url":"https://github.com/camillol","followers_url":"https://api.github.com/users/camillol/followers","following_url":"https://api.github.com/users/camillol/following{/other_user}","gists_url":"https://api.github.com/users/camillol/gists{/gist_id}","starred_url":"https://api.github.com/users/camillol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camillol/subscriptions","organizations_url":"https://api.github.com/users/camillol/orgs","repos_url":"https://api.github.com/users/camillol/repos","events_url":"https://api.github.com/users/camillol/events{/privacy}","received_events_url":"https://api.github.com/users/camillol/received_events","type":"User","site_admin":false},"body":"With the lite proto runtime, the generated method `MergePartialFromCodedStream` uses a `LazyStringOutputStream` to avoid allocating strings that may not be needed. However, the current code ends up generating more code than necessary:\r\n1) A static `MutableUnknownFieldsFor$classname$` for each message class.\r\n2) A separate specialization of the template behind `NewPermanentCallback` for each message class, because the type is different for each.\r\n\r\nThis CL eliminates `MutableUnknownFieldsFor$classname$`, and creates a callback that calls the `mutable_unknown_fields` method directly on `_internal_metadata_`. Because all `_internal_metadata_` objects are of the same type (`::google::protobuf::internal::InternalMetadataWithArenaLite`), only one copy of the callback template is linked. This yields a code size reduction in programs using lite protos.\r\n\r\nThe appropriate specialization of NewPermanentCallback was missing from the stubs, so we add it.","created_at":"2016-12-21T01:44:27Z","updated_at":"2016-12-22T08:27:03Z","closed_at":"2016-12-22T08:27:03Z","merged_at":"2016-12-22T08:27:03Z","merge_commit_sha":"137dc026cfa73913eb802fb03315be25a40dfab7","assignee":{"login":"xfxyjwf","id":8551050,"avatar_url":"https://avatars.githubusercontent.com/u/8551050?v=3","gravatar_id":"","url":"https://api.github.com/users/xfxyjwf","html_url":"https://github.com/xfxyjwf","followers_url":"https://api.github.com/users/xfxyjwf/followers","following_url":"https://api.github.com/users/xfxyjwf/following{/other_user}","gists_url":"https://api.github.com/users/xfxyjwf/gists{/gist_id}","starred_url":"https://api.github.com/users/xfxyjwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfxyjwf/subscriptions","organizations_url":"https://api.github.com/users/xfxyjwf/orgs","repos_url":"https://api.github.com/users/xfxyjwf/repos","events_url":"https://api.github.com/users/xfxyjwf/events{/privacy}","received_events_url":"https://api.github.com/users/xfxyjwf/received_events","type":"User","site_admin":false},"assignees":[{"login":"xfxyjwf","id":8551050,"avatar_url":"https://avatars.githubusercontent.com/u/8551050?v=3","gravatar_id":"","url":"https://api.github.com/users/xfxyjwf","html_url":"https://github.com/xfxyjwf","followers_url":"https://api.github.com/users/xfxyjwf/followers","following_url":"https://api.github.com/users/xfxyjwf/following{/other_user}","gists_url":"https://api.github.com/users/xfxyjwf/gists{/gist_id}","starred_url":"https://api.github.com/users/xfxyjwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfxyjwf/subscriptions","organizations_url":"https://api.github.com/users/xfxyjwf/orgs","repos_url":"https://api.github.com/users/xfxyjwf/repos","events_url":"https://api.github.com/users/xfxyjwf/events{/privacy}","received_events_url":"https://api.github.com/users/xfxyjwf/received_events","type":"User","site_admin":false}],"milestone":null,"commits_url":"https://api.github.com/repos/google/protobuf/pulls/2525/commits","review_comments_url":"https://api.github.com/repos/google/protobuf/pulls/2525/comments","review_comment_url":"https://api.github.com/repos/google/protobuf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/google/protobuf/issues/2525/comments","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/abe172564edfdca186188e1a76924aa1a88eb65f","head":{"label":"camillol:lite","ref":"lite","sha":"abe172564edfdca186188e1a76924aa1a88eb65f","user":{"login":"camillol","id":196272,"avatar_url":"https://avatars.githubusercontent.com/u/196272?v=3","gravatar_id":"","url":"https://api.github.com/users/camillol","html_url":"https://github.com/camillol","followers_url":"https://api.github.com/users/camillol/followers","following_url":"https://api.github.com/users/camillol/following{/other_user}","gists_url":"https://api.github.com/users/camillol/gists{/gist_id}","starred_url":"https://api.github.com/users/camillol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camillol/subscriptions","organizations_url":"https://api.github.com/users/camillol/orgs","repos_url":"https://api.github.com/users/camillol/repos","events_url":"https://api.github.com/users/camillol/events{/privacy}","received_events_url":"https://api.github.com/users/camillol/received_events","type":"User","site_admin":false},"repo":{"id":77005562,"name":"protobuf","full_name":"camillol/protobuf","owner":{"login":"camillol","id":196272,"avatar_url":"https://avatars.githubusercontent.com/u/196272?v=3","gravatar_id":"","url":"https://api.github.com/users/camillol","html_url":"https://github.com/camillol","followers_url":"https://api.github.com/users/camillol/followers","following_url":"https://api.github.com/users/camillol/following{/other_user}","gists_url":"https://api.github.com/users/camillol/gists{/gist_id}","starred_url":"https://api.github.com/users/camillol/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/camillol/subscriptions","organizations_url":"https://api.github.com/users/camillol/orgs","repos_url":"https://api.github.com/users/camillol/repos","events_url":"https://api.github.com/users/camillol/events{/privacy}","received_events_url":"https://api.github.com/users/camillol/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/camillol/protobuf","description":"Protocol Buffers - Google's data interchange format","fork":true,"url":"https://api.github.com/repos/camillol/protobuf","forks_url":"https://api.github.com/repos/camillol/protobuf/forks","keys_url":"https://api.github.com/repos/camillol/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/camillol/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/camillol/protobuf/teams","hooks_url":"https://api.github.com/repos/camillol/protobuf/hooks","issue_events_url":"https://api.github.com/repos/camillol/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/camillol/protobuf/events","assignees_url":"https://api.github.com/repos/camillol/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/camillol/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/camillol/protobuf/tags","blobs_url":"https://api.github.com/repos/camillol/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/camillol/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/camillol/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/camillol/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/camillol/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/camillol/protobuf/languages","stargazers_url":"https://api.github.com/repos/camillol/protobuf/stargazers","contributors_url":"https://api.github.com/repos/camillol/protobuf/contributors","subscribers_url":"https://api.github.com/repos/camillol/protobuf/subscribers","subscription_url":"https://api.github.com/repos/camillol/protobuf/subscription","commits_url":"https://api.github.com/repos/camillol/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/camillol/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/camillol/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/camillol/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/camillol/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/camillol/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/camillol/protobuf/merges","archive_url":"https://api.github.com/repos/camillol/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/camillol/protobuf/downloads","issues_url":"https://api.github.com/repos/camillol/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/camillol/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/camillol/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/camillol/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/camillol/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/camillol/protobuf/releases{/id}","deployments_url":"https://api.github.com/repos/camillol/protobuf/deployments","created_at":"2016-12-21T01:40:00Z","updated_at":"2016-12-21T01:40:14Z","pushed_at":"2016-12-22T04:54:57Z","git_url":"git://github.com/camillol/protobuf.git","ssh_url":"git@github.com:camillol/protobuf.git","clone_url":"https://github.com/camillol/protobuf.git","svn_url":"https://github.com/camillol/protobuf","homepage":"https://developers.google.com/protocol-buffers/","size":37499,"stargazers_count":0,"watchers_count":0,"language":"C++","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"google:master","ref":"master","sha":"d948b66d4f4f41e438981f49ad4668ab0ba6ab0a","user":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"repo":{"id":23357588,"name":"protobuf","full_name":"google/protobuf","owner":{"login":"google","id":1342004,"avatar_url":"https://avatars.githubusercontent.com/u/1342004?v=3","gravatar_id":"","url":"https://api.github.com/users/google","html_url":"https://github.com/google","followers_url":"https://api.github.com/users/google/followers","following_url":"https://api.github.com/users/google/following{/other_user}","gists_url":"https://api.github.com/users/google/gists{/gist_id}","starred_url":"https://api.github.com/users/google/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/google/subscriptions","organizations_url":"https://api.github.com/users/google/orgs","repos_url":"https://api.github.com/users/google/repos","events_url":"https://api.github.com/users/google/events{/privacy}","received_events_url":"https://api.github.com/users/google/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/google/protobuf","description":"Protocol Buffers - Google's data interchange format","fork":false,"url":"https://api.github.com/repos/google/protobuf","forks_url":"https://api.github.com/repos/google/protobuf/forks","keys_url":"https://api.github.com/repos/google/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/google/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/google/protobuf/teams","hooks_url":"https://api.github.com/repos/google/protobuf/hooks","issue_events_url":"https://api.github.com/repos/google/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/google/protobuf/events","assignees_url":"https://api.github.com/repos/google/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/google/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/google/protobuf/tags","blobs_url":"https://api.github.com/repos/google/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/google/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/google/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/google/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/google/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/google/protobuf/languages","stargazers_url":"https://api.github.com/repos/google/protobuf/stargazers","contributors_url":"https://api.github.com/repos/google/protobuf/contributors","subscribers_url":"https://api.github.com/repos/google/protobuf/subscribers","subscription_url":"https://api.github.com/repos/google/protobuf/subscription","commits_url":"https://api.github.com/repos/google/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/google/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/google/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/google/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/google/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/google/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/google/protobuf/merges","archive_url":"https://api.github.com/repos/google/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/google/protobuf/downloads","issues_url":"https://api.github.com/repos/google/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/google/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/google/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/google/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/google/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/google/protobuf/releases{/id}","deployments_url":"https://api.github.com/repos/google/protobuf/deployments","created_at":"2014-08-26T15:52:15Z","updated_at":"2016-12-22T08:03:12Z","pushed_at":"2016-12-22T08:27:03Z","git_url":"git://github.com/google/protobuf.git","ssh_url":"git@github.com:google/protobuf.git","clone_url":"https://github.com/google/protobuf.git","svn_url":"https://github.com/google/protobuf","homepage":"https://developers.google.com/protocol-buffers/","size":37912,"stargazers_count":13885,"watchers_count":13885,"language":"C++","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":4216,"mirror_url":null,"open_issues_count":643,"forks":4216,"open_issues":643,"watchers":13885,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/google/protobuf/pulls/2525"},"html":{"href":"https://github.com/google/protobuf/pull/2525"},"issue":{"href":"https://api.github.com/repos/google/protobuf/issues/2525"},"comments":{"href":"https://api.github.com/repos/google/protobuf/issues/2525/comments"},"review_comments":{"href":"https://api.github.com/repos/google/protobuf/pulls/2525/comments"},"review_comment":{"href":"https://api.github.com/repos/google/protobuf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/google/protobuf/pulls/2525/commits"},"statuses":{"href":"https://api.github.com/repos/google/protobuf/statuses/abe172564edfdca186188e1a76924aa1a88eb65f"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"xfxyjwf","id":8551050,"avatar_url":"https://avatars.githubusercontent.com/u/8551050?v=3","gravatar_id":"","url":"https://api.github.com/users/xfxyjwf","html_url":"https://github.com/xfxyjwf","followers_url":"https://api.github.com/users/xfxyjwf/followers","following_url":"https://api.github.com/users/xfxyjwf/following{/other_user}","gists_url":"https://api.github.com/users/xfxyjwf/gists{/gist_id}","starred_url":"https://api.github.com/users/xfxyjwf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xfxyjwf/subscriptions","organizations_url":"https://api.github.com/users/xfxyjwf/orgs","repos_url":"https://api.github.com/users/xfxyjwf/repos","events_url":"https://api.github.com/users/xfxyjwf/events{/privacy}","received_events_url":"https://api.github.com/users/xfxyjwf/received_events","type":"User","site_admin":false},"comments":9,"review_comments":0,"commits":2,"additions":32,"deletions":14,"changed_files":2}}
{"actor":{"display_login":"xfxyjwf"}}