Check that apex#filesInfo is not nil in mixed bazel/soong mode. am: 2d7f6fdfa6

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2421199

Change-Id: Iea7ffa7879578461ea0390d2b6828061fb961175
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Jingwen Chen
2023-02-10 12:27:17 +00:00
committed by Automerger Merge Worker

View File

@@ -1994,21 +1994,17 @@ func (a *apexBundle) ProcessBazelQueryResponse(ctx android.ModuleContext) {
a.installedFile = ctx.InstallFile(a.installDir, a.Name()+installSuffix, a.outputFile, a.installedFile = ctx.InstallFile(a.installDir, a.Name()+installSuffix, a.outputFile,
a.compatSymlinks.Paths()...) a.compatSymlinks.Paths()...)
default: default:
panic(fmt.Errorf("unexpected apex_type for the ProcessBazelQuery: %v", a.properties.ApexType)) panic(fmt.Errorf("internal error: unexpected apex_type for the ProcessBazelQueryResponse: %v", a.properties.ApexType))
} }
/* // filesInfo is not set in mixed mode, because all information about the
TODO(asmundak): compared to building an APEX with Soong, building it with Bazel does not // apex's contents should completely come from the Starlark providers.
return filesInfo and requiredDeps fields (in the Soong build the latter is updated). //
Fix this, as these fields are subsequently used in apex/androidmk.go and in apex/builder/go // Prevent accidental writes to filesInfo in the earlier parts Soong by
To find out what Soong build puts there, run: // asserting it to be nil.
vctx := visitorContext{handleSpecialLibs: !android.Bool(a.properties.Ignore_system_library_special_case)} if a.filesInfo != nil {
ctx.WalkDepsBlueprint(func(child, parent blueprint.Module) bool { panic(fmt.Errorf("internal error: filesInfo must be nil for an apex handled by Bazel."))
return a.depVisitor(&vctx, ctx, child, parent) }
})
vctx.normalizeFileInfo()
*/
} }
func (a *apexBundle) setCompression(ctx android.ModuleContext) { func (a *apexBundle) setCompression(ctx android.ModuleContext) {