Fix instantiation of config.bazelForceEnabledModules

Currently, uninstantiated, the field will be set to [""]
instead of an empty slice.

Test: m nothing --ensure-allowlist-integrity
Test: m nothing --ensure-allowlist-integrity
--bazel-force-enabled-modules=com.google.android.neuralnetworks (this
fails, as expected)

Change-Id: Ib4cd26f0cb0d40714b8c3f263ee2d22093ee15ef
This commit is contained in:
MarkDacek
2023-05-02 21:00:48 +00:00
parent 2953486e31
commit 1de78f3174
2 changed files with 8 additions and 5 deletions

View File

@@ -307,10 +307,6 @@ func checkForAllowlistIntegrityError(configuration android.Config, isStagingMode
// This indicates the allowlisting of this variant had no effect.
// TODO(b/280457637): Return true for nonexistent modules.
func isAllowlistMisconfiguredForModule(module string, mixedBuildsEnabled map[string]struct{}, mixedBuildsDisabled map[string]struct{}) bool {
//TODO(dacek): Why does this occur in the allowlists?
if module == "" {
return false
}
_, enabled := mixedBuildsEnabled[module]
if enabled {