{"action":"created","issue":{"url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/306","repository_url":"https://api.github.com/repos/google/protobuf-gradle-plugin","labels_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/306/labels{/name}","comments_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/306/comments","events_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/306/events","html_url":"https://github.com/google/protobuf-gradle-plugin/issues/306","id":420575778,"node_id":"MDU6SXNzdWU0MjA1NzU3Nzg=","number":306,"title":"Cannot compile when many messages with same name","user":{"login":"jcornaz","id":2535178,"node_id":"MDQ6VXNlcjI1MzUxNzg=","avatar_url":"https://avatars2.githubusercontent.com/u/2535178?v=4","gravatar_id":"","url":"https://api.github.com/users/jcornaz","html_url":"https://github.com/jcornaz","followers_url":"https://api.github.com/users/jcornaz/followers","following_url":"https://api.github.com/users/jcornaz/following{/other_user}","gists_url":"https://api.github.com/users/jcornaz/gists{/gist_id}","starred_url":"https://api.github.com/users/jcornaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcornaz/subscriptions","organizations_url":"https://api.github.com/users/jcornaz/orgs","repos_url":"https://api.github.com/users/jcornaz/repos","events_url":"https://api.github.com/users/jcornaz/events{/privacy}","received_events_url":"https://api.github.com/users/jcornaz/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2019-03-13T15:48:06Z","updated_at":"2019-03-13T16:22:16Z","closed_at":null,"author_association":"NONE","body":"Please consider the following proto files:\r\n\r\n`Request.proto`\r\n```proto\r\noption java_outer_classname = \"Request\"\r\n\r\nmessage Foo {\r\n}\r\n```\r\n\r\n`Response.proto`\r\n```proto\r\noption java_outer_classname = \"Response\"\r\n\r\nmessage Foo {\r\n}\r\n```\r\n\r\nRunning `./gradlew generateProto` returns the following error:\r\n\r\n```\r\nResponse.proto:3:9: \"Foo\" is already defined in file \"Request.proto\".\r\n```\r\n\r\nBut:\r\n1. We encounter this issue in the context of migrating from maven to gradle and It worked fine using maven.\r\n2. It should not be a problem, because the two messages have different outer-class names."},"comment":{"url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/comments/472496880","html_url":"https://github.com/google/protobuf-gradle-plugin/issues/306#issuecomment-472496880","issue_url":"https://api.github.com/repos/google/protobuf-gradle-plugin/issues/306","id":472496880,"node_id":"MDEyOklzc3VlQ29tbWVudDQ3MjQ5Njg4MA==","user":{"login":"jcornaz","id":2535178,"node_id":"MDQ6VXNlcjI1MzUxNzg=","avatar_url":"https://avatars2.githubusercontent.com/u/2535178?v=4","gravatar_id":"","url":"https://api.github.com/users/jcornaz","html_url":"https://github.com/jcornaz","followers_url":"https://api.github.com/users/jcornaz/followers","following_url":"https://api.github.com/users/jcornaz/following{/other_user}","gists_url":"https://api.github.com/users/jcornaz/gists{/gist_id}","starred_url":"https://api.github.com/users/jcornaz/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jcornaz/subscriptions","organizations_url":"https://api.github.com/users/jcornaz/orgs","repos_url":"https://api.github.com/users/jcornaz/repos","events_url":"https://api.github.com/users/jcornaz/events{/privacy}","received_events_url":"https://api.github.com/users/jcornaz/received_events","type":"User","site_admin":false},"created_at":"2019-03-13T16:22:16Z","updated_at":"2019-03-13T16:22:16Z","author_association":"NONE","body":">Assuming the protobuf package is the same, then the messages have the same protobuf name. So it is definitely a problem.\r\n\r\nWhy?\r\n\r\nLet's assume the package is `com.mycompany.mysoftware`. Then I expect the following generated message classes:\r\n* `com.mycompany.mysoftware.Request.Foo`\r\n* `com.mycompany.mysoftware.Response.Foo`\r\n\r\nWhere is the problem exactly?\r\n\r\n>If you generated these are two separate projects, then it would probably be fine.\r\n\r\nThat's not an option. I gave my example with two files, but in practice we have dozen of them."}}
{"actor":{"display_login":"jcornaz"}}