Expand visiblity error
Expands the error to suggest a potential fix, giving the package path for the module that needs visiblity. Test: go test soong tests Bug: 168926331 Change-Id: Ie95dec03f5e2c3190bfaed1f0e5789eeb0ab1878
This commit is contained in:
@@ -443,7 +443,7 @@ func visibilityRuleEnforcer(ctx TopDownMutatorContext) {
|
||||
|
||||
rule := effectiveVisibilityRules(ctx.Config(), depQualified)
|
||||
if !rule.matches(qualified) {
|
||||
ctx.ModuleErrorf("depends on %s which is not visible to this module", depQualified)
|
||||
ctx.ModuleErrorf("depends on %s which is not visible to this module\nYou may need to add %q to its visibility", depQualified, "//"+ctx.ModuleDir())
|
||||
}
|
||||
})
|
||||
}
|
||||
|
Reference in New Issue
Block a user