Colin Cross
4320a271eb
Change semantics of ReplaceDependencies[If] am: 38b56e136f
am: 8bccb1787b
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3070727
Change-Id: I7625d7722b60acb0001d8efa55e8d036d9176b33
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 23:37:12 +00:00
Colin Cross
b72794b452
Ignore dependency variations for TransitionMutators that didn't apply am: de024f6167
am: 8268cb1c6a
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3070726
Change-Id: Ia650ecf5525769f647e54f5f776cc855301555fa
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 23:37:07 +00:00
Colin Cross
489130363e
Rename TransitionMutator top down mutator am: 9f260255f2
am: e9e2e949a1
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3070725
Change-Id: Ic710ba5cf102cdd09be6f7c1b2cc8c8dde0672e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 23:37:02 +00:00
Colin Cross
8bccb1787b
Change semantics of ReplaceDependencies[If] am: 38b56e136f
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3070727
Change-Id: I35153d9ab150b22c4a402e6736b26322347bbbdd
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 23:16:15 +00:00
Colin Cross
8268cb1c6a
Ignore dependency variations for TransitionMutators that didn't apply am: de024f6167
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3070726
Change-Id: I255cb6d93ec98457fb3ef1ab1337cde243208eca
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 23:16:13 +00:00
Colin Cross
e9e2e949a1
Rename TransitionMutator top down mutator am: 9f260255f2
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3070725
Change-Id: I2dde26615461abcac5965a2ae9efab0f9bcfb6e4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-02 23:16:10 +00:00
Colin Cross
38b56e136f
Change semantics of ReplaceDependencies[If]
...
ReplaceDependencies[If] currently replaces dependencies on a given
module with the current module. It expects to find a variant of the
given module that has the exact same variations as the current module.
That was sometimes handled via aliases, but TransitionMutators don't
support aliases, they use IncomingTransition to rewrite the variation
instead.
In all current usages of ReplaceDependencies[If], the given module
is also a direct dependency of the current module. Instead of looking
for the exact same variations, look for the variant that is a dependency
of the current module.
Bug: 319288033
Test: all soong tests pass
Flag: NONE
Change-Id: I3e33111322040b187f6e951554366ccdcaf1bc11
2024-05-02 14:39:19 -07:00
Colin Cross
de024f6167
Ignore dependency variations for TransitionMutators that didn't apply
...
When adding a dependency on a module that has already had variants
created by a TransitionMutator, ignore any variation added by the
TransitionMutator to the current module if the TransitionMutator
didn't apply to the target module. This requires passing in the
list of variations requested by the AddVariationDependencies call
so that explicitly requested variations are not ignored.
This fixes TestAndroidTest_FixTestConfig when the override mutator
is converted to a TransitionMutator, as it can't add a dependency from
the "foo_test" module with an empty override variation to the
"foo" module that has no override variation.
Bug: 319288033
Test: TestAndroidTest_FixTestConfig
Flag: NONE
Change-Id: If0fca7adc28cd702f953885aef440a0805ac017c
2024-05-01 15:25:37 -07:00
Colin Cross
9f260255f2
Rename TransitionMutator top down mutator
...
TransitionMutator's top down mutator is suffixed with _deps, but
that name is often used by other mutators related to the
TransitionMutator, causing unexpected conflicts. Use _propagate
instead.
Bug: 319288033
Test: all soong tests pass
Flag: NONE
Change-Id: Ib42c66288e47287cfda8252d435f86c7045bf4c0
2024-05-01 15:25:37 -07:00
Cole Faust
160a6c0310
Improve error message when assigning select to nonconfigurable property am: 1c48101091
am: 6722022217
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3068366
Change-Id: I474a427a3c68303742f9779be67e0b46c9fed31f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-01 21:44:14 +00:00
Cole Faust
6722022217
Improve error message when assigning select to nonconfigurable property am: 1c48101091
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3068366
Change-Id: I8429704e4c614dc0d85fe0c1ab8d95e0a4f42957
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-05-01 21:15:42 +00:00
Cole Faust
1c48101091
Improve error message when assigning select to nonconfigurable property
...
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ideac33cd286566e14e7ff1ff579930add48a94db
2024-04-30 13:58:17 -07:00
Treehugger Robot
e872f19792
[automerger skipped] Merge "Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future" into aosp-main-future am: b316cc9bc9
-s ours
...
am skip reason: Merged-In I7091effe7791c1f3ea57e775b37cd72f4ee13d03 with SHA-1 8ef7561b0c
is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/blueprint/+/27144984
Change-Id: Ie2ca9ab5e62c1cbdb1a0cabbfc013ba97220e4b4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-30 02:11:01 +00:00
Xin Li
d4fe814978
[automerger skipped] Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future am: f672401e1b
-s ours
...
am skip reason: Merged-In I7091effe7791c1f3ea57e775b37cd72f4ee13d03 with SHA-1 8ef7561b0c
is already in history
Original change: https://googleplex-android-review.googlesource.com/c/platform/build/blueprint/+/27144984
Change-Id: I242e315537d8b022f491b18837f94d91f26cfe0a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-30 02:10:26 +00:00
Treehugger Robot
b936384b5c
Merge changes from topics "fix_selects_appending", "refactor_selects" into main am: ca5ffdd3ce
am: b87170476c
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3062997
Change-Id: I54df335ce6965ed0cd410aa1708377ef257f370a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-30 02:00:27 +00:00
Treehugger Robot
b316cc9bc9
Merge "Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future" into aosp-main-future
2024-04-30 01:58:42 +00:00
Treehugger Robot
b87170476c
Merge changes from topics "fix_selects_appending", "refactor_selects" into main am: ca5ffdd3ce
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3062997
Change-Id: Ic00ebdfb1adcc095910de739aa7c475d26cc1aa6
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-30 01:47:33 +00:00
Treehugger Robot
ca5ffdd3ce
Merge changes from topics "fix_selects_appending", "refactor_selects" into main
...
* changes:
Refactor selects
Fix bugs when appending selects
Allow extending configurable propeties with non-configurable properties
2024-04-30 01:15:42 +00:00
Cole Faust
a52b058ccc
Refactor selects
...
In order to do less cloning, refactor selects so that all the
soong-visibile structs are immutable to soong and can be reused.
Additionally, refactor how the inner linked list of selects is managed,
so that the append/prepend/replace logic is simpler.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Iba5d27405decc1b0596590c3e0555daeb044bf9e
2024-04-29 13:23:30 -07:00
Xin Li
f672401e1b
Empty merge of Android 24Q2 Release (ab/11526283) to aosp-main-future
...
Bug: 337098550
Merged-In: I7091effe7791c1f3ea57e775b37cd72f4ee13d03
Change-Id: I1c6c3f6d848d7a67fbac426cd0347477b675a521
2024-04-29 11:46:46 -07:00
Cole Faust
70b814a964
Fix bugs when appending selects
...
The biggest issue here is that Configurable objects needed to be
cloned before appended to one another, otherwise some Configurables
that were used in defaults could be edited after being applied to one
module and apply a different value to another module.
Also fix an issue where a select without a defined appendWrapper
always evaluated to nil.
I plan to make a followup refactor cl to make these things clearer,
but start with the bugfix.
Bug: 323382414
Test: m nothing --no-skip-soong-tests (see other cl in topic for tests)
Change-Id: Icf68d0ee1779c76bfb3d68db43b35d7e09bc0dd9
2024-04-25 15:38:56 -07:00
Cole Faust
4560bb086e
Allow extending configurable propeties with non-configurable properties
...
Sometimes modules add arch-variant properties in load hooks, to disable
modules by default on certain platforms for example. When changing the
property to a Configurable property, these load hooks would also need
to be changed in order to have a matching type for
ExtendMatchingProperties.
Since this can be kindof a pain to address everywhere, for now,
special case the extension functions to promote non-configurable
properties to configurable ones. We can remove this later when
everything switches to configurable properties.
Bug: 323382414
Test: go tests
Change-Id: Iac96587dbd60ccdd6aa667dd69a71ad252abe589
2024-04-25 15:31:00 -07:00
Haamed Gheibi
c1d603e975
Use relative GOPATH for microfactory golang builds. am: c10b49b5e9
am: ea82d0e22d
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3060443
Change-Id: I536d5701360a4c8cfbbf50253da83b8fc954c214
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-25 22:30:29 +00:00
Haamed Gheibi
ea82d0e22d
Use relative GOPATH for microfactory golang builds. am: c10b49b5e9
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3060443
Change-Id: If6558225f5f16a6750936c59598846485bffed20
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-25 21:47:39 +00:00
Haamed Gheibi
c10b49b5e9
Use relative GOPATH for microfactory golang builds.
...
Bug: b/336890676
Change-Id: I15ff839986d6c4997d5abccaa2ae8a9703d6cfb6
2024-04-25 04:44:01 +00:00
Tomasz Wasilczyk
1fbe12e4d7
Merge "Add support for go:embed" into main am: 36b6322979
am: 78d056bd95
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3046017
Change-Id: I018f8bc58ecdcb76bb3a16eee13ef24342bc54a5
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-24 13:42:11 +00:00
Tomasz Wasilczyk
78d056bd95
Merge "Add support for go:embed" into main am: 36b6322979
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3046017
Change-Id: I9e9ff27e457958a24630943e5f0305cf031c73e3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-24 13:25:05 +00:00
Tomasz Wasilczyk
36b6322979
Merge "Add support for go:embed" into main
2024-04-24 12:33:37 +00:00
Cole Faust
a476c072d0
Export ConfigurableCase and add constructors am: 185cb44bef
am: 5dac25b090
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3056565
Change-Id: I99ca8c4ce0e2fbb9c3ab678688bedebb59aae196
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-24 00:46:37 +00:00
Cole Faust
5dac25b090
Export ConfigurableCase and add constructors am: 185cb44bef
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3056565
Change-Id: Ic1cdf0b78cefcfc4298a740e798c2c3ff3405a22
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-24 00:29:10 +00:00
Cole Faust
185cb44bef
Export ConfigurableCase and add constructors
...
Some soong code sets arch-variant properties in order to control a
module's default behavior. I'll make this continue to work, but long
term the arch-variant properties should be replaced with selects,
so expose an API for creating select statements in soong code.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I6c65d6e112b6f826f1027777b6fdf36915d34b1d
2024-04-23 13:55:59 -07:00
Tomasz Wasilczyk
51b4b03520
Add support for go:embed
...
Bug: 302718225
Test: Build aosp/2798713
Change-Id: I8c09f1604aa1a702c639bba91cefd104f8f2f36d
2024-04-22 11:52:00 -07:00
Colin Cross
6f49c6448e
Call TransitionMutator.IncomingTransition when adding dependencies later am: d7474dd743
am: 1e65fed726
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3017629
Change-Id: I27379e59e7316d0802a6d2f61ce252301aa10f8b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 19:28:10 +00:00
Colin Cross
1e65fed726
Call TransitionMutator.IncomingTransition when adding dependencies later am: d7474dd743
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3017629
Change-Id: I79ef8c4acf66ba3d11cbd4141ea0c2f9a147600b
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-18 19:09:02 +00:00
Colin Cross
d7474dd743
Call TransitionMutator.IncomingTransition when adding dependencies later
...
Adding a dependency on a module that has already had a TransitionMutator
run on it may require adjusting the variation name based on the results
of IncomingTranstion. Store the variants that existed before the
TransitionMutator ran, find one that is a subset of the requested
variant, and call TranstionMutator.IncomingTransition to update the
value.
Bug: 319288033
Test: TestPostTransitionDeps
Change-Id: I690357f9792401a3edbc5ae9fdcb666495954fbc
2024-04-16 15:18:29 -07:00
Colin Cross
87758cdfa0
Merge "Move TransitionMutator to transition.go and add tests" into main am: 6ed94b7f85
am: ae74d5ecd7
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3042673
Change-Id: Ib54ac052f761100f1d4d19235e439cb96ee3371a
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 20:48:07 +00:00
Colin Cross
ae74d5ecd7
Merge "Move TransitionMutator to transition.go and add tests" into main am: 6ed94b7f85
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3042673
Change-Id: I08ecacb507ae8b5fd19e444b2f28da23a0231ef7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 20:30:33 +00:00
Colin Cross
6ed94b7f85
Merge "Move TransitionMutator to transition.go and add tests" into main
2024-04-16 20:14:53 +00:00
Cole Faust
91dce455c0
Support unpacking a variable to a configurable property am: 28357db9d0
am: ea224ecf22
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3040813
Change-Id: Iaf13baa636be6a7651bcf1ee86de31b20ef07974
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 18:52:34 +00:00
Cole Faust
2b5076bdb6
Support multi-variable selects and typed selects am: 3311debbb3
am: 6b6eb4344d
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3038314
Change-Id: I163d8d39a6709e810bdadb32cc3eda8495bacfa7
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 18:52:24 +00:00
Cole Faust
ea224ecf22
Support unpacking a variable to a configurable property am: 28357db9d0
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3040813
Change-Id: If6161e750f2252db52c6cfb6579099abc926120c
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 18:27:45 +00:00
Cole Faust
6b6eb4344d
Support multi-variable selects and typed selects am: 3311debbb3
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3038314
Change-Id: I47723388f70cc767219112a00d25bb637915bc4d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-16 18:27:41 +00:00
Cole Faust
28357db9d0
Support unpacking a variable to a configurable property
...
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: I504e53c34305f5de0af8629bf21ac1ce94704732
2024-04-12 16:37:51 -07:00
Cole Faust
3311debbb3
Support multi-variable selects and typed selects
...
This adds support for selecting on multiple variables at once, so that
you can do AND/OR combindations of them. For example:
select((
arch(),
os(),
), {
("arm64", "linux"): ["libfoo64"],
(default, "linux"): ["libfoo"],
(default, "windows"): ["libfoowindows"],
(default, default): ["libbar"],
})
It also allows for select conditions to be boolean-typed. You can
write literal true and false without quotes to select on them. Currently
we don't have any boolean-typed variables though, so a fake one was
added for testing.
Bug: 323382414
Test: m nothing --no-skip-soong-tests
Change-Id: Ibe586e7b21865b8734027848cc421594cbd1d8cc
2024-04-12 16:33:01 -07:00
Colin Cross
95b3627f6f
Move TransitionMutator to transition.go and add tests
...
Bug: 319288033
Test: transition_test.go
Change-Id: Ia6fd96a69f559e3356155954fd021ec8d7293908
2024-04-12 14:58:58 -07:00
Cole Faust
40acd0417b
Rename Evaluate() to Get() and add GetDefault() am: 09fe90e407
am: 70c30f6ec8
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3028284
Change-Id: I226a299cc5c9af60ed8ef5d415541c739619cfe4
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:33:48 +00:00
Cole Faust
97080d8421
Add android:replace_instead_of_append am: 2437d5edb9
am: e8602b8b22
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3025378
Change-Id: I271a96c3622853a364a11a10911d1ce50a1d7459
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:33:46 +00:00
Cole Faust
70c30f6ec8
Rename Evaluate() to Get() and add GetDefault() am: 09fe90e407
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3028284
Change-Id: Id10c8a2773f17f7a1d97d39c6f99f5b39d608728
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:16:18 +00:00
Cole Faust
e8602b8b22
Add android:replace_instead_of_append am: 2437d5edb9
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3025378
Change-Id: I0af8eab5aa136b05c0a97acdbe40380eccfd7f2d
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-08 21:16:13 +00:00
Cole Faust
760d00076c
Rename default select branch to 'default' keyword am: 0173a2268b
am: 05b4504d80
...
Original change: https://android-review.googlesource.com/c/platform/build/blueprint/+/3024123
Change-Id: Icc4fde6bbf2a306ae71fc518a1ca664460161ea3
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
2024-04-04 22:23:48 +00:00