refactoring build_conversion.go to remove panic
Returning errors throughout instead of calling panic() Errors will be more useful for testing Test: bp2build tests Change-Id: I3b03f0a30e7a80878e91c7f0e2df5a94d9d6b780
This commit is contained in:
@@ -384,6 +384,9 @@ func customBp2buildOneToMany(ctx android.TopDownMutatorContext, m *customModule)
|
||||
func generateBazelTargetsForDir(codegenCtx *CodegenContext, dir string) (BazelTargets, []error) {
|
||||
// TODO: Set generateFilegroups to true and/or remove the generateFilegroups argument completely
|
||||
res, err := GenerateBazelTargets(codegenCtx, false)
|
||||
if err != nil {
|
||||
return BazelTargets{}, err
|
||||
}
|
||||
return res.buildFileToTargets[dir], err
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user