From 65cc4f777731683b73695052eb088776dfa00581 Mon Sep 17 00:00:00 2001 From: Jiyong Park Date: Mon, 9 Mar 2020 14:29:18 +0900 Subject: [PATCH] Apex_available check failure reveals dependency When the check for apex_available has failed, the build system now shows the module that brought the unavailable module into the APEX. Bug: 151051671 Test: m Merged-In: Id1a3fda67fe56fdc2dc90ec800d10689415de4d6 (cherry picked from commit 7bd9444b0fb928b7c05d50376f22e37a961bb499) Change-Id: Id1a3fda67fe56fdc2dc90ec800d10689415de4d6 --- apex/apex.go | 2 +- apex/apex_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apex/apex.go b/apex/apex.go index de18e5ccd..5a5c02f21 100644 --- a/apex/apex.go +++ b/apex/apex.go @@ -2000,7 +2000,7 @@ func (a *apexBundle) checkApexAvailability(ctx android.ModuleContext) { if externalDep || to.AvailableFor(apexName) || whitelistedApexAvailable(apexName, to) { return } - ctx.ModuleErrorf("requires %q that is not available for the APEX.", to.Name()) + ctx.ModuleErrorf("%q requires %q that is not available for the APEX.", from.Name(), to.Name()) }) } diff --git a/apex/apex_test.go b/apex/apex_test.go index 2b1319741..7b842da77 100644 --- a/apex/apex_test.go +++ b/apex/apex_test.go @@ -3345,7 +3345,7 @@ func TestApexWithTestHelperApp(t *testing.T) { func TestApexPropertiesShouldBeDefaultable(t *testing.T) { // libfoo's apex_available comes from cc_defaults - testApexError(t, `"myapex" .*: requires "libfoo" that is not available for the APEX`, ` + testApexError(t, `"myapex" .*: "myapex" requires "libfoo" that is not available for the APEX`, ` apex { name: "myapex", key: "myapex.key",