From 2b61ee2d79182a628c1b9654ec6246c7f7174f59 Mon Sep 17 00:00:00 2001 From: Nevena Kotlaja Date: Tue, 29 Aug 2023 08:54:07 -0700 Subject: [PATCH] Migrate Automatic Exec Groups by adding a toolchain parameter to the affected actions This is a step forward for the full migration of Automatic Exec Groups (AEGs). This change will be effective once AEGs are enabled. In this CL I've added a toolchain_type to `toolchain` attribute of ctx.actions.{run, run_shell} since the Execution platform is selected on a toolchain type level, not on a rule level like before AEGs. PiperOrigin-RevId: 561043901 --- rust/aspects.bzl | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/rust/aspects.bzl b/rust/aspects.bzl index 8c2d9272b5..4639f7965c 100644 --- a/rust/aspects.bzl +++ b/rust/aspects.bzl @@ -145,7 +145,7 @@ def _compile_rust(ctx, attr, src, extra_srcs, deps): Returns: A DepVariantInfo provider. """ - toolchain = ctx.toolchains["@rules_rust//rust:toolchain"] + toolchain = ctx.toolchains["@rules_rust//rust:toolchain_type"] output_hash = repr(hash(src.path)) # TODO(b/270124215): Use the import! macro once available @@ -326,7 +326,7 @@ def _make_proto_library_aspect(is_upb): fragments = ["cpp"], host_fragments = ["cpp"], toolchains = [ - str(Label("@rules_rust//rust:toolchain")), + "@rules_rust//rust:toolchain_type", "@bazel_tools//tools/cpp:toolchain_type", ], incompatible_use_toolchain_transition = True,