Skip to content

Commit 5195be5

Browse files
authored
[core] Fix windows build with no cython -Wno-shadow (#51730)
or windows builds will hard-fail. Signed-off-by: dayshah <dhyey2019@gmail.com>
1 parent 8e1b067 commit 5195be5

File tree

2 files changed

+27
-26
lines changed

2 files changed

+27
-26
lines changed

BUILD.bazel

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -142,8 +142,8 @@ ray_cc_library(
142142
hdrs = ["src/ray/rpc/grpc_client.h"],
143143
deps = [
144144
":grpc_common_base",
145-
":rpc_client_call",
146145
":rpc_chaos",
146+
":rpc_client_call",
147147
"//src/ray/common:grpc_util",
148148
"//src/ray/common:ray_config",
149149
"//src/ray/common:status",
@@ -157,9 +157,9 @@ ray_cc_library(
157157
deps = [
158158
":stats_metric",
159159
"//src/ray/common:asio",
160-
"//src/ray/common:ray_config",
161160
"//src/ray/common:grpc_util",
162161
"//src/ray/common:id",
162+
"//src/ray/common:ray_config",
163163
"//src/ray/common:status",
164164
"@com_github_grpc_grpc//:grpc++",
165165
],
@@ -170,8 +170,8 @@ ray_cc_library(
170170
srcs = ["src/ray/rpc/retryable_grpc_client.cc"],
171171
hdrs = ["src/ray/rpc/retryable_grpc_client.h"],
172172
deps = [
173-
":rpc_client_call",
174173
":grpc_client",
174+
":rpc_client_call",
175175
"@com_google_absl//absl/container:btree",
176176
"@com_google_absl//absl/strings:str_format",
177177
"@com_google_absl//absl/time",
@@ -184,8 +184,8 @@ ray_cc_library(
184184
deps = [
185185
":grpc_client",
186186
"//src/ray/common:status",
187-
"//src/ray/util:logging",
188187
"//src/ray/protobuf:reporter_cc_proto",
188+
"//src/ray/util:logging",
189189
"@com_github_grpc_grpc//:grpc++",
190190
],
191191
)
@@ -198,8 +198,8 @@ ray_cc_library(
198198
":grpc_common_base",
199199
":rpc_server_call",
200200
"//src/ray/common:asio",
201-
"//src/ray/common:status",
202201
"//src/ray/common:ray_config",
202+
"//src/ray/common:status",
203203
"//src/ray/util:thread_utils",
204204
"@com_github_grpc_grpc//:grpc++",
205205
"@com_github_grpc_grpc//:grpc++_reflection",
@@ -216,9 +216,9 @@ ray_cc_library(
216216
],
217217
# TODO(core): These three dependencies come from raylet client, should be able to remove after we split node rpc and raylet client into smaller targets.
218218
deps = [
219+
"//src/ray/common:network",
219220
"//src/ray/common:ray_object",
220221
"//src/ray/common:task_common",
221-
"//src/ray/common:network",
222222
] + [
223223
":grpc_client",
224224
":grpc_common_base",
@@ -459,9 +459,9 @@ ray_cc_library(
459459
}),
460460
linkopts = PLASMA_LINKOPTS,
461461
deps = [
462+
":object_manager_common",
462463
":plasma_fbs",
463464
":ray_common",
464-
":object_manager_common",
465465
"//src/ray/protobuf:common_cc_proto",
466466
"//src/ray/util",
467467
"//src/ray/util:compat",
@@ -526,13 +526,13 @@ ray_cc_library(
526526
name = "ray_mock",
527527
hdrs = glob(
528528
["src/mock/**/*.h"],
529-
exclude = ["src/mock/ray/common/ray_syncer/ray_syncer.h"]
529+
exclude = ["src/mock/ray/common/ray_syncer/ray_syncer.h"],
530530
),
531531
)
532532

533533
ray_cc_library(
534534
name = "ray_mock_syncer",
535-
hdrs = ["src/mock/ray/common/ray_syncer/ray_syncer.h"]
535+
hdrs = ["src/mock/ray/common/ray_syncer/ray_syncer.h"],
536536
)
537537

538538
cc_grpc_library(
@@ -573,8 +573,8 @@ ray_cc_binary(
573573
":raylet_lib",
574574
"//src/ray/util",
575575
"//src/ray/util:cmd_line_utils",
576-
"//src/ray/util:stream_redirection_options",
577576
"//src/ray/util:stream_redirection",
577+
"//src/ray/util:stream_redirection_options",
578578
"@com_github_gflags_gflags//:gflags",
579579
],
580580
)
@@ -810,8 +810,8 @@ ray_cc_binary(
810810
deps = [
811811
":gcs_server_lib",
812812
":stats_lib",
813-
"//src/ray/util:stream_redirection_options",
814813
"//src/ray/util:stream_redirection",
814+
"//src/ray/util:stream_redirection_options",
815815
"@com_github_gflags_gflags//:gflags",
816816
],
817817
)
@@ -864,8 +864,8 @@ ray_cc_library(
864864
name = "stats_opentelemetry",
865865
srcs = ["src/ray/stats/opentelemetry_metrics.cc"],
866866
deps = [
867-
"@io_opentelemetry_cpp//sdk/src/logs:logs",
868-
"@io_opentelemetry_cpp//sdk/src/trace:trace",
867+
"@io_opentelemetry_cpp//sdk/src/logs",
868+
"@io_opentelemetry_cpp//sdk/src/trace",
869869
],
870870
)
871871

@@ -1069,8 +1069,8 @@ ray_cc_library(
10691069
"@com_google_absl//absl/base:core_headers",
10701070
"@com_google_absl//absl/container:flat_hash_set",
10711071
"@com_google_absl//absl/memory",
1072-
"@com_google_absl//absl/strings:str_format",
10731072
"@com_google_absl//absl/strings",
1073+
"@com_google_absl//absl/strings:str_format",
10741074
"@com_google_googletest//:gtest",
10751075
"@io_opencensus_cpp//opencensus/exporters/stats/prometheus:prometheus_exporter",
10761076
"@io_opencensus_cpp//opencensus/stats",
@@ -1093,16 +1093,16 @@ ray_cc_library(
10931093
srcs = ["src/ray/raylet_client/raylet_client.cc"],
10941094
hdrs = ["src/ray/raylet_client/raylet_client.h"],
10951095
deps = [
1096-
":raylet_client_connection_lib",
10971096
":node_manager_rpc",
1098-
"//src/ray/common:id",
1097+
":raylet_client_connection_lib",
10991098
"//src/ray/common:asio",
1099+
"//src/ray/common:id",
1100+
"//src/ray/common:network",
11001101
"//src/ray/common:ray_object",
11011102
"//src/ray/common:status",
1102-
"//src/ray/common:network",
11031103
"//src/ray/common:task_common",
1104-
"//src/ray/util:logging",
11051104
"//src/ray/protobuf:common_cc_proto",
1105+
"//src/ray/util:logging",
11061106
],
11071107
)
11081108

@@ -1191,8 +1191,8 @@ ray_cc_library(
11911191
"//src/ray/util:mutex_protected",
11921192
"//src/ray/util:process",
11931193
"//src/ray/util:shared_lru",
1194-
"//src/ray/util:stream_redirection_options",
11951194
"//src/ray/util:stream_redirection",
1195+
"//src/ray/util:stream_redirection_options",
11961196
"@boost//:circular_buffer",
11971197
"@boost//:fiber",
11981198
"@com_google_absl//absl/cleanup",
@@ -2514,10 +2514,10 @@ ray_cc_library(
25142514
deps = [
25152515
":chunk_object_reader",
25162516
":object_buffer_pool",
2517-
":object_manager_common",
25182517
":object_directory",
2519-
":ownership_based_object_directory",
2518+
":object_manager_common",
25202519
":object_manager_rpc",
2520+
":ownership_based_object_directory",
25212521
":plasma_store_server_lib",
25222522
":pull_manager",
25232523
":push_manager",
@@ -2562,8 +2562,8 @@ ray_cc_library(
25622562
"//src/ray/common:ray_config",
25632563
"//src/ray/common:ray_object",
25642564
"//src/ray/common:status",
2565-
"//src/ray/util:counter_map",
25662565
"//src/ray/util:container_util",
2566+
"//src/ray/util:counter_map",
25672567
"@boost//:asio",
25682568
"@boost//:bind",
25692569
"@com_google_absl//absl/container:flat_hash_map",
@@ -2937,11 +2937,11 @@ ray_cc_library(
29372937
name = "gcs",
29382938
deps = [
29392939
":gcs_callback",
2940+
":gcs_pb_util",
29402941
":node_manager_fbs",
29412942
":node_manager_rpc",
2942-
":gcs_pb_util",
29432943
":redis_client",
2944-
]
2944+
],
29452945
)
29462946

29472947
ray_cc_test(
@@ -3055,7 +3055,7 @@ pyx_library(
30553055
cc_kwargs = dict(
30563056
srcs = PYX_SRCS,
30573057
# cython code is auto-generated, which is out of our control.
3058-
copts = COPTS + PYX_COPTS + ["-Wno-shadow"],
3058+
copts = COPTS + PYX_COPTS,
30593059
# see https://github.com/tensorflow/tensorflow/blob/r2.1/tensorflow/lite/BUILD#L444
30603060
linkopts = select({
30613061
"@platforms//os:osx": [
@@ -3082,8 +3082,8 @@ pyx_library(
30823082
"//src/ray/protobuf:serialization_cc_proto",
30833083
"//src/ray/util",
30843084
"//src/ray/util:memory",
3085-
"//src/ray/util:stream_redirection_options",
30863085
"//src/ray/util:stream_redirection",
3086+
"//src/ray/util:stream_redirection_options",
30873087
],
30883088
)
30893089

bazel/ray.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ PYX_COPTS = select({
3131
"//conditions:default": [
3232
# Ignore this warning since CPython and Cython have issue removing deprecated tp_print on MacOS
3333
"-Wno-deprecated-declarations",
34+
"-Wno-shadow",
3435
],
3536
}) + select({
3637
"@platforms//os:windows": [

0 commit comments

Comments
 (0)