{"action":"created","issue":{"url":"https://api.github.com/repos/pubref/rules_protobuf/issues/251","repository_url":"https://api.github.com/repos/pubref/rules_protobuf","labels_url":"https://api.github.com/repos/pubref/rules_protobuf/issues/251/labels{/name}","comments_url":"https://api.github.com/repos/pubref/rules_protobuf/issues/251/comments","events_url":"https://api.github.com/repos/pubref/rules_protobuf/issues/251/events","html_url":"https://github.com/pubref/rules_protobuf/issues/251","id":373233999,"node_id":"MDU6SXNzdWUzNzMyMzM5OTk=","number":251,"title":"including well known protos in ruby_proto_compile","user":{"login":"erickj","id":39651,"node_id":"MDQ6VXNlcjM5NjUx","avatar_url":"https://avatars1.githubusercontent.com/u/39651?v=4","gravatar_id":"","url":"https://api.github.com/users/erickj","html_url":"https://github.com/erickj","followers_url":"https://api.github.com/users/erickj/followers","following_url":"https://api.github.com/users/erickj/following{/other_user}","gists_url":"https://api.github.com/users/erickj/gists{/gist_id}","starred_url":"https://api.github.com/users/erickj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickj/subscriptions","organizations_url":"https://api.github.com/users/erickj/orgs","repos_url":"https://api.github.com/users/erickj/repos","events_url":"https://api.github.com/users/erickj/events{/privacy}","received_events_url":"https://api.github.com/users/erickj/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-10-23T22:47:32Z","updated_at":"2018-10-23T22:55:45Z","closed_at":null,"author_association":"NONE","body":"I'm sorry to bring up what seems to be an oft trodden topic\r\n\r\nhttps://github.com/pubref/rules_protobuf/issues?utf8=%E2%9C%93&q=is%3Aissue+well+known+\r\nhttps://groups.google.com/forum/?pli=1#!topic/bazel-discuss/F02nBRmoWfY\r\n\r\nBut I'm unable to build ruby_proto_compile rules with a well known proto dependency. I've tried the following configurations w/ the associated errors (`bzqb` is `bazel query <rule> --output build`):\r\n\r\nAttempt 1, guessing at different [proto_compile options](https://github.com/pubref/rules_protobuf/tree/master/protobuf#proto_compile)\r\n\r\n```\r\n$ bzqb //proto:ruby_protos\r\n# /home/erick/workspace/src/io.vos/proto/BUILD:42:1\r\nproto_compile(\r\n  name = \"ruby_protos\",\r\n  generator_name = \"ruby_protos\",\r\n  generator_function = \"ruby_proto_compile\",\r\n  generator_location = \"proto/BUILD:42\",\r\n  langs = [\"@org_pubref_rules_protobuf//ruby:ruby\"],\r\n  protos = [\"//proto:all_proto_files\"],\r\n  inputs = [\"@com_google_protobuf//:well_known_protos\"],\r\n)\r\n00:41:51 [erick@lenobot:~/workspace/src/io.vos] (git:master *$)\r\n$ bazel build //proto:ruby_protos\r\nINFO: Analysed target //proto:ruby_protos (0 packages loaded).\r\nINFO: Found 1 target...\r\nERROR: /home/erick/workspace/src/io.vos/proto/BUILD:42:1: error executing shell command: '/bin/bash -c bazel-out/host/bin/external/com_google_protobuf/protoc --descriptor_set_out=bazel-out/k8-fastbuild/genfiles/proto/ruby_protos.descriptor_set --ruby_out=bazel-out/k8-fastbuild/genfiles ...' failed (Exit 1)\r\ngoogle/protobuf/any.proto: File not found.\r\nproto/io/vos/eip/eip.proto: Import \"google/protobuf/any.proto\" was not found or had errors.\r\nproto/io/vos/eip/eip.proto:113:12: \"google.protobuf.Any\" is not defined.\r\nTarget //proto:ruby_protos failed to build\r\n```\r\n\r\nAttempt 2, guessing I could put the \"@com_google_protobuf//:well_known_protos\" file groups in the protos attribute:  \r\n```\r\n$ bzqb //proto:ruby_protos\r\n# /home/erick/workspace/src/io.vos/proto/BUILD:42:1\r\nproto_compile(\r\n  name = \"ruby_protos\",\r\n  generator_name = \"ruby_protos\",\r\n  generator_function = \"ruby_proto_compile\",\r\n  generator_location = \"proto/BUILD:42\",\r\n  langs = [\"@org_pubref_rules_protobuf//ruby:ruby\"],\r\n  protos = [\"@com_google_protobuf//:well_known_protos\", \"//proto:all_proto_files\"],\r\n)\r\n\r\n$ bazel build //proto:ruby_protos\r\nINFO: Analysed target //proto:ruby_protos (0 packages loaded).\r\nINFO: Found 1 target...\r\nERROR: /home/erick/workspace/src/io.vos/proto/BUILD:42:1: error executing shell command: '/bin/bash -c cd external/com_google_protobuf && mkdir -p ../../bazel-out/k8-fastbuild/genfiles/external/com_google_protobuf && ../../bazel-out/host/bin/external/com_google_protobuf/protoc --descrip...' failed (Exit 1)\r\n../../proto/io/vos/eip/eip.proto: File does not reside within any path specified using --proto_path (or -I).  You must specify a --proto_path which encompasses this file.  Note that the proto_path must be an exact prefix of the .proto file names -- protoc is too dumb to figure out when two paths (e.g. absolute and relative) are equivalent (it's harder than you think).\r\nTarget //proto:ruby_protos failed to build\r\n```\r\nI did verify that on a single dependency I can build the ruby stubs for a grpc service as expected. So I just can't figure out how to load the well known protos :( "},"comment":{"url":"https://api.github.com/repos/pubref/rules_protobuf/issues/comments/432450725","html_url":"https://github.com/pubref/rules_protobuf/issues/251#issuecomment-432450725","issue_url":"https://api.github.com/repos/pubref/rules_protobuf/issues/251","id":432450725,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMjQ1MDcyNQ==","user":{"login":"erickj","id":39651,"node_id":"MDQ6VXNlcjM5NjUx","avatar_url":"https://avatars1.githubusercontent.com/u/39651?v=4","gravatar_id":"","url":"https://api.github.com/users/erickj","html_url":"https://github.com/erickj","followers_url":"https://api.github.com/users/erickj/followers","following_url":"https://api.github.com/users/erickj/following{/other_user}","gists_url":"https://api.github.com/users/erickj/gists{/gist_id}","starred_url":"https://api.github.com/users/erickj/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/erickj/subscriptions","organizations_url":"https://api.github.com/users/erickj/orgs","repos_url":"https://api.github.com/users/erickj/repos","events_url":"https://api.github.com/users/erickj/events{/privacy}","received_events_url":"https://api.github.com/users/erickj/received_events","type":"User","site_admin":false},"created_at":"2018-10-23T22:55:45Z","updated_at":"2018-10-23T22:55:45Z","author_association":"NONE","body":"Sorry one more update.\r\n\r\nI also tried adding @com_google_protobuf//:well_known_protos and the proto_libraries for \r\n\r\n```\r\n$ bzqb //proto:ruby_protos\r\n# /home/erick/workspace/src/io.vos/proto/BUILD:42:1\r\nproto_compile(\r\n  name = \"ruby_protos\",\r\n  generator_name = \"ruby_protos\",\r\n  generator_function = \"ruby_proto_compile\",\r\n  generator_location = \"proto/BUILD:42\",\r\n  langs = [\"@org_pubref_rules_protobuf//ruby:ruby\"],\r\n  protos = [\"//proto:all_proto_files\"],\r\n  deps = [\"@com_google_protobuf//:well_known_protos\"],\r\n)\r\n\r\n00:53:54 [erick@lenobot:~/workspace/src/io.vos] (git:master *$)\r\n$ bzqb //proto:ruby_protos\r\n# /home/erick/workspace/src/io.vos/proto/BUILD:42:1\r\nproto_compile(\r\n  name = \"ruby_protos\",\r\n  generator_name = \"ruby_protos\",\r\n  generator_function = \"ruby_proto_compile\",\r\n  generator_location = \"proto/BUILD:42\",\r\n  langs = [\"@org_pubref_rules_protobuf//ruby:ruby\"],\r\n  protos = [\"//proto:all_proto_files\"],\r\n  deps = [\"@com_google_protobuf//:any_proto\"],\r\n)\r\n```\r\nbut only received this error:"}}
{"actor":{"display_login":"erickj"}}