{"action":"created","issue":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/5467","repository_url":"https://api.github.com/repos/bazelbuild/bazel","labels_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5467/labels{/name}","comments_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5467/comments","events_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5467/events","html_url":"https://github.com/bazelbuild/bazel/pull/5467","id":335855036,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3NDQ4NjM5","number":5467,"title":"Suppress all C++ warning when compiling generated protobuf code.","user":{"login":"RNabel","id":10717566,"node_id":"MDQ6VXNlcjEwNzE3NTY2","avatar_url":"https://avatars2.githubusercontent.com/u/10717566?v=4","gravatar_id":"","url":"https://api.github.com/users/RNabel","html_url":"https://github.com/RNabel","followers_url":"https://api.github.com/users/RNabel/followers","following_url":"https://api.github.com/users/RNabel/following{/other_user}","gists_url":"https://api.github.com/users/RNabel/gists{/gist_id}","starred_url":"https://api.github.com/users/RNabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RNabel/subscriptions","organizations_url":"https://api.github.com/users/RNabel/orgs","repos_url":"https://api.github.com/users/RNabel/repos","events_url":"https://api.github.com/users/RNabel/events{/privacy}","received_events_url":"https://api.github.com/users/RNabel/received_events","type":"User","site_admin":false},"labels":[{"id":323761238,"node_id":"MDU6TGFiZWwzMjM3NjEyMzg=","url":"https://api.github.com/repos/bazelbuild/bazel/labels/cla:%20yes","name":"cla: yes","color":"009800","default":false}],"state":"open","locked":false,"assignee":{"login":"mhlopko","id":814566,"node_id":"MDQ6VXNlcjgxNDU2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/814566?v=4","gravatar_id":"","url":"https://api.github.com/users/mhlopko","html_url":"https://github.com/mhlopko","followers_url":"https://api.github.com/users/mhlopko/followers","following_url":"https://api.github.com/users/mhlopko/following{/other_user}","gists_url":"https://api.github.com/users/mhlopko/gists{/gist_id}","starred_url":"https://api.github.com/users/mhlopko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhlopko/subscriptions","organizations_url":"https://api.github.com/users/mhlopko/orgs","repos_url":"https://api.github.com/users/mhlopko/repos","events_url":"https://api.github.com/users/mhlopko/events{/privacy}","received_events_url":"https://api.github.com/users/mhlopko/received_events","type":"User","site_admin":false},"assignees":[{"login":"mhlopko","id":814566,"node_id":"MDQ6VXNlcjgxNDU2Ng==","avatar_url":"https://avatars0.githubusercontent.com/u/814566?v=4","gravatar_id":"","url":"https://api.github.com/users/mhlopko","html_url":"https://github.com/mhlopko","followers_url":"https://api.github.com/users/mhlopko/followers","following_url":"https://api.github.com/users/mhlopko/following{/other_user}","gists_url":"https://api.github.com/users/mhlopko/gists{/gist_id}","starred_url":"https://api.github.com/users/mhlopko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mhlopko/subscriptions","organizations_url":"https://api.github.com/users/mhlopko/orgs","repos_url":"https://api.github.com/users/mhlopko/repos","events_url":"https://api.github.com/users/mhlopko/events{/privacy}","received_events_url":"https://api.github.com/users/mhlopko/received_events","type":"User","site_admin":false},{"login":"lberki","id":3524818,"node_id":"MDQ6VXNlcjM1MjQ4MTg=","avatar_url":"https://avatars1.githubusercontent.com/u/3524818?v=4","gravatar_id":"","url":"https://api.github.com/users/lberki","html_url":"https://github.com/lberki","followers_url":"https://api.github.com/users/lberki/followers","following_url":"https://api.github.com/users/lberki/following{/other_user}","gists_url":"https://api.github.com/users/lberki/gists{/gist_id}","starred_url":"https://api.github.com/users/lberki/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lberki/subscriptions","organizations_url":"https://api.github.com/users/lberki/orgs","repos_url":"https://api.github.com/users/lberki/repos","events_url":"https://api.github.com/users/lberki/events{/privacy}","received_events_url":"https://api.github.com/users/lberki/received_events","type":"User","site_admin":false}],"milestone":null,"comments":11,"created_at":"2018-06-26T14:44:36Z","updated_at":"2018-08-28T17:49:05Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/bazelbuild/bazel/pulls/5467","html_url":"https://github.com/bazelbuild/bazel/pull/5467","diff_url":"https://github.com/bazelbuild/bazel/pull/5467.diff","patch_url":"https://github.com/bazelbuild/bazel/pull/5467.patch"},"body":"This PR is a suggested fix for #5466. \r\n\r\nAs long as a) one cannot specify `copt`s for the compilation of generated C++ code, and b) protobuf generated code is warning-generating, we should suppress _at least_ the errors protobuf code is known to generate (from my experience at least `unused-parameter` (as seen here: https://github.com/google/protobuf/issues/4628) and `invalid-offset` and `zero-as-null-pointer-constant`). \r\n\r\na) is fixable, but has no timeline, b) will not be fixed.\r\n\r\n## Option 1: Suppress all warnings (currently chosen)\r\nSince protobuf code is already assumed to be correct, suppressing all warnings both reduces log message spam and solves the `-Werror` problem.\r\n**Advantages**: Will compile with any CROSSTOOL copts.\r\n**Disadvantages**: Could suppress warnings of a broken C++ protobuf `plugin`.\r\n\r\n## Option 2: Suppress specific known errors \r\nIt is theoretically possible to suppress only the known errors, but I'm not a C++ expert so don't know how compatible these flags are between OSs.\r\n**Risks**: Windows, different protobuf versions could have different errors.\r\n\r\n## Option 3: Pass `-Wno-error`\r\nWarnings would still be shown but at least the compilation would succeed.\r\n**Advantages**: least intrusive, builds complete.\r\n**Disadvantages**: many un-actionable log messages.\r\n\r\n\r\nI hope this is the correct format for this kind of discussion. Many thanks in advance for any comments :)"},"comment":{"url":"https://api.github.com/repos/bazelbuild/bazel/issues/comments/416679347","html_url":"https://github.com/bazelbuild/bazel/pull/5467#issuecomment-416679347","issue_url":"https://api.github.com/repos/bazelbuild/bazel/issues/5467","id":416679347,"node_id":"MDEyOklzc3VlQ29tbWVudDQxNjY3OTM0Nw==","user":{"login":"RNabel","id":10717566,"node_id":"MDQ6VXNlcjEwNzE3NTY2","avatar_url":"https://avatars2.githubusercontent.com/u/10717566?v=4","gravatar_id":"","url":"https://api.github.com/users/RNabel","html_url":"https://github.com/RNabel","followers_url":"https://api.github.com/users/RNabel/followers","following_url":"https://api.github.com/users/RNabel/following{/other_user}","gists_url":"https://api.github.com/users/RNabel/gists{/gist_id}","starred_url":"https://api.github.com/users/RNabel/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RNabel/subscriptions","organizations_url":"https://api.github.com/users/RNabel/orgs","repos_url":"https://api.github.com/users/RNabel/repos","events_url":"https://api.github.com/users/RNabel/events{/privacy}","received_events_url":"https://api.github.com/users/RNabel/received_events","type":"User","site_admin":false},"created_at":"2018-08-28T17:49:05Z","updated_at":"2018-08-28T17:49:05Z","author_association":"CONTRIBUTOR","body":"@mhlopko Do you have a rough timeline for this to go in?"}}
{"actor":{"display_login":"RNabel"}}