Skip to content

Commit ea6040a

Browse files
committed
impl: convert pb.h files from system to local includes (#15229)
1 parent 77c8b2a commit ea6040a

File tree

5,045 files changed

+7789
-7779
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

5,045 files changed

+7789
-7779
lines changed

.bazelrc

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,14 @@
1818
# Use host-OS-specific config lines from bazelrc files.
1919
build --enable_platform_specific_config=true
2020

21+
build --features=external_include_paths
22+
23+
build --per_file_copt=grpc+//@-Wno-private-header
24+
build --copt=-Wno-private-header
25+
build --cxxopt=-Wno-private-header
26+
build --host_copt=-Wno-private-header
27+
build --host_cxxopt=-Wno-private-header
28+
2129
# The project requires C++ >= 17.
2230
build:linux --cxxopt=-std=c++17
2331
build:macos --cxxopt=-std=c++17
@@ -72,6 +80,8 @@ build:sanitizer --strip=never
7280
build:sanitizer --copt=-Og
7381
build:sanitizer --copt=-g
7482
build:sanitizer --copt=-fno-omit-frame-pointer
83+
#build:sanitizer --features=external_include_paths
84+
7585

7686
# --config asan: Address Sanitizer
7787
build:asan --config=sanitizer
@@ -104,6 +114,8 @@ build:ubsan --copt=-DCURL_STRICTER
104114
build:ubsan --linkopt=-fsanitize=undefined
105115
build:ubsan --linkopt=-fsanitize-link-c++-runtime
106116
build:ubsan --action_env=UBSAN_OPTIONS=halt_on_error=1:print_stacktrace=1
117+
#build:ubsan --features=external_include_paths
118+
107119

108120
# --config xsan: Runs misc. sanitizers that aren't covered elsewhere.
109121
build:xsan --config=sanitizer

MODULE.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ python.toolchain(
5151
python_version = "3.11",
5252
)
5353

54-
bazel_dep(name = "grpc", version = "1.71.0", repo_name = "com_github_grpc_grpc")
54+
bazel_dep(name = "grpc", version = "1.72.0", repo_name = "com_github_grpc_grpc")
5555
bazel_dep(name = "googleapis", version = "0.0.0", repo_name = "com_google_googleapis")
5656
archive_override(
5757
module_name = "googleapis",

bazel/googleapis.modules.patch

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,12 @@ index 026553f5c7..f3c6b6925c 100644
3535
+# angle-brackets, thus treating their headers as system includes. This allows
3636
+# us to dial-up the warnings in our own code, without seeing compiler warnings
3737
+# from their headers, which we do not own.
38-
+cc_library(
39-
+ name = "googleapis_system_includes",
40-
+ includes = [
41-
+ ".",
42-
+ ],
43-
+)
38+
+#cc_library(
39+
+# name = "googleapis_system_includes",
40+
+# includes = [
41+
+# ".",
42+
+# ],
43+
+#)
4444
+
4545
diff --git a/MODULE.bazel b/MODULE.bazel
4646
new file mode 100644

bazel/workspace0.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -139,7 +139,7 @@ def gl_cpp_workspace0(name = None):
139139
],
140140
sha256 = "a1b2315f7eb290e2876b19839da1cc7916b36f93c88921f90d0daab58755a8a3",
141141
strip_prefix = "googleapis-f9d6fe4a6ad9ed89dfc315f284124d2104377940",
142-
build_file = Label("//bazel:googleapis.BUILD"),
142+
# build_file = Label("//bazel:googleapis.BUILD"),
143143
# Scaffolding for patching googleapis after download. For example:
144144
# patches = ["googleapis.patch"]
145145
# NOTE: This should only be used while developing with a new

generator/BUILD.bazel

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ cc_library(
3737
"@abseil-cpp//absl/strings:str_format",
3838
"@com_github_jbeder_yaml_cpp//:yaml-cpp",
3939
"@com_github_nlohmann_json//:json",
40-
"@com_google_googleapis//:googleapis_system_includes",
40+
# "@com_google_googleapis//:googleapis_system_includes",
4141
"@com_google_googleapis//google/api:client_cc_proto",
4242
"@com_google_googleapis//google/api:field_info_cc_proto",
4343
"@com_google_googleapis//google/api:routing_cc_proto",

generator/generator.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
#include "google/cloud/internal/filesystem.h"
2323
#include "google/cloud/status_or.h"
2424
#include "absl/strings/str_split.h"
25-
#include <google/api/client.pb.h>
25+
#include "google/api/client.pb.h"
2626
#include <future>
2727
#include <string>
2828
#include <vector>

generator/generator_test.cc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
#include "generator/testing/error_collectors.h"
1818
#include "generator/testing/fake_source_tree.h"
1919
#include "generator/testing/printer_mocks.h"
20+
#include "google/protobuf/descriptor.pb.h"
2021
#include <google/protobuf/compiler/importer.h>
2122
#include <google/protobuf/descriptor.h>
22-
#include <google/protobuf/descriptor.pb.h>
2323
#include <google/protobuf/io/zero_copy_stream.h>
2424
#include <gmock/gmock.h>
2525

generator/integration_tests/benchmarks/client_benchmark.cc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,14 @@
1919
#include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_metadata_decorator.h"
2020
#include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_option_defaults.h"
2121
#include "generator/integration_tests/golden/v1/internal/golden_kitchen_sink_stub.h"
22+
#include "google/cloud/location/locations.grpc.pb.h"
2223
#include "google/cloud/common_options.h"
2324
#include "google/cloud/grpc_options.h"
2425
#include "google/cloud/internal/make_status.h"
2526
#include "google/cloud/log.h"
2627
#include "google/cloud/version.h"
27-
#include <google/cloud/location/locations.grpc.pb.h>
28-
#include <google/iam/v1/iam_policy.grpc.pb.h>
29-
#include <google/longrunning/operations.grpc.pb.h>
28+
#include "google/iam/v1/iam_policy.grpc.pb.h"
29+
#include "google/longrunning/operations.grpc.pb.h"
3030
#include <benchmark/benchmark.h>
3131
#include <memory>
3232

generator/integration_tests/golden/v1/deprecated_connection.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
#include "google/cloud/options.h"
2727
#include "google/cloud/status_or.h"
2828
#include "google/cloud/version.h"
29-
#include <generator/integration_tests/test_deprecated.pb.h>
29+
#include "generator/integration_tests/test_deprecated.pb.h"
3030
#include <memory>
3131

3232
namespace google {

generator/integration_tests/golden/v1/deprecated_connection_idempotency_policy.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121

2222
#include "google/cloud/idempotency.h"
2323
#include "google/cloud/version.h"
24-
#include <generator/integration_tests/test_deprecated.grpc.pb.h>
24+
#include "generator/integration_tests/test_deprecated.grpc.pb.h"
2525
#include <memory>
2626

2727
namespace google {

0 commit comments

Comments
 (0)