Skip to content

Commit 64c826a

Browse files
authored
fix: declare rustfmt aspect action toolchain (bazelbuild#4128)
The --incompatible_auto_exec_groups flag requires Starlark actions to declare whether their executable/tools come from an action toolchain. This is not a Bazel default today, but it is exposed through strict preset configurations and is intended to catch rules that rely on implicit action toolchain inference. rustfmt_aspect runs rustfmt from rules_rust's rustfmt toolchain, but the formatting action does not declare that action toolchain. Declare the matching rustfmt toolchain so the action's toolchain behavior is explicit without changing its inputs or execution model.
1 parent bd2a8f0 commit 64c826a

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

rust/private/rustfmt.bzl

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,7 @@ def _perform_check(edition, srcs, ctx):
9898
arguments = [args],
9999
mnemonic = "Rustfmt",
100100
progress_message = "Rustfmt %{label}",
101+
toolchain = Label("//rust/rustfmt:toolchain_type"),
101102
)
102103

103104
return marker

0 commit comments

Comments
 (0)