{"action":"closed","number":305,"pull_request":{"url":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/305","id":59746128,"html_url":"https://github.com/ruby-protobuf/protobuf/pull/305","diff_url":"https://github.com/ruby-protobuf/protobuf/pull/305.diff","patch_url":"https://github.com/ruby-protobuf/protobuf/pull/305.patch","issue_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/305","number":305,"state":"closed","locked":false,"title":"Remove memoization on encode","user":{"login":"liveh2o","id":207933,"avatar_url":"https://avatars.githubusercontent.com/u/207933?v=3","gravatar_id":"","url":"https://api.github.com/users/liveh2o","html_url":"https://github.com/liveh2o","followers_url":"https://api.github.com/users/liveh2o/followers","following_url":"https://api.github.com/users/liveh2o/following{/other_user}","gists_url":"https://api.github.com/users/liveh2o/gists{/gist_id}","starred_url":"https://api.github.com/users/liveh2o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liveh2o/subscriptions","organizations_url":"https://api.github.com/users/liveh2o/orgs","repos_url":"https://api.github.com/users/liveh2o/repos","events_url":"https://api.github.com/users/liveh2o/events{/privacy}","received_events_url":"https://api.github.com/users/liveh2o/received_events","type":"User","site_admin":false},"body":"Changing values in repeated fields does not clear the memoized encoded value. This means that changes to repated fields after the memoized encoding has been computed will never be encoded. The pattern works for other field types because the memoized value is being cleared in the setter on the message before we call into the field. The field itself is not involved in clearing the memoized value at all.\r\n\r\nRepeated fields are a different story. If we were completely resetting a repeated field to a new array, the memoized encoding would be correctly cleared, but because the field array we are pushing into doesn't have any concept of a message, let alone the specific message instance the field belongs to, there is no way to clear the memoized encoded message.\r\n\r\nWe need to remove the memoization until we can find a better approach.\r\n\r\nFixes #304.\r\n\r\n// @film42 @abrandoned @goddardc","created_at":"2016-02-18T03:28:04Z","updated_at":"2016-02-19T04:38:15Z","closed_at":"2016-02-19T04:38:15Z","merged_at":"2016-02-19T04:38:15Z","merge_commit_sha":"6443d848cb02b2fde1ad75ceae8caf03f7591754","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/305/commits","review_comments_url":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/305/comments","review_comment_url":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/305/comments","statuses_url":"https://api.github.com/repos/ruby-protobuf/protobuf/statuses/ad4d8523f76364db5614243f7cd12ec66fa102f5","head":{"label":"ruby-protobuf:ah/revert_memoize_on_encode","ref":"ah/revert_memoize_on_encode","sha":"ad4d8523f76364db5614243f7cd12ec66fa102f5","user":{"login":"ruby-protobuf","id":12246323,"avatar_url":"https://avatars.githubusercontent.com/u/12246323?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-protobuf","html_url":"https://github.com/ruby-protobuf","followers_url":"https://api.github.com/users/ruby-protobuf/followers","following_url":"https://api.github.com/users/ruby-protobuf/following{/other_user}","gists_url":"https://api.github.com/users/ruby-protobuf/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-protobuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-protobuf/subscriptions","organizations_url":"https://api.github.com/users/ruby-protobuf/orgs","repos_url":"https://api.github.com/users/ruby-protobuf/repos","events_url":"https://api.github.com/users/ruby-protobuf/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-protobuf/received_events","type":"Organization","site_admin":false},"repo":{"id":2724591,"name":"protobuf","full_name":"ruby-protobuf/protobuf","owner":{"login":"ruby-protobuf","id":12246323,"avatar_url":"https://avatars.githubusercontent.com/u/12246323?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-protobuf","html_url":"https://github.com/ruby-protobuf","followers_url":"https://api.github.com/users/ruby-protobuf/followers","following_url":"https://api.github.com/users/ruby-protobuf/following{/other_user}","gists_url":"https://api.github.com/users/ruby-protobuf/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-protobuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-protobuf/subscriptions","organizations_url":"https://api.github.com/users/ruby-protobuf/orgs","repos_url":"https://api.github.com/users/ruby-protobuf/repos","events_url":"https://api.github.com/users/ruby-protobuf/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-protobuf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ruby-protobuf/protobuf","description":"A pure ruby implementation of Google's Protocol Buffers","fork":false,"url":"https://api.github.com/repos/ruby-protobuf/protobuf","forks_url":"https://api.github.com/repos/ruby-protobuf/protobuf/forks","keys_url":"https://api.github.com/repos/ruby-protobuf/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruby-protobuf/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruby-protobuf/protobuf/teams","hooks_url":"https://api.github.com/repos/ruby-protobuf/protobuf/hooks","issue_events_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/ruby-protobuf/protobuf/events","assignees_url":"https://api.github.com/repos/ruby-protobuf/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/ruby-protobuf/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/ruby-protobuf/protobuf/tags","blobs_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruby-protobuf/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/ruby-protobuf/protobuf/languages","stargazers_url":"https://api.github.com/repos/ruby-protobuf/protobuf/stargazers","contributors_url":"https://api.github.com/repos/ruby-protobuf/protobuf/contributors","subscribers_url":"https://api.github.com/repos/ruby-protobuf/protobuf/subscribers","subscription_url":"https://api.github.com/repos/ruby-protobuf/protobuf/subscription","commits_url":"https://api.github.com/repos/ruby-protobuf/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruby-protobuf/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruby-protobuf/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/ruby-protobuf/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruby-protobuf/protobuf/merges","archive_url":"https://api.github.com/repos/ruby-protobuf/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruby-protobuf/protobuf/downloads","issues_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/ruby-protobuf/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/ruby-protobuf/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruby-protobuf/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/ruby-protobuf/protobuf/releases{/id}","deployments_url":"https://api.github.com/repos/ruby-protobuf/protobuf/deployments","created_at":"2011-11-07T06:52:37Z","updated_at":"2016-02-16T10:57:24Z","pushed_at":"2016-02-19T04:38:15Z","git_url":"git://github.com/ruby-protobuf/protobuf.git","ssh_url":"git@github.com:ruby-protobuf/protobuf.git","clone_url":"https://github.com/ruby-protobuf/protobuf.git","svn_url":"https://github.com/ruby-protobuf/protobuf","homepage":"https://github.com/ruby-protobuf","size":3760,"stargazers_count":197,"watchers_count":197,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":31,"forks":56,"open_issues":31,"watchers":197,"default_branch":"master"}},"base":{"label":"ruby-protobuf:master","ref":"master","sha":"2970c0d662ce5619c3f52b6d5f2f6a833603d8ad","user":{"login":"ruby-protobuf","id":12246323,"avatar_url":"https://avatars.githubusercontent.com/u/12246323?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-protobuf","html_url":"https://github.com/ruby-protobuf","followers_url":"https://api.github.com/users/ruby-protobuf/followers","following_url":"https://api.github.com/users/ruby-protobuf/following{/other_user}","gists_url":"https://api.github.com/users/ruby-protobuf/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-protobuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-protobuf/subscriptions","organizations_url":"https://api.github.com/users/ruby-protobuf/orgs","repos_url":"https://api.github.com/users/ruby-protobuf/repos","events_url":"https://api.github.com/users/ruby-protobuf/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-protobuf/received_events","type":"Organization","site_admin":false},"repo":{"id":2724591,"name":"protobuf","full_name":"ruby-protobuf/protobuf","owner":{"login":"ruby-protobuf","id":12246323,"avatar_url":"https://avatars.githubusercontent.com/u/12246323?v=3","gravatar_id":"","url":"https://api.github.com/users/ruby-protobuf","html_url":"https://github.com/ruby-protobuf","followers_url":"https://api.github.com/users/ruby-protobuf/followers","following_url":"https://api.github.com/users/ruby-protobuf/following{/other_user}","gists_url":"https://api.github.com/users/ruby-protobuf/gists{/gist_id}","starred_url":"https://api.github.com/users/ruby-protobuf/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ruby-protobuf/subscriptions","organizations_url":"https://api.github.com/users/ruby-protobuf/orgs","repos_url":"https://api.github.com/users/ruby-protobuf/repos","events_url":"https://api.github.com/users/ruby-protobuf/events{/privacy}","received_events_url":"https://api.github.com/users/ruby-protobuf/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ruby-protobuf/protobuf","description":"A pure ruby implementation of Google's Protocol Buffers","fork":false,"url":"https://api.github.com/repos/ruby-protobuf/protobuf","forks_url":"https://api.github.com/repos/ruby-protobuf/protobuf/forks","keys_url":"https://api.github.com/repos/ruby-protobuf/protobuf/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ruby-protobuf/protobuf/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ruby-protobuf/protobuf/teams","hooks_url":"https://api.github.com/repos/ruby-protobuf/protobuf/hooks","issue_events_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/events{/number}","events_url":"https://api.github.com/repos/ruby-protobuf/protobuf/events","assignees_url":"https://api.github.com/repos/ruby-protobuf/protobuf/assignees{/user}","branches_url":"https://api.github.com/repos/ruby-protobuf/protobuf/branches{/branch}","tags_url":"https://api.github.com/repos/ruby-protobuf/protobuf/tags","blobs_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/refs{/sha}","trees_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ruby-protobuf/protobuf/statuses/{sha}","languages_url":"https://api.github.com/repos/ruby-protobuf/protobuf/languages","stargazers_url":"https://api.github.com/repos/ruby-protobuf/protobuf/stargazers","contributors_url":"https://api.github.com/repos/ruby-protobuf/protobuf/contributors","subscribers_url":"https://api.github.com/repos/ruby-protobuf/protobuf/subscribers","subscription_url":"https://api.github.com/repos/ruby-protobuf/protobuf/subscription","commits_url":"https://api.github.com/repos/ruby-protobuf/protobuf/commits{/sha}","git_commits_url":"https://api.github.com/repos/ruby-protobuf/protobuf/git/commits{/sha}","comments_url":"https://api.github.com/repos/ruby-protobuf/protobuf/comments{/number}","issue_comment_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/comments{/number}","contents_url":"https://api.github.com/repos/ruby-protobuf/protobuf/contents/{+path}","compare_url":"https://api.github.com/repos/ruby-protobuf/protobuf/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ruby-protobuf/protobuf/merges","archive_url":"https://api.github.com/repos/ruby-protobuf/protobuf/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ruby-protobuf/protobuf/downloads","issues_url":"https://api.github.com/repos/ruby-protobuf/protobuf/issues{/number}","pulls_url":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls{/number}","milestones_url":"https://api.github.com/repos/ruby-protobuf/protobuf/milestones{/number}","notifications_url":"https://api.github.com/repos/ruby-protobuf/protobuf/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ruby-protobuf/protobuf/labels{/name}","releases_url":"https://api.github.com/repos/ruby-protobuf/protobuf/releases{/id}","deployments_url":"https://api.github.com/repos/ruby-protobuf/protobuf/deployments","created_at":"2011-11-07T06:52:37Z","updated_at":"2016-02-16T10:57:24Z","pushed_at":"2016-02-19T04:38:15Z","git_url":"git://github.com/ruby-protobuf/protobuf.git","ssh_url":"git@github.com:ruby-protobuf/protobuf.git","clone_url":"https://github.com/ruby-protobuf/protobuf.git","svn_url":"https://github.com/ruby-protobuf/protobuf","homepage":"https://github.com/ruby-protobuf","size":3760,"stargazers_count":197,"watchers_count":197,"language":"Ruby","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":56,"mirror_url":null,"open_issues_count":31,"forks":56,"open_issues":31,"watchers":197,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/305"},"html":{"href":"https://github.com/ruby-protobuf/protobuf/pull/305"},"issue":{"href":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/305"},"comments":{"href":"https://api.github.com/repos/ruby-protobuf/protobuf/issues/305/comments"},"review_comments":{"href":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/305/comments"},"review_comment":{"href":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ruby-protobuf/protobuf/pulls/305/commits"},"statuses":{"href":"https://api.github.com/repos/ruby-protobuf/protobuf/statuses/ad4d8523f76364db5614243f7cd12ec66fa102f5"}},"merged":true,"mergeable":null,"mergeable_state":"unknown","merged_by":{"login":"liveh2o","id":207933,"avatar_url":"https://avatars.githubusercontent.com/u/207933?v=3","gravatar_id":"","url":"https://api.github.com/users/liveh2o","html_url":"https://github.com/liveh2o","followers_url":"https://api.github.com/users/liveh2o/followers","following_url":"https://api.github.com/users/liveh2o/following{/other_user}","gists_url":"https://api.github.com/users/liveh2o/gists{/gist_id}","starred_url":"https://api.github.com/users/liveh2o/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/liveh2o/subscriptions","organizations_url":"https://api.github.com/users/liveh2o/orgs","repos_url":"https://api.github.com/users/liveh2o/repos","events_url":"https://api.github.com/users/liveh2o/events{/privacy}","received_events_url":"https://api.github.com/users/liveh2o/received_events","type":"User","site_admin":false},"comments":3,"review_comments":0,"commits":1,"additions":4,"deletions":69,"changed_files":6}}