Repository navigation
Conversation
| * Adds an {@code exec_properties} attribute of type {@code STRING_DICT} if the rule does not | ||
| * already have one. | ||
| */ | ||
| public static void addOrOverrideExecPropertiesAttribute(RuleClass.Builder builder) |
There was a problem hiding this comment.
I think the previous name is fine. It's low-enough use that reading the source or doc to find out what happens when the attribute already exists is fine.
| // Add the 'exec_properties' attribute last. That way it's backwards compatible with | ||
| // repository rules that already declare 'exec_properties'. In particular | ||
| // https://github.com/bazelbuild/bazel-toolchains | ||
| // TODO(buchgr): Remove this backwards compatiblity hack once the feature is marked stable. |
There was a problem hiding this comment.
I don't think buchgr is the right person for this anymore. Probably should be me or @juliexxia
| builder.addAttribute(attr("$configure", BOOLEAN).defaultValue(configure).build()); | ||
| if (thread.getSemantics().experimentalRepoRemoteExec()) { | ||
| builder.addAttribute(attr("$remotable", BOOLEAN).defaultValue(remotable).build()); | ||
| BaseRuleClasses.execPropertiesAttribute(builder); |
There was a problem hiding this comment.
@juliexxia Is there a reason why repository rules have exec_properties? They can't be run remotely and are outside the normal action system, so it seems like it'd be unused. Might be simpler to just remove it from repo rules entirely rather than adding this conditionally.
|
Hi @agluszak, thanks for picking this up. I think my solution wasn't ideal. I think a better solution is to send a patch to bazel-toolchains and rename their |
|
Fixed by bazelbuild/bazel-toolchains#912 |
Based on #11029 by @buchgr
Closes #11029, #12030