From f131adf89c0fb510b755a390a4b833c887c0706c Mon Sep 17 00:00:00 2001 From: Keith Smiley Date: Tue, 21 May 2019 15:52:40 -0700 Subject: [PATCH] Fix bazel incompatible changes When building grpc with the upcoming `--incompatible_depset_is_not_iterable` flag, these violations were found --- bazel/generate_cc.bzl | 6 +++--- bazel/python_rules.bzl | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bazel/generate_cc.bzl b/bazel/generate_cc.bzl index 29a888f608f..b7edcda702f 100644 --- a/bazel/generate_cc.bzl +++ b/bazel/generate_cc.bzl @@ -41,11 +41,11 @@ def _join_directories(directories): def generate_cc_impl(ctx): """Implementation of the generate_cc rule.""" - protos = [f for src in ctx.attr.srcs for f in src.proto.check_deps_sources] + protos = [f for src in ctx.attr.srcs for f in src.proto.check_deps_sources.to_list()] includes = [ f for src in ctx.attr.srcs - for f in src.proto.transitive_imports + for f in src.proto.transitive_imports.to_list() ] outs = [] proto_root = get_proto_root( @@ -128,7 +128,7 @@ def generate_cc_impl(ctx): arguments += ["-I{0}".format(f + "/../..")] well_known_proto_files = [ f - for f in ctx.attr.well_known_protos.files + for f in ctx.attr.well_known_protos.files.to_list() ] ctx.actions.run( diff --git a/bazel/python_rules.bzl b/bazel/python_rules.bzl index 2f3b38af002..17004f3474d 100644 --- a/bazel/python_rules.bzl +++ b/bazel/python_rules.bzl @@ -33,7 +33,7 @@ def _generate_py_impl(context): includes = [ file for src in context.attr.deps - for file in src.proto.transitive_imports + for file in src.proto.transitive_imports.to_list() ] proto_root = get_proto_root(context.label.workspace_root) format_str = (_GENERATED_GRPC_PROTO_FORMAT if context.executable.plugin else _GENERATED_PROTO_FORMAT)