{"action":"created","issue":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599","repository_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway","labels_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599/labels{/name}","comments_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599/comments","events_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599/events","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599","id":314360758,"number":599,"title":"Added Bazel support","user":{"login":"f0rmiga","id":3149049,"avatar_url":"https://avatars0.githubusercontent.com/u/3149049?v=4","gravatar_id":"","url":"https://api.github.com/users/f0rmiga","html_url":"https://github.com/f0rmiga","followers_url":"https://api.github.com/users/f0rmiga/followers","following_url":"https://api.github.com/users/f0rmiga/following{/other_user}","gists_url":"https://api.github.com/users/f0rmiga/gists{/gist_id}","starred_url":"https://api.github.com/users/f0rmiga/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/f0rmiga/subscriptions","organizations_url":"https://api.github.com/users/f0rmiga/orgs","repos_url":"https://api.github.com/users/f0rmiga/repos","events_url":"https://api.github.com/users/f0rmiga/events{/privacy}","received_events_url":"https://api.github.com/users/f0rmiga/received_events","type":"User","site_admin":false},"labels":[{"id":816045899,"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/labels/cla:%20yes","name":"cla: yes","color":"0e8a16","default":false}],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-04-14T20:49:06Z","updated_at":"2018-04-17T00:00:10Z","closed_at":"2018-04-16T19:54:21Z","author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/pulls/599","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599","diff_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599.diff","patch_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599.patch"},"body":"Sorry for the size of the PR. I would be up for a peer review if wanted.\r\n\r\nAlmost every target was generated by Gazelle.\r\nGazelle tried to index `//google/api/...` because of the third party protos being used. To solve that I excluded the `third_party` directory from Gazelle and created the `repositories.bzl` that at this point:\r\n    - Downloads the `googleapis` repository.\r\n    - Adds a `BUILD.bazel` file under `//google/api/` with targets for the protos.\r\n\r\nGazelle still tries to remove `\"@com_github_googleapis_googleapis//google/api:api_proto\"` and `\"@com_github_googleapis_googleapis//google/api:go_default_library\"` in favour of `//google/api/...`, which is wrong.\r\n\r\nTo check what Gazelle reports in check mode, run `bazel run //:gazelle_diff`.\r\n\r\nThe `third_party` directory is not being used by any Bazel target at all. If the grpc-gateway team decides to move completely to Bazel, this directory can be removed.\r\n\r\nEvery `.pb.go` and `.pb.gw.go` can also be removed if this repo moves completely to Bazel. In order to have the swagger generator to work with Bazel, I would need to write a specific rule for that.\r\n\r\nTo compile everything:\r\n```\r\n$ bazel build //...\r\n```\r\n\r\nTo test everything:\r\n```\r\n$ bazel test //...\r\n```"},"comment":{"url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/comments/381786749","html_url":"https://github.com/grpc-ecosystem/grpc-gateway/pull/599#issuecomment-381786749","issue_url":"https://api.github.com/repos/grpc-ecosystem/grpc-gateway/issues/599","id":381786749,"user":{"login":"achew22","id":37206,"avatar_url":"https://avatars3.githubusercontent.com/u/37206?v=4","gravatar_id":"","url":"https://api.github.com/users/achew22","html_url":"https://github.com/achew22","followers_url":"https://api.github.com/users/achew22/followers","following_url":"https://api.github.com/users/achew22/following{/other_user}","gists_url":"https://api.github.com/users/achew22/gists{/gist_id}","starred_url":"https://api.github.com/users/achew22/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/achew22/subscriptions","organizations_url":"https://api.github.com/users/achew22/orgs","repos_url":"https://api.github.com/users/achew22/repos","events_url":"https://api.github.com/users/achew22/events{/privacy}","received_events_url":"https://api.github.com/users/achew22/received_events","type":"User","site_admin":false},"created_at":"2018-04-17T00:00:10Z","updated_at":"2018-04-17T00:00:10Z","author_association":"COLLABORATOR","body":"Fortunately there are other projects who have implemented it in a less go specific way. For example, https://github.com/bazelbuild/rules_closure/blob/dbb96841cc0a5fb2664c37822803b06dab20c7d1/closure/protobuf/closure_proto_library.bzl"}}
{"actor":{"display_login":"achew22"}}