From 8106bd0b00039e207893749517d52d682d9f47df Mon Sep 17 00:00:00 2001 From: Vinh Tran Date: Thu, 8 Jun 2023 23:29:18 +0000 Subject: [PATCH] Revert "Add aidl.deps prop to include aidl implicit deps explicitly in Android.bp" This reverts commit 256258587865f6e414e57faf3af256981e1df46a. Reason for revert: We now have aidl_library to remove this workaround to support specifying aidl headers Change-Id: Idf03ebbea764f8c5b3c4fc1623f8f02aa321c8c1 --- android/filegroup.go | 12 --------- bp2build/filegroup_conversion_test.go | 36 --------------------------- 2 files changed, 48 deletions(-) diff --git a/android/filegroup.go b/android/filegroup.go index 0ca5dc50e..c259f2106 100644 --- a/android/filegroup.go +++ b/android/filegroup.go @@ -81,7 +81,6 @@ type bazelFilegroupAttributes struct { type bazelAidlLibraryAttributes struct { Srcs bazel.LabelListAttribute Strip_import_prefix *string - Deps bazel.LabelListAttribute } // api srcs can be contained in filegroups. @@ -120,12 +119,9 @@ func (fg *fileGroup) ConvertWithBp2build(ctx TopDownMutatorContext) { // and then convert if fg.ShouldConvertToAidlLibrary(ctx) { tags := []string{"apex_available=//apex_available:anyapex"} - deps := bazel.MakeLabelListAttribute(BazelLabelForModuleDeps(ctx, fg.properties.Aidl.Deps)) - attrs := &bazelAidlLibraryAttributes{ Srcs: srcs, Strip_import_prefix: fg.properties.Path, - Deps: deps, } props := bazel.BazelTargetModuleProperties{ @@ -191,14 +187,6 @@ type fileGroupProperties struct { // Create a make variable with the specified name that contains the list of files in the // filegroup, relative to the root of the source tree. Export_to_make_var *string - - // aidl is explicitly provided for implicit aidl dependencies - // TODO(b/278298615): aidl prop is a no-op in Soong and is an escape hatch - // to include implicit aidl dependencies for bazel migration compatibility - Aidl struct { - // List of aidl files or filegroup depended on by srcs - Deps []string `android:"path"` - } } type fileGroup struct { diff --git a/bp2build/filegroup_conversion_test.go b/bp2build/filegroup_conversion_test.go index 273d55636..7ce559d9b 100644 --- a/bp2build/filegroup_conversion_test.go +++ b/bp2build/filegroup_conversion_test.go @@ -105,42 +105,6 @@ func TestFilegroupWithAidlSrcs(t *testing.T) { } } -func TestFilegroupWithAidlDeps(t *testing.T) { - bp := ` - filegroup { - name: "bar", - srcs: ["bar.aidl"], - } - filegroup { - name: "foo", - srcs: ["aidl/foo.aidl"], - path: "aidl", - aidl: { - deps: [":bar"], - } - }` - - t.Run("filegroup with aidl deps", func(t *testing.T) { - expectedBazelTargets := []string{ - MakeBazelTargetNoRestrictions("aidl_library", "bar", AttrNameToString{ - "srcs": `["bar.aidl"]`, - "tags": `["apex_available=//apex_available:anyapex"]`, - }), - MakeBazelTargetNoRestrictions("aidl_library", "foo", AttrNameToString{ - "srcs": `["aidl/foo.aidl"]`, - "strip_import_prefix": `"aidl"`, - "deps": `[":bar"]`, - "tags": `["apex_available=//apex_available:anyapex"]`, - }), - } - runFilegroupTestCase(t, Bp2buildTestCase{ - Description: "filegroup with aidl deps", - Blueprint: bp, - ExpectedBazelTargets: expectedBazelTargets, - }) - }) -} - func TestFilegroupWithAidlAndNonAidlSrcs(t *testing.T) { runFilegroupTestCase(t, Bp2buildTestCase{ Description: "filegroup with aidl and non-aidl srcs",