Merge "Expand visiblity error"
This commit is contained in:
@@ -443,7 +443,7 @@ func visibilityRuleEnforcer(ctx TopDownMutatorContext) {
|
|||||||
|
|
||||||
rule := effectiveVisibilityRules(ctx.Config(), depQualified)
|
rule := effectiveVisibilityRules(ctx.Config(), depQualified)
|
||||||
if !rule.matches(qualified) {
|
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())
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
@@ -731,7 +731,7 @@ var visibilityTests = []struct {
|
|||||||
}`),
|
}`),
|
||||||
},
|
},
|
||||||
expectedErrors: []string{
|
expectedErrors: []string{
|
||||||
`module "libnamespace" variant "android_common": depends on //top:libexample which is not visible to this module`,
|
`module "libnamespace" variant "android_common": depends on //top:libexample which is not visible to this module\nYou may need to add "//namespace" to its visibility`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -760,7 +760,7 @@ var visibilityTests = []struct {
|
|||||||
}`),
|
}`),
|
||||||
},
|
},
|
||||||
expectedErrors: []string{
|
expectedErrors: []string{
|
||||||
`module "libnamespace" variant "android_common": depends on //top:libexample which is not visible to this module`,
|
`module "libnamespace" variant "android_common": depends on //top:libexample which is not visible to this module\nYou may need to add "//namespace" to its visibility`,
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user