Commit Graph

5 Commits

Author SHA1 Message Date
Yu Liu
9a99313ac6 Remove containersInfo, complianceMetadataInfo and aconfigFilePaths from ModuleBase.
Bug: 358425833
Test: Manually verified all the generated ninja and mk files and CI.
Change-Id: I896659491e75bb2eacca93d2e4a83ead50e218d2
2024-08-28 00:02:48 +00:00
Jihoon Kang
0f3b1a7288 Define unstable container
Unstable container marks modules that are static reverse dependencies of
"framework-minus-apex". These modules contain unstable implementation
details of the platform, and should not be accessed by the CTS tests.

Test: m nothing
Bug: 338660802
Change-Id: Ia0e1b3070f0f7b2c1b9c27306323e2428d9722ca
2024-08-16 22:57:57 +00:00
Jihoon Kang
224ea08ee6 Define additional exception functions for container enforcement
These exception functions allow restriction to be loosened for some
inter-container dependencies.

Note that these functions are still no-op. Restriction enforcement will
be done in the child change.

Test: m nothing
Bug: 338660802
Change-Id: I63c7c33e33f271d4c2a84cc6070eb4896e030ab4
2024-08-16 22:57:39 +00:00
Jihoon Kang
17a61d7609 Refactor containers
Implementation details:
- Add documentations
- Convert container determiniation logic to function pointers, in order
  to make addition/deletion of containers more scalable

Test: m nothing
Bug: 338660802
Change-Id: I4f7a9a027e00584bb895ce8559f621bae1e985f6
2024-08-12 22:26:52 +00:00
Jihoon Kang
c3d4e115af Collect container informations
This change introduces a method to collect the information of what
containers (i.e. api domain, partition, or any custom defined boundaries
of interest) the module belongs to. The method is called in
`ModuleBase.GenerateBuildActions`.

Each container objects defines the following:
- name of the container
- list of "restrictions", which are the containers that a module that
  belongs to this container is not allowed to depend on. Each
  "restrictions" also defines custom rules which allow bypassing the
  restricted dependency. Each rules are an enum that are mapped to a
  function, given that functions are not hashable and thus cannot be set
  as a value in a provider.

Note that this change is a no-op, as the container information is only
collected for modules that implement the "InstallableModule" interface,
which is not implemented by any other module types in this change. This
will be utilized in the follow-up changes.

Test: m nothing --no-skip-soong-tests
Bug: 338660802
Change-Id: I9d16dfec0dcf06da464aa49ee7b23f46f1da236a
2024-07-15 23:43:36 +00:00