googleapis / googleapis/google-cloud-cpp

Avoid spurious warnings on `*.pb.h` files with MSVC

オープン
#14,507 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
type: cleanup
主要言語
C++
スター
659
フォーク
462
平均マージ
1日 2時間
マージ済み PR(30日)
89

説明

Files generated by Protobuf have warnings under MSVC. There is little we can do to fix the code to avoid warnings, and disabling the warnings for all the code would mask problems in *our* code.

We can disable warnings in headers with MSVC if the header is included as `#include ` as opposed to `#include "foo/bar.pb.h"`. We have managed to fix this for googleapis protos, and the compute protos, but the test protos in `google-cloud-cpp` are not.

If we move the protos to `protos/...` (as oppposed to `google/cloud/...` or `generator/...`) then we can tweak Bazel and CMake to support include via angle brackets, then the warnings go away, and then we can start using newer versions of Protobuf with MSVC.

コントリビューションガイド

コントリビューションガイドを開く

調査の方向性

現在の google/cloud または generator パスにあるテスト用 proto を見つけ、修正済みの googleapis および compute proto とビルドルールを比較してください。まず関連する Bazel および CMake の設定を調査してください。テストで生成されたヘッダーが山括弧によるインクルードをサポートし、不要な MSVC 警告を生成しなくなれば完了です。

索引モデルが issue の本文から書いたものです。

評価

技術スタック
cmake, cpp
領域
build-system
issue の種類
バグ
難易度
4/5
見積もり時間
3〜5日
活発さ
停滞
明瞭さ
おおむね明確
初心者へのやさしさ
35/100

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。