{"action":"created","issue":{"url":"https://api.github.com/repos/golang/protobuf/issues/543","repository_url":"https://api.github.com/repos/golang/protobuf","labels_url":"https://api.github.com/repos/golang/protobuf/issues/543/labels{/name}","comments_url":"https://api.github.com/repos/golang/protobuf/issues/543/comments","events_url":"https://api.github.com/repos/golang/protobuf/issues/543/events","html_url":"https://github.com/golang/protobuf/pull/543","id":301838819,"number":543,"title":"protoc-gen-go: handle package import names per-file","user":{"login":"neild","id":52544,"avatar_url":"https://avatars1.githubusercontent.com/u/52544?v=4","gravatar_id":"","url":"https://api.github.com/users/neild","html_url":"https://github.com/neild","followers_url":"https://api.github.com/users/neild/followers","following_url":"https://api.github.com/users/neild/following{/other_user}","gists_url":"https://api.github.com/users/neild/gists{/gist_id}","starred_url":"https://api.github.com/users/neild/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neild/subscriptions","organizations_url":"https://api.github.com/users/neild/orgs","repos_url":"https://api.github.com/users/neild/repos","events_url":"https://api.github.com/users/neild/events{/privacy}","received_events_url":"https://api.github.com/users/neild/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-03-02T17:10:08Z","updated_at":"2018-04-10T23:54:15Z","closed_at":"2018-03-03T08:01:55Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/golang/protobuf/pulls/543","html_url":"https://github.com/golang/protobuf/pull/543","diff_url":"https://github.com/golang/protobuf/pull/543.diff","patch_url":"https://github.com/golang/protobuf/pull/543.patch"},"body":"Rework the handling of imported packages.\r\n\r\nDo not add imported protobuf packages to a global registry. Instead,\r\nmaintain a per-file list of packages and names. This avoids imports\r\nin one file affecting the generated code in a second one.\r\n\r\nConsistently deal with imports in terms of import path, rather than\r\nsource file. This avoids imports of two .proto files in the same\r\nGo package producing redundant import statements.\r\n\r\nIntroduce ImportPath and PackageName types to prevent confusion about\r\nwhich values contain import paths (\"github.com/golang/protobuf/proto\")\r\nand which contain package names (\"proto\").\r\n\r\nConvert many uses of FileDescriptorProto to FileDescriptor, for\r\nconsistency and general convenience."},"comment":{"url":"https://api.github.com/repos/golang/protobuf/issues/comments/380283276","html_url":"https://github.com/golang/protobuf/pull/543#issuecomment-380283276","issue_url":"https://api.github.com/repos/golang/protobuf/issues/543","id":380283276,"user":{"login":"meling","id":810999,"avatar_url":"https://avatars2.githubusercontent.com/u/810999?v=4","gravatar_id":"","url":"https://api.github.com/users/meling","html_url":"https://github.com/meling","followers_url":"https://api.github.com/users/meling/followers","following_url":"https://api.github.com/users/meling/following{/other_user}","gists_url":"https://api.github.com/users/meling/gists{/gist_id}","starred_url":"https://api.github.com/users/meling/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/meling/subscriptions","organizations_url":"https://api.github.com/users/meling/orgs","repos_url":"https://api.github.com/users/meling/repos","events_url":"https://api.github.com/users/meling/events{/privacy}","received_events_url":"https://api.github.com/users/meling/received_events","type":"User","site_admin":false},"created_at":"2018-04-10T23:54:15Z","updated_at":"2018-04-10T23:54:15Z","author_association":"NONE","body":"Thanks for your explanation @neild, and I apologize for my ignorance. I've mainly used gogo/protobuf due to other features. Is it correct that the golang/protobuf behavior is to supply only unique import paths also from plugins??\r\n\r\n@awalterschulze: Could you weigh in on the current approach with \"full import path\" as import aliases instead of the short ones that @neild refers to? I don't know the rationale for it; I thought it was from golang/protobuf and not gogo/protobuf. I mean if golang/protobuf doesn't produce these long names, I won't need my fix, unless there is some gogo/protobuf reason for them...\r\n\r\n(Apologies for not having had the time to examine code and testing things yet... but wanted to ask anyway.)"}}
{"actor":{"display_login":"meling"}}