Commit Graph

5 Commits

Author SHA1 Message Date
Cole Faust
1c08360ca8 Evaluate intermediate products properly
When an intermediate product is evaluated, it needs to
act as if it's the only product being evaulated. However,
currently, if it inherited a makefile that was also being
inherited by the overall top level product via a different
path, it would not get the values from that makefile.

Copy the configs dictionary before evaluating each product
that needs artifact path requirements, and create seperate
postfix orders for all of them that don't contain any products
that they don't inherit from.

Bug: 221312707
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: I235ad78d587a2e315ba446b5e126d8f6d0fbbea7
2022-04-12 15:25:14 -07:00
Cole Faust
32e413a294 Fix single value variable inheritance order
List variables needed to be percolated in the order of inherit() calls.
children.keys() was in that order, due to starlark dictionaries being
iterable in the order of insertion, but the previous cl broke that
behavior by sorting them. Instead, only sort the children for
single value variables.

Fixes: 226206409
Fixes: 228044099
Test: ./out/rbcrun ./build/make/tests/run.rbc and testing aosp_arm64
Change-Id: I5b91514e87b158b615e4d4ec7868fccb0248379b
2022-04-04 11:55:02 -07:00
Cole Faust
56d7c008bc Revert "Fix inheritance order"
This reverts commit 670c587c09.

Reason for revert: Breaks RBC product config for more products than it fixes: b/228044099

Change-Id: I614663311f67b3631a0cee427453c550fc426c8b
2022-04-04 17:28:28 +00:00
Cole Faust
670c587c09 Fix inheritance order
The children to inherit from were not sorted. This
wasn't a problem for list variables, because all those
inheritances get merged together based on the @inherit/
values in the list variables. But for single value variables
it made a difference.

Bug: 226206409
Test: ./out/rbcrun ./build/make/tests/run.rbc
Change-Id: Ib56bbb91a79fe8c7cb780c253f5bd8d6c0e87765
2022-03-31 17:30:35 -07:00
Cole Faust
31fce2f404 Fix single value inheritance
Single-value product variables resolve to the first
instance of that variable in prefix order. What we
have right now is taking the value from the current
makefile if it's set, but if it's not, we take it
from the last child, not the first.

Fixes: 226206409
Test: Manually
Change-Id: Id23f7c269ff9a352bf0b67cb57156b72449f978e
2022-03-23 15:28:48 -07:00