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.
Some BuildType attribute types have a universal default value, i.e. a default that applies when the rule author doesn't pass `default=...` to the attribute schema. For example, StringType has "" and IntegerType has 0. Others do not have a default, in particular LabelType, and for these types getDefaultValue() returns null. StarlarkAttributesCollection papers over this by turning null into None. We need to do the same in MacroClass#instantiateMacro so that symbolic macros can handle optional label attributes without a NPE crash. Work toward bazelbuild#19922. PiperOrigin-RevId: 669996144 Change-Id: Id05e7a53baed1cc704e807695a1fc93a519a2f5b
- Loading branch information
1 parent
80a3f96
commit 100438c
Showing
5 changed files
with
56 additions
and
14 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