Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b64f161c authored by Liz Kammer's avatar Liz Kammer Committed by Automerger Merge Worker
Browse files

Merge "Expand visiblity error" am: b51d6d13 am: 15df2f2c am: b11d4b84

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/1462691

Change-Id: Iad22fd33ce949d65b913fd9db6609c5923bcc175
parents 0598680d b11d4b84
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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())
		}
	})
}
+2 −2
Original line number Diff line number Diff line
@@ -731,7 +731,7 @@ var visibilityTests = []struct {
				}`),
		},
		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{
			`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`,
		},
	},
	{