forked from bazelbuild/bazel
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Force the default value of symbolic macro's optional inherited attrib…
…utes to None This fixes two problems: * Various attributes (e.g. compatible_with, restricted_to, shard_count, genrule's cmd and cmd_bat, etc.) have hard-coded analysis-time behavior in Bazel which differs depending on whether the attribute was unset (or set to None) or set to any other value (including the attribute's non-None default!). Using the original default value for such an inherited attribute and passing it to the wrapped rule would in many cases break the build. * The fact that an attribute was set explicitly is reflected in query proto and xml output. In a legacy macro that wraps a rule and passes the bulk of them via **kwargs, it is expected that most of the **kwargs will be empty and most of the wrapped rule's attributes will thus be not explicitly set. We want to preserve the same behavior in symbolic macros. Working towards bazelbuild#24066 Fixes bazelbuild#24319 PiperOrigin-RevId: 697301269 Change-Id: I47563898c511a1f065d117f51a7a3a227e23260e
- Loading branch information
1 parent
09c848f
commit a2f1f58
Showing
5 changed files
with
163 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters