{"action":"created","issue":{"url":"https://api.github.com/repos/milton0825/protolock/issues/1","repository_url":"https://api.github.com/repos/milton0825/protolock","labels_url":"https://api.github.com/repos/milton0825/protolock/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/milton0825/protolock/issues/1/comments","events_url":"https://api.github.com/repos/milton0825/protolock/issues/1/events","html_url":"https://github.com/milton0825/protolock/pull/1","id":375618069,"node_id":"MDExOlB1bGxSZXF1ZXN0MjI3MDIyNDc2","number":1,"title":"[POC] No field removal for messages annotated with persisted and its dependencies","user":{"login":"milton0825","id":6065051,"node_id":"MDQ6VXNlcjYwNjUwNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/6065051?v=4","gravatar_id":"","url":"https://api.github.com/users/milton0825","html_url":"https://github.com/milton0825","followers_url":"https://api.github.com/users/milton0825/followers","following_url":"https://api.github.com/users/milton0825/following{/other_user}","gists_url":"https://api.github.com/users/milton0825/gists{/gist_id}","starred_url":"https://api.github.com/users/milton0825/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milton0825/subscriptions","organizations_url":"https://api.github.com/users/milton0825/orgs","repos_url":"https://api.github.com/users/milton0825/repos","events_url":"https://api.github.com/users/milton0825/events{/privacy}","received_events_url":"https://api.github.com/users/milton0825/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-30T17:53:25Z","updated_at":"2018-10-30T22:08:19Z","closed_at":null,"author_association":"OWNER","pull_request":{"url":"https://api.github.com/repos/milton0825/protolock/pulls/1","html_url":"https://github.com/milton0825/protolock/pull/1","diff_url":"https://github.com/milton0825/protolock/pull/1.diff","patch_url":"https://github.com/milton0825/protolock/pull/1.patch"},"body":"This is a brute-force solution and it can be further optimized\r\n\r\nThis is a POC to check if there is any field removal for messages (and its dependencies) annotated with persisted.\r\n\r\nFor example, removing address_info or address will violate the rule. \r\n```\r\nmessage User {\r\n\toption (persisted) = true;\r\n \tAddressInfo address_info = 1 \r\n}\r\nmessage AddressInfo {\r\n\tstring address = 1\r\n} \r\nmessage PhoneInfo {\r\n\tString phone = 1\r\n}\r\n\r\n```"},"comment":{"url":"https://api.github.com/repos/milton0825/protolock/issues/comments/434487969","html_url":"https://github.com/milton0825/protolock/pull/1#issuecomment-434487969","issue_url":"https://api.github.com/repos/milton0825/protolock/issues/1","id":434487969,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNDQ4Nzk2OQ==","user":{"login":"milton0825","id":6065051,"node_id":"MDQ6VXNlcjYwNjUwNTE=","avatar_url":"https://avatars1.githubusercontent.com/u/6065051?v=4","gravatar_id":"","url":"https://api.github.com/users/milton0825","html_url":"https://github.com/milton0825","followers_url":"https://api.github.com/users/milton0825/followers","following_url":"https://api.github.com/users/milton0825/following{/other_user}","gists_url":"https://api.github.com/users/milton0825/gists{/gist_id}","starred_url":"https://api.github.com/users/milton0825/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/milton0825/subscriptions","organizations_url":"https://api.github.com/users/milton0825/orgs","repos_url":"https://api.github.com/users/milton0825/repos","events_url":"https://api.github.com/users/milton0825/events{/privacy}","received_events_url":"https://api.github.com/users/milton0825/received_events","type":"User","site_admin":false},"created_at":"2018-10-30T22:08:19Z","updated_at":"2018-10-30T22:08:19Z","author_association":"OWNER","body":"@billonahill \r\nCan you clarify a bit on \r\n> Could you modify it so that option (persisted) = true; is defined on the User message and not the field?\r\n\r\nCurrently I am using the protobuf builtin message-level `option` [1] to annotate the protobuf message. There are three different `option` that protobuf supports:\r\n- File level\r\n- Message level\r\n```\r\nmessage MyMessage {\r\n  option (my_message_option) = 1234;\r\n  optional string bar = 2;\r\n}\r\n```\r\n\r\n- Field level\r\n```\r\nmessage MyMessage {\r\n  optional int32 foo = 1 [(my_field_option) = 4.5];\r\n  optional string bar = 2;\r\n}\r\n```\r\n\r\n\r\nReference:\r\n[1] https://developers.google.com/protocol-buffers/docs/proto#customoptions\r\n"}}
{"actor":{"display_login":"milton0825"}}