googleapis / googleapis/google-cloud-cpp

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

Offen
#14,507 0 Kommentare 0 Reaktionen 0 zugewiesene Personen Auf GitHub ansehen
type: cleanup
Vorherrschende Sprache
C++
Sterne
659
Forks
462
Ø Merge
1 T. 2 Std.
Gemergte PRs (30 T.)
89

Beschreibung

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.

Beitragsleitfaden

Beitragsleitfaden öffnen

Rechercherichtung

Locate the test protos under the current google/cloud or generator paths and compare their build rules with the already-fixed googleapis and compute protos. Inspect the related Bazel and CMake configuration first. Done means the test-generated headers support angle-bracket inclusion and no longer produce spurious MSVC warnings.

Vom Indexierungsmodell aus dem Issue-Text verfasst.

Bewertung

Tech-Stack
cmake, cpp
Bereich
build-system
Issue-Typ
Bug
Schwierigkeit
4/5
Geschätzter Aufwand
3-5 Tage
Aktivitätsstatus
Veraltet
Klarheit
Größtenteils klar
Anfängerfreundlichkeit
35/100

Neue Issues direkt in Ihr Postfach

Eine kurze Übersicht über anfängerfreundliche GitHub-Issues.