fix: resolve npm package store tar toolchain as a Label#2900
Conversation
|
Can we maybe add an e2e test with a .bazelrc adding the |
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. npm_package_store already declares the tar toolchain, but the extraction action passes that action toolchain as a string. That string is resolved in the consuming repository's mapping, which can fail when @tar.bzl is not visible as an apparent repository name. Use a pre-resolved Label so the action's toolchain behavior is explicit without changing its inputs or execution model. Amp-Thread-ID: https://ampcode.com/threads/T-019f2bdc-94f2-77c9-a92a-081e6c2e19ad Co-authored-by: Amp <amp@ampcode.com>
5f6cd8a to
8273b3c
Compare
|
I added That workspace already renames I checked the Bazel versions in our current CI matrix and the flag exists on Bazel 7.x, 8.x, and 9.x, so I didn’t add skip tags/version gating. Verified locally with:
from |
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.
npm_package_store already declares the tar toolchain, but the extraction action passes that action toolchain as a string. That string is resolved in the consuming repository's mapping, which can fail when @tar.bzl is not visible as an apparent repository name. Use a pre-resolved Label so the action's toolchain behavior is explicit without changing its inputs or execution model.
Test plan