Commit graph

21 commits

Author SHA1 Message Date
Colin Cross
5a37718c95 Convert ModuleProvder to generic providers API
Convert all of the callers of ModuleProvider/ModuleHasProvider to use the
type-safe android.SingletonModuleProvider API.

Bug: 316410648
Test: builds
Change-Id: I6f11638546b64749e451cebbf33140248dc1d193
2023-12-14 16:12:22 -08:00
LaMont Jones
0c10e4dcc0 Parallelize singleton execution
Bug: 281536768
Test: manual, presubmits
Change-Id: I57fdc76ba6b277e88e196b506af87127a530fd37
2023-05-19 20:31:32 +00:00
Jooyung Han
4495f84f68 Add allowed-deps tests
These tests capture
- track updatable apexes
- do not track apex-only modules
- track transitive deps
- track external deps (with mark)

Bug: 274041915
Test: m nothing
Change-Id: I629015f5aa4a1a7627d0ba6d92fd42bb99c96287
2023-04-27 09:56:04 +09:00
Pedro Loureiro
87c88176fe Improve documentation around go/allowed-deps-error
Bug: 264349293
Change-Id: I64e95938e53fb26c104e0daece4939f97744a344
2023-02-07 17:08:38 +00:00
Mathew Inwood
766f3510e4 Merge "Update error message for new policy." am: bf49705608 am: 775f9e37c7
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1784430

Change-Id: Ib4c443c1eae2dc7f840566455b573f255575f875
2021-08-04 10:20:47 +00:00
Mathew Inwood
768a01160a Update error message for new policy.
A new presubmit hook enforces that required information is present in
any CL that adds new dependencies to allowed_deps.txt.

Test: m
Bug: 195303213
Change-Id: I1fb932a52f64f9cbf0d12ead75ffd3d9c2a5e942
2021-08-03 14:40:46 +01:00
satayev
670ae1967f Merge changes from topic "move_allowed_deps_txt" am: 2b077baa5e am: 0ee372ad6f am: 3c5d96925f
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1645088

Change-Id: I568df8371fb3eab090d417469c9d78a27be9d527
2021-03-22 12:45:29 +00:00
Artur Satayev
b77b0c5e05 Treat allowed_deps.txt source file as optional.
Not all branches have packages/common/module, which breaks the build
for them.

Bug: 179234385
Test: removed allowed_deps.txt && m apex-allowed-deps-check
Change-Id: I38f47c7200e1afbd899e29843d0214bef826fcf9
2021-03-18 11:15:33 +00:00
Artur Satayev
fdb61edf43 Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I8e8864468b87342c688d001bc5f6e6f8416863ed
Merged-In: I8e8864468b87342c688d001bc5f6e6f8416863ed
2021-03-17 13:44:16 +00:00
Artur Satayev
8dfcbe466c Move allowed_deps.txt to packages/modules/common.
Bug: 179234385
Test: run update-apex-allowed-deps.sh locally
Change-Id: I8e8864468b87342c688d001bc5f6e6f8416863ed
Merged-In: I8e8864468b87342c688d001bc5f6e6f8416863ed
(cherry picked from commit 732d626421)
2021-03-16 15:02:55 +00:00
Artur Satayev
ed667a8345 Add PHONY for apex-allowed-deps check.
Bug: 149622332
Test: m apex-allowed-deps-check
Change-Id: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
Merged-In: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
(cherry picked from commit 01aa11e833)
2020-11-04 20:50:03 +00:00
Colin Cross
04d9c96afe Merge "Remove global state from apex modules" am: 43159bd1b7 am: 21bb1d491c am: 2c76247f51 am: 393b394b85
Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1428815

Change-Id: I264afeceec4bdbc344ba812b1c5fd88fed043214
2020-10-07 20:02:47 +00:00
Colin Cross
56a8321c21 Remove global state from apex modules
A global variant was used to store the global mapping between
modules and APEXes.  Replace it with storing pointers to APEX
contents inside each module so that they can query the contents
of any APEXes they belong to.

Bug: 146393795
Test: all Soong tests
Test: single line change to build.ninja host install dependency ordering
Test: no Android-${TARGET_PRODUCT}.mk, make_vars-${TARGET_PRODUCT}.mk or late-${TARGET_PRODUCT}.mk
Change-Id: Id2d7b73ea27f8c3b41d30820bdd86b65c539bfa4
2020-10-06 13:39:57 -07:00
Artur Satayev
4e1f2bd0d8 Track allowed transitive deps in any updatable module.
Instead of tracking per module and per module variant, track allowed
list of dependecies for all modules combined. This avoids issues with
different products and different downstream branches having different
build graphs.

To compare allowed_deps.txt vs head, run:
:; m -j out/soong/apex/depsinfo/new-allowed-deps.txt.check

To update source allowed_deps.txt, run:
:; build/soong/scripts/update-apex-allowed-deps.sh

Bug: 149622332
Test: m
Change-Id: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
Merged-In: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
(cherry picked from commit 453555083b)
(cherry picked from commit e5207cd9a6)
2020-09-30 21:17:42 +00:00
Artur Satayev
01aa11e833 Add PHONY for apex-allowed-deps check.
Bug: 149622332
Test: m apex-allowed-deps-check
Change-Id: I5848779b4ad04dd4c95e2667f7f62dd2949ac95e
2020-08-03 18:28:26 +01:00
satayev
53bbc085e4 Revert "Track allowed transitive deps in any updatable module."
Revert submission 1312796-apex-allowed-deps

Reason for revert: b/161974327
Reverted Changes:
I52a4be72e:Add a check for apex/allowed_deps.txt to droidcore...
I56771ba3f:Track allowed transitive deps in any updatable mod...

Change-Id: I3be0a1b0dd824dafeadb485daca8e58b81a3ec5c
2020-07-23 15:15:54 +00:00
Artur Satayev
453555083b Track allowed transitive deps in any updatable module.
Instead of tracking per module and per module variant, track allowed
list of dependecies for all modules combined. This avoids issues with
different products and different downstream branches having different
build graphs.

To compare allowed_deps.txt vs head, run:
:; m -j out/soong/apex/depsinfo/new-allowed-deps.txt.check

To update source allowed_deps.txt, run:
:; build/soong/scripts/update-apex-allowed-deps.sh

Bug: 149622332
Test: m
Change-Id: I56771ba3fea748de8e9c58c80758670572f7af53
Merged-In: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
2020-07-20 12:22:26 +01:00
Artur Satayev
019560ff02 Revert^2 Track allowed transitive deps in any updatable modules.
Instead of tracking per module and per module variant, track allowed
list of dependecies for all modules combined. This avoids issues with
different products and different downstream branches having different
build graphs.

Revert submission 11972727-revert-11883270-apex-allowed-deps-FUBLDERIYT

Reason for revert: revert^2 with a fix.
Reverted Changes:
Iefd8a8b21:Revert "Track allowed transitive deps in any updat...
If416513fb:Revert "Add a check for apex/allowed_deps.txt to d...

Bug: 149622332
Test: m (with different products)
Change-Id: Ic518fbd9ebfe1b46aaf9a58df731780a7e5a676b
2020-07-03 17:57:19 +01:00
Artur Satayev
9af168d4c2 Revert "Track allowed transitive deps in any updatable module."
Revert submission 11883270-apex-allowed-deps

Reason for revert: b/159762187 broken build
Reverted Changes:
I56771ba3f:Track allowed transitive deps in any updatable mod...
I52a4be72e:Add a check for apex/allowed_deps.txt to droidcore...

Change-Id: Iefd8a8b21c4eba6ef8dfcb3aeb5a86b9d8357255
2020-06-24 10:17:19 +00:00
Artur Satayev
a4405fa3de Track allowed transitive deps in any updatable module.
To compare allowed_deps.txt vs head, run:
:; m -j out/soong/apex/depsinfo/filtered-updatable-flatlists.txt.check

To update source allowed_deps.txt, run:
:; build/soong/scripts/update-apex-allowed-deps.sh

Bug: 149622332
Test: m
Change-Id: I56771ba3fea748de8e9c58c80758670572f7af53
(cherry picked from commit 8d6085d38934dc43f17b47c2961727766e87bfa2)
2020-06-23 22:29:43 +01:00
Artur Satayev
849f844252 Generate combined deps-info for all updatable modules.
Introduce a singleton apex rule to merge contents of individual
deps-info results into a single output file.

Bug: 149622332
Test: m
Change-Id: I4ab7e1a3527fead97a81a5a2cb0e1e93a429117c
2020-05-15 19:10:19 +01:00