{"action":"closed","issue":{"url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1646","repository_url":"https://api.github.com/repos/bazelbuild/rules_go","labels_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1646/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1646/comments","events_url":"https://api.github.com/repos/bazelbuild/rules_go/issues/1646/events","html_url":"https://github.com/bazelbuild/rules_go/issues/1646","id":349345129,"node_id":"MDU6SXNzdWUzNDkzNDUxMjk=","number":1646,"title":"Conflicting resolutions for WKT dependencies","user":{"login":"eduardoramirez","id":4296752,"node_id":"MDQ6VXNlcjQyOTY3NTI=","avatar_url":"https://avatars1.githubusercontent.com/u/4296752?v=4","gravatar_id":"","url":"https://api.github.com/users/eduardoramirez","html_url":"https://github.com/eduardoramirez","followers_url":"https://api.github.com/users/eduardoramirez/followers","following_url":"https://api.github.com/users/eduardoramirez/following{/other_user}","gists_url":"https://api.github.com/users/eduardoramirez/gists{/gist_id}","starred_url":"https://api.github.com/users/eduardoramirez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/eduardoramirez/subscriptions","organizations_url":"https://api.github.com/users/eduardoramirez/orgs","repos_url":"https://api.github.com/users/eduardoramirez/repos","events_url":"https://api.github.com/users/eduardoramirez/events{/privacy}","received_events_url":"https://api.github.com/users/eduardoramirez/received_events","type":"User","site_admin":false},"labels":[{"id":582490543,"node_id":"MDU6TGFiZWw1ODI0OTA1NDM=","url":"https://api.github.com/repos/bazelbuild/rules_go/labels/gazelle","name":"gazelle","color":"fbca04","default":false},{"id":598924272,"node_id":"MDU6TGFiZWw1OTg5MjQyNzI=","url":"https://api.github.com/repos/bazelbuild/rules_go/labels/proto","name":"proto","color":"006b75","default":false},{"id":342021207,"node_id":"MDU6TGFiZWwzNDIwMjEyMDc=","url":"https://api.github.com/repos/bazelbuild/rules_go/labels/question","name":"question","color":"cc317c","default":true}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2018-08-10T01:29:25Z","updated_at":"2018-11-30T00:45:29Z","closed_at":"2018-11-30T00:45:28Z","author_association":"NONE","body":"I updated to `go_rules` 0.13.0 and I went through the process of running gazelle to update existing WKT proto dependencies to use the ones provided by `go_rules`, i.e.\r\n\r\n```\r\n\"@com_github_golang_protobuf//descriptor:go_default_library_gen\",\r\n\"@com_github_golang_protobuf//jsonpb:go_default_library_gen\",\r\n\"@com_github_golang_protobuf//proto:go_default_library\",\r\n\"@io_bazel_rules_go//proto/wkt:descriptor_go_proto\",\r\n```\r\n\r\nOnce I did that I rebuilt the app and got a lot of warnings of the form:\r\n\r\n```\r\nGoLink: warning: package \"github.com/golang/protobuf/ptypes/timestamp\" is provided by more than one rule:\r\n    @com_github_golang_protobuf//ptypes/timestamp:go_default_library\r\n    @io_bazel_rules_go//proto/wkt:timestamp_go_proto\r\nSet \"importmap\" to different paths in each library.\r\nThis will be an error in the future.\r\n```\r\n\r\nThe app still compiled and ran. However, I get a fatal error along the same lines when I build the `go_path` rule:\r\n\r\n```\r\nsrc/github.com/golang/protobuf/ptypes/struct/struct.pb.go: references multiple files (bazel-out/darwin-fastbuild/bin/external/io_bazel_rules_go/proto/wkt/darwin_amd64_stripped/struct_go_proto~/github.com/golang/protobuf/ptypes/struct/struct.pb.go and external/com_github_golang_protobuf/ptypes/struct/struct.pb.go)\r\n```\r\n\r\nA snippet of my `WORKSPACE` file\r\n\r\n```\r\n# other stuff \r\n\r\nhttp_archive(\r\n    name = \"com_google_protobuf\",\r\n    urls = [\"https://codeload.github.com/google/protobuf/zip/ab8edf1dbe2237b4717869eaab11a2998541ad8d\"],\r\n    strip_prefix = \"protobuf-ab8edf1dbe2237b4717869eaab11a2998541ad8d\",\r\n    type = \"zip\",\r\n)\r\n\r\nnew_http_archive(\r\n    name = \"com_github_googleapis\",\r\n    url = \"https://github.com/googleapis/googleapis/archive/common-protos-1_3_1.zip\",\r\n    strip_prefix = \"googleapis-common-protos-1_3_1/\",\r\n    build_file = \"proto/googleapis.bzl\",\r\n)\r\n\r\nhttp_archive(\r\n    name = \"io_bazel_rules_go\",\r\n    urls = [\"https://github.com/bazelbuild/rules_go/releases/download/0.13.0/rules_go-0.13.0.tar.gz\"],\r\n    sha256 = \"ba79c532ac400cefd1859cbc8a9829346aa69e3b99482cd5a54432092cbc3933\",\r\n)\r\n\r\nhttp_archive(\r\n    name = \"bazel_gazelle\",\r\n    urls = [\"https://github.com/bazelbuild/bazel-gazelle/releases/download/0.13.0/bazel-gazelle-0.13.0.tar.gz\"],\r\n    sha256 = \"bc653d3e058964a5a26dcad02b6c72d7d63e6bb88d94704990b908a1445b8758\",\r\n)\r\n\r\nload(\"@io_bazel_rules_go//go:def.bzl\", \"go_rules_dependencies\", \"go_register_toolchains\")\r\n\r\ngo_rules_dependencies()\r\n\r\ngo_register_toolchains()\r\n\r\nload(\"@bazel_gazelle//:deps.bzl\", \"gazelle_dependencies\", \"go_repository\")\r\n\r\ngazelle_dependencies()\r\n\r\ngo_repository(\r\n    name = \"org_golang_google_genproto\",\r\n    commit = \"81158efcc9f219c511e4d3c0d61a0e6e49c01a24\",\r\n    importpath = \"google.golang.org/genproto\",\r\n)\r\n\r\ngo_repository(\r\n    name = \"com_github_golang_protobuf\",\r\n    commit = \"b4deda0973fb4c70b50d226b1af49f3da59f5265\",\r\n    importpath = \"github.com/golang/protobuf\",\r\n)\r\n\r\n# more go_repository definitions.... \r\n```\r\n\r\nI've spent quite a bit trying to understand what's going on here with no luck. Any ideas what might be happening here?\r\n\r\nI saw this https://github.com/bazelbuild/bazel-gazelle/issues/159 which seemed like the same issue but was unsure of the resolution.\r\n\r\nThanks in advanced for any help!"}}
{"actor":{"display_login":"eduardoramirez"}}