-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously we did not apply `select()` promotion if the attribute value was `None`, which occurs as the Starlark representation of the default value for certain types (most notably `attr.label()`). But this is inconsistent. The same argument for general `select()` promotion -- that you fail fast and find errors sooner -- applies here. For instance, the macro author might have written code that passes when the argument is `None` but not when it is `select("//conditions:default", None)`. Fixing this exposed a weakness in `copyAndLiftStarlarkValue()`, that it did not handle Nones correctly. (This was probably why I avoided select() promotion in this case to begin with.) Work toward #19922. PiperOrigin-RevId: 680640681 Change-Id: I6983bc3e44d3cf629c40c6014a2873b6c62e8841
- Loading branch information
1 parent
b387036
commit 3312f4e
Showing
4 changed files
with
69 additions
and
22 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