{"action":"created","issue":{"url":"https://api.github.com/repos/golang/protobuf/issues/680","repository_url":"https://api.github.com/repos/golang/protobuf","labels_url":"https://api.github.com/repos/golang/protobuf/issues/680/labels{/name}","comments_url":"https://api.github.com/repos/golang/protobuf/issues/680/comments","events_url":"https://api.github.com/repos/golang/protobuf/issues/680/events","html_url":"https://github.com/golang/protobuf/issues/680","id":350503203,"node_id":"MDU6SXNzdWUzNTA1MDMyMDM=","number":680,"title":"protoc-gen-go: should not generate invalid package names","user":{"login":"nicks","id":278641,"node_id":"MDQ6VXNlcjI3ODY0MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/278641?v=4","gravatar_id":"","url":"https://api.github.com/users/nicks","html_url":"https://github.com/nicks","followers_url":"https://api.github.com/users/nicks/followers","following_url":"https://api.github.com/users/nicks/following{/other_user}","gists_url":"https://api.github.com/users/nicks/gists{/gist_id}","starred_url":"https://api.github.com/users/nicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicks/subscriptions","organizations_url":"https://api.github.com/users/nicks/orgs","repos_url":"https://api.github.com/users/nicks/repos","events_url":"https://api.github.com/users/nicks/events{/privacy}","received_events_url":"https://api.github.com/users/nicks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":3,"created_at":"2018-08-14T16:26:41Z","updated_at":"2018-08-15T03:27:19Z","closed_at":null,"author_association":"NONE","body":"Using protoc-gen-go at HEAD, the tool doesn't really do any validation of package names. For example, if you have,\r\n\r\n```\r\noption go_package = \"hi this is an invalid package name\";\r\n```\r\nthen protoc ingores the file quietly. Worse, if you have a subtly invalid package name like:\r\n\r\n```\r\noption go_package = \"github.com/typo-two-slashes//foo\";\r\n```\r\n\r\nprotoc will happily generate code that doesn't compile.\r\n\r\nWould you accept a PR to add some validation here?"},"comment":{"url":"https://api.github.com/repos/golang/protobuf/issues/comments/413083417","html_url":"https://github.com/golang/protobuf/issues/680#issuecomment-413083417","issue_url":"https://api.github.com/repos/golang/protobuf/issues/680","id":413083417,"node_id":"MDEyOklzc3VlQ29tbWVudDQxMzA4MzQxNw==","user":{"login":"nicks","id":278641,"node_id":"MDQ6VXNlcjI3ODY0MQ==","avatar_url":"https://avatars2.githubusercontent.com/u/278641?v=4","gravatar_id":"","url":"https://api.github.com/users/nicks","html_url":"https://github.com/nicks","followers_url":"https://api.github.com/users/nicks/followers","following_url":"https://api.github.com/users/nicks/following{/other_user}","gists_url":"https://api.github.com/users/nicks/gists{/gist_id}","starred_url":"https://api.github.com/users/nicks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicks/subscriptions","organizations_url":"https://api.github.com/users/nicks/orgs","repos_url":"https://api.github.com/users/nicks/repos","events_url":"https://api.github.com/users/nicks/events{/privacy}","received_events_url":"https://api.github.com/users/nicks/received_events","type":"User","site_admin":false},"created_at":"2018-08-15T03:27:19Z","updated_at":"2018-08-15T03:27:19Z","author_association":"NONE","body":"When people say, \"warnings don't work\", they're usually saying \"warnings aren't a good mechanism to nudge people to fix minor issues.\" \r\n\r\nI've never heard someone use that point to argue \"tools should fail silently and give no diagnostic output on why they're failing\". I hope that's not what you're saying here.\r\n\r\nQuestion: It sounds like the team's position is \"we can't ever add new errors because that would break backwards compatibility\". Is my understanding correct? Would that position change with vgo and the ability to do major version bumps?\r\n\r\nTo answer your question: protoc-gen-go will generate something like:\r\n\r\n```\r\npackage proto // import \"github.com/typo-two-slashes//foo\"\r\n```\r\n\r\nwhich will fail to compile due to import path checking (https://golang.org/pkg/cmd/go/#hdr-Import_path_checking)\r\n\r\n\r\n"}}
{"actor":{"display_login":"nicks"}}