{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/rules_go/issues/707","repository_url":"https://api.github.com/repos/bazelbuild/rules_go","labels_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/707/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/707/comments","events_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/707/events","html_url":"https://github.com/bazelbuild/rules_go/issues/707","id":249164656,"number":707,"title":"Update go_proto_library to use aspects referencing proto_library","user":{"login":"pmbethe09","id":11632338,"avatar_url":"https://avatars2.githubusercontent.com/u/11632338?v=4","gravatar_id":"","url":"https://api.github.com/users/pmbethe09","html_url":"https://github.com/pmbethe09","followers_url":"https://api.github.com/users/pmbethe09/followers","following_url":"https://api.github.com/users/pmbethe09/following{/other_user}","gists_url":"https://api.github.com/users/pmbethe09/gists{/gist_id}","starred_url":"https://api.github.com/users/pmbethe09/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pmbethe09/subscriptions","organizations_url":"https://api.github.com/users/pmbethe09/orgs","repos_url":"https://api.github.com/users/pmbethe09/repos","events_url":"https://api.github.com/users/pmbethe09/events{/privacy}","received_events_url":"https://api.github.com/users/pmbethe09/received_events","type":"User","site_admin":false},"labels":[{"id":598924272,"url":"https://api.github.com/repos/bazelbuild/rules_go/labels/proto","name":"proto","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2017-08-09T21:16:45Z","updated_at":"2017-08-19T02:53:45Z","closed_at":null,"body":"bazel now has java_proto_library and cc_proto_library which do exactly that.  \r\ngo_proto_library should do the same, and in the case of gazelle finding .proto, it should generate both a proto_library for the srcs and a go_proto_library which references that."},"comment":{"url":"https://api.github.com/repos/bazelbuild/rules_go/issues/comments/323495506","html_url":"https://github.com/bazelbuild/rules_go/issues/707#issuecomment-323495506","issue_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/707","id":323495506,"user":{"login":"balasanjay","id":630917,"avatar_url":"https://avatars3.githubusercontent.com/u/630917?v=4","gravatar_id":"","url":"https://api.github.com/users/balasanjay","html_url":"https://github.com/balasanjay","followers_url":"https://api.github.com/users/balasanjay/followers","following_url":"https://api.github.com/users/balasanjay/following{/other_user}","gists_url":"https://api.github.com/users/balasanjay/gists{/gist_id}","starred_url":"https://api.github.com/users/balasanjay/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/balasanjay/subscriptions","organizations_url":"https://api.github.com/users/balasanjay/orgs","repos_url":"https://api.github.com/users/balasanjay/repos","events_url":"https://api.github.com/users/balasanjay/events{/privacy}","received_events_url":"https://api.github.com/users/balasanjay/received_events","type":"User","site_admin":false},"created_at":"2017-08-19T02:53:45Z","updated_at":"2017-08-19T02:53:45Z","body":"I see. The import path issue is rather unfortunate, as you say.\r\n\r\n(warning: I am a complete novice wrt to Skylark)\r\n\r\nIs the crux of the issue that the Skylark implementation needs the package path to build the command-line for calling gc and can't read files to get it?\r\n\r\nIf so, would a slightly hacky workaround would be to substitute the compiler for a program that reads the files, extracts the information, builds command-line args for gc and then invokes gc via exec.Command? Basically, each compile would emit its desired package as a secondary output, and downstream rules would read those files to build the importpath flag.\r\n\r\n\r\n\r\nAlso, re the \"add extra types to the generated package\" point: it seems to me that there should be a genrule-esque (go_gen_proto_library?) solution to replace the go generate use cases, and the \"more correct\" go_proto_library approach, that folks can migrate to over time."}}
{"actor":{"display_login":"balasanjay"}}