{"action":"created","issue":{"url":"https://api.github.com/repos/gogo/protobuf/issues/39","labels_url":"https://api.github.com/repos/gogo/protobuf/issues/39/labels{/name}","comments_url":"https://api.github.com/repos/gogo/protobuf/issues/39/comments","events_url":"https://api.github.com/repos/gogo/protobuf/issues/39/events","html_url":"https://github.com/gogo/protobuf/issues/39","id":54286894,"number":39,"title":"customizing gogo proto","user":{"login":"PatrickDropbox","id":6808940,"avatar_url":"https://avatars.githubusercontent.com/u/6808940?v=3","gravatar_id":"","url":"https://api.github.com/users/PatrickDropbox","html_url":"https://github.com/PatrickDropbox","followers_url":"https://api.github.com/users/PatrickDropbox/followers","following_url":"https://api.github.com/users/PatrickDropbox/following{/other_user}","gists_url":"https://api.github.com/users/PatrickDropbox/gists{/gist_id}","starred_url":"https://api.github.com/users/PatrickDropbox/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PatrickDropbox/subscriptions","organizations_url":"https://api.github.com/users/PatrickDropbox/orgs","repos_url":"https://api.github.com/users/PatrickDropbox/repos","events_url":"https://api.github.com/users/PatrickDropbox/events{/privacy}","received_events_url":"https://api.github.com/users/PatrickDropbox/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":26,"created_at":"2015-01-14T05:53:53Z","updated_at":"2015-05-15T19:14:30Z","closed_at":null,"body":"There are a bunch of dropbox internal customization which I'm interested in upstreaming.  In particular:\r\n1. We've rename Size() to ProtoSize()\r\n2. We've enable marshaller, unmarshaller, and sizer by default\r\n\r\nTo avoid breaking the rest of the world, I was thinking of creating a struct which would holds the default values (and we'll only patch this struct within dropbox).  something like\r\n\r\n```go\r\ntype DefaultParams struct {\r\n   sizeMethodName string\r\n   isMarshaller bool\r\n   isUnmarshaller bool\r\n   isSizer bool\r\n}\r\n```\r\n\r\nthe world would use:\r\n```\r\nparams := DefaultParams{\"Size\", false, false, false}\r\n```\r\n\r\nwhile dropbox would override the defaults to:\r\n```\r\nparams := DefaultParams{\"ProtoSize\", true, true, true}\r\n```\r\n\r\nIs this acceptable?\r\n\r\n\r\nAlso, on the experimental side, I want to backport plugins from https://github.com/dropbox/goprotoc to generate proper mutator APIs (we've got burn by goproto's lack of proper mutator api a few of time recently, especially around repeated field).  Is this something you would be interested in?\r\n\r\n\r\nThanks,\r\nPatrick"},"comment":{"url":"https://api.github.com/repos/gogo/protobuf/issues/comments/102496982","html_url":"https://github.com/gogo/protobuf/issues/39#issuecomment-102496982","issue_url":"https://api.github.com/repos/gogo/protobuf/issues/39","id":102496982,"user":{"login":"awalterschulze","id":1829933,"avatar_url":"https://avatars.githubusercontent.com/u/1829933?v=3","gravatar_id":"","url":"https://api.github.com/users/awalterschulze","html_url":"https://github.com/awalterschulze","followers_url":"https://api.github.com/users/awalterschulze/followers","following_url":"https://api.github.com/users/awalterschulze/following{/other_user}","gists_url":"https://api.github.com/users/awalterschulze/gists{/gist_id}","starred_url":"https://api.github.com/users/awalterschulze/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/awalterschulze/subscriptions","organizations_url":"https://api.github.com/users/awalterschulze/orgs","repos_url":"https://api.github.com/users/awalterschulze/repos","events_url":"https://api.github.com/users/awalterschulze/events{/privacy}","received_events_url":"https://api.github.com/users/awalterschulze/received_events","type":"User","site_admin":false},"created_at":"2015-05-15T19:14:29Z","updated_at":"2015-05-15T19:14:29Z","body":"Cool no problem :)\r\n\r\nYes I was thinking a parallel binary lets say protoc-gen-gogostd\r\nThen devs would run protoc --gogostd_out=. filename.proto\r\nNo importing of gogo.proto, since this is only necessary for protoc to compile the extensions.\r\nStandard extensions (which should be designed, or maybe you already have?) will be added by protoc-gen-gogostd and it will call the functions to do the normal code generation.\r\n\r\nSo I am pretty sure that is the same as number 2."}}