From 43713514f5d028adc7441b6b980f970cfe4500fe Mon Sep 17 00:00:00 2001 From: Pascal Muetschard Date: Thu, 20 Jun 2019 12:33:46 -0700 Subject: [PATCH] Stop using the deprecated `ctx.action` function. See https://github.com/bazelbuild/bazel/issues/5825 --- tools/build/rules/grpc.bzl | 2 +- tools/build/third_party/perfetto/ipc.bzl | 6 ++++-- tools/build/third_party/perfetto/protozero.bzl | 6 ++++-- 3 files changed, 9 insertions(+), 5 deletions(-) diff --git a/tools/build/rules/grpc.bzl b/tools/build/rules/grpc.bzl index 759a5f90bf..d74ebdab3b 100644 --- a/tools/build/rules/grpc.bzl +++ b/tools/build/rules/grpc.bzl @@ -111,7 +111,7 @@ def _gen_cc_source_impl(ctx): arguments += ["--proto_path=."] arguments += [proto.path for proto in protos] - ctx.action( + ctx.actions.run( inputs = protos + includes, outputs = out_files, tools = [ctx.executable._protoc, ctx.executable._plugin], diff --git a/tools/build/third_party/perfetto/ipc.bzl b/tools/build/third_party/perfetto/ipc.bzl index b39e5f3f45..d6b764c51c 100644 --- a/tools/build/third_party/perfetto/ipc.bzl +++ b/tools/build/third_party/perfetto/ipc.bzl @@ -48,11 +48,13 @@ def _gen_cc_impl(ctx): arguments += ["--proto_path=."] arguments += [proto.path for proto in protos] - ctx.action( - inputs = protos + includes + [ctx.executable._plugin], + ctx.actions.run( + inputs = protos + includes, outputs = out_files, + tools = [ctx.executable._protoc, ctx.executable._plugin], executable = ctx.executable._protoc, arguments = arguments, + use_default_shell_env = True, ) return [ diff --git a/tools/build/third_party/perfetto/protozero.bzl b/tools/build/third_party/perfetto/protozero.bzl index 721cb86eec..5b0fd64e8e 100644 --- a/tools/build/third_party/perfetto/protozero.bzl +++ b/tools/build/third_party/perfetto/protozero.bzl @@ -48,11 +48,13 @@ def _gen_cc_impl(ctx): arguments += ["--proto_path=."] arguments += [proto.path for proto in protos] - ctx.action( - inputs = protos + includes + [ctx.executable._plugin], + ctx.actions.run( + inputs = protos + includes, outputs = out_files, + tools = [ctx.executable._protoc, ctx.executable._plugin], executable = ctx.executable._protoc, arguments = arguments, + use_default_shell_env = True, ) return [