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.
Use value equality instead of reference equality for Starlark attr ob…
…jects We already use value equality for native Attribute objects in Java: attr("foo", STRING).value("x").build().equals(attr("foo", STRING).value("x").build()) We ought to do the same in Starlark. Motivated by the attempt to move python rule documentation from Java stubs to @_builtins .bzl files - and running afoul of the attribute list merger logic in union_attr in @_builtins//:common/python/common.bzl Note that this would change the behavior of Starlark code which uses attr objects as dict keys - but the breakage is very unlikely, and I would arguge the new behavior is correct. RELNOTES: attr objects in Starlark now use value equality rather than reference equality. PiperOrigin-RevId: 561704016 Change-Id: I8712696a9e5fa3bee809098e950f88966959ab48
- Loading branch information
1 parent
74e3be6
commit 31fd464
Showing
5 changed files
with
176 additions
and
0 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