Check that apex#filesInfo is not nil in mixed bazel/soong mode.
filesInfo should not be used for an apex that's converted to Bazel, since all information should come from the Bazel starlark provider. filesInfo is populated when there's a full Android.bp module graph of the apex deps. Test: presubmits Change-Id: I4b9c596ca7841f4ea76e21f929039282113b6752
This commit is contained in:
parent
f5d42a206f
commit
2d7f6fdfa6
1 changed files with 9 additions and 13 deletions
22
apex/apex.go
22
apex/apex.go
|
@ -1994,21 +1994,17 @@ func (a *apexBundle) ProcessBazelQueryResponse(ctx android.ModuleContext) {
|
|||
a.installedFile = ctx.InstallFile(a.installDir, a.Name()+installSuffix, a.outputFile,
|
||||
a.compatSymlinks.Paths()...)
|
||||
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))
|
||||
}
|
||||
|
||||
/*
|
||||
TODO(asmundak): compared to building an APEX with Soong, building it with Bazel does not
|
||||
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
|
||||
To find out what Soong build puts there, run:
|
||||
vctx := visitorContext{handleSpecialLibs: !android.Bool(a.properties.Ignore_system_library_special_case)}
|
||||
ctx.WalkDepsBlueprint(func(child, parent blueprint.Module) bool {
|
||||
return a.depVisitor(&vctx, ctx, child, parent)
|
||||
})
|
||||
vctx.normalizeFileInfo()
|
||||
*/
|
||||
|
||||
// filesInfo is not set in mixed mode, because all information about the
|
||||
// apex's contents should completely come from the Starlark providers.
|
||||
//
|
||||
// Prevent accidental writes to filesInfo in the earlier parts Soong by
|
||||
// asserting it to be nil.
|
||||
if a.filesInfo != nil {
|
||||
panic(fmt.Errorf("internal error: filesInfo must be nil for an apex handled by Bazel."))
|
||||
}
|
||||
}
|
||||
|
||||
func (a *apexBundle) setCompression(ctx android.ModuleContext) {
|
||||
|
|
Loading…
Reference in a new issue