From e363782a5c2c00de7dbedd4c0a2f42d214e322e7 Mon Sep 17 00:00:00 2001 From: Paul Duffin Date: Thu, 9 Jun 2022 14:58:54 +0000 Subject: Revert "Generate soong_config_module_type inline in the snapshot" This reverts commit d29f8e059712d28346eb2b92ef7b5780695ed3ad. Although I tested this well using unit tests they don't test everything and although I tested the unpacking of some snapshots I did not test what happens when all the ART sdk/module_exports snapshots are unpacked. I just did and the build broke. The build broke because while the soong_config_module_type modules are marked as being Nameless (and so according to the documentation do not have to have unique names) it turns out that is not true. There is at least one place in the build where the names of Nameless modules are checked and as a result this breaks. I could fix the build breakage reasonably easily but the problem is that I would have to apply that fix on all partners otherwise they wouldn't be able to receive the next set of snapshots which is too high a cost. So, I am reverting this and will limit the use of inline soong_config_module_type modules to optional modules. Reason for revert: Breaks the build when snapshots are unpacked. Bug: 233965247 Change-Id: I1faae863c48f1fbfd49d2545f242401bdd4f8f8a --- .../art_Android.bp.expected | 33 ++++++---------------- .../ipsec_Android.bp.expected | 23 +++++---------- 2 files changed, 15 insertions(+), 41 deletions(-) (limited to 'build/mainline_modules_sdks_test_data') diff --git a/build/mainline_modules_sdks_test_data/art_Android.bp.expected b/build/mainline_modules_sdks_test_data/art_Android.bp.expected index 8fc0455e..135e4e6c 100644 --- a/build/mainline_modules_sdks_test_data/art_Android.bp.expected +++ b/build/mainline_modules_sdks_test_data/art_Android.bp.expected @@ -1,30 +1,13 @@ // This is auto-generated. DO NOT EDIT. -// Soong config variable module type added by test_art. -soong_config_module_type { - name: "art_prebuilt_java_import", - module_type: "java_import", - config_namespace: "art_module", - bool_variables: ["source_build"], - properties: ["prefer"], -} - -// Soong config variable module type added by test_art. -soong_config_module_type { - name: "art_prebuilt_prebuilt_bootclasspath_fragment", - module_type: "prebuilt_bootclasspath_fragment", - config_namespace: "art_module", - bool_variables: ["source_build"], - properties: ["prefer"], -} - -// Soong config variable module type added by test_art. -soong_config_module_type { - name: "art_prebuilt_prebuilt_platform_compat_config", - module_type: "prebuilt_platform_compat_config", - config_namespace: "art_module", - bool_variables: ["source_build"], - properties: ["prefer"], +// Soong config variable stanza added by test_art. +soong_config_module_type_import { + from: "prebuilts/module_sdk/art/SoongConfig.bp", + module_types: [ + "art_prebuilt_java_import", + "art_prebuilt_prebuilt_bootclasspath_fragment", + "art_prebuilt_prebuilt_platform_compat_config", + ], } package { diff --git a/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected b/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected index 1a3d3432..99640c05 100644 --- a/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected +++ b/build/mainline_modules_sdks_test_data/ipsec_Android.bp.expected @@ -1,21 +1,12 @@ // This is auto-generated. DO NOT EDIT. -// Soong config variable module type added by test_common_mainline_module. -soong_config_module_type { - name: "module_java_sdk_library_import", - module_type: "java_sdk_library_import", - config_namespace: "ANDROID", - bool_variables: ["module_build_from_source"], - properties: ["prefer"], -} - -// Soong config variable module type added by test_common_mainline_module. -soong_config_module_type { - name: "module_prebuilt_bootclasspath_fragment", - module_type: "prebuilt_bootclasspath_fragment", - config_namespace: "ANDROID", - bool_variables: ["module_build_from_source"], - properties: ["prefer"], +// Soong config variable stanza added by test_common_mainline_module. +soong_config_module_type_import { + from: "packages/modules/common/Android.bp", + module_types: [ + "module_java_sdk_library_import", + "module_prebuilt_bootclasspath_fragment", + ], } package { -- cgit v1.2.3