Allow transitions for builtin rules without allowlist
Only Blaze team members can write a built-in rule. Instead of having to modify
the allowlist every time we starlarkify a native transition, it's preferable to
always allow builtins to use Starlark transitions.
RELNOTES:none
@@ -792,7 +792,8 @@ public class StarlarkRuleClassFunctions implements StarlarkRuleFunctionsApi<Arti
}
// TODO(b/121385274): remove when we stop allowlisting starlark transitions
if (hasStarlarkDefinedTransition) {
- if (!hasFunctionTransitionAllowlist) {
+ if (!starlarkLabel.getRepository().getName().equals("@_builtins")
+ && !hasFunctionTransitionAllowlist) {
errorf(
handler,
"Use of Starlark transition without allowlist attribute"
