Skip to content

Commit

Permalink
Allow transitions for builtin rules without allowlist
Browse files Browse the repository at this point in the history
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
PiperOrigin-RevId: 370772711
  • Loading branch information
oquenchil authored and copybara-github committed Apr 27, 2021
1 parent 6570221 commit f0f7b2f
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -792,7 +792,8 @@ public void export(EventHandler handler, Label starlarkLabel, String ruleClassNa
}
// 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"
Expand Down

0 comments on commit f0f7b2f

Please sign in to comment.