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

Commit 39291b96 authored by Treehugger Robot's avatar Treehugger Robot Committed by Gerrit Code Review
Browse files

Merge "Show module's type and path when reporting dependency problems"

parents ab8581a1 f2bb26f4
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -320,7 +320,8 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers

				// Handle modules with unconverted deps. By default, emit a warning.
				if unconvertedDeps := aModule.GetUnconvertedBp2buildDeps(); len(unconvertedDeps) > 0 {
					msg := fmt.Sprintf("%q depends on unconverted modules: %s", m.Name(), strings.Join(unconvertedDeps, ", "))
					msg := fmt.Sprintf("%s %s:%s depends on unconverted modules: %s",
						moduleType, bpCtx.ModuleDir(m), m.Name(), strings.Join(unconvertedDeps, ", "))
					if ctx.unconvertedDepMode == warnUnconvertedDeps {
						metrics.moduleWithUnconvertedDepsMsgs = append(metrics.moduleWithUnconvertedDepsMsgs, msg)
					} else if ctx.unconvertedDepMode == errorModulesUnconvertedDeps {
@@ -329,7 +330,8 @@ func GenerateBazelTargets(ctx *CodegenContext, generateFilegroups bool) (convers
					}
				}
				if unconvertedDeps := aModule.GetMissingBp2buildDeps(); len(unconvertedDeps) > 0 {
					msg := fmt.Sprintf("%q depends on missing modules: %s", m.Name(), strings.Join(unconvertedDeps, ", "))
					msg := fmt.Sprintf("%s %s:%s depends on missing modules: %s",
						moduleType, bpCtx.ModuleDir(m), m.Name(), strings.Join(unconvertedDeps, ", "))
					if ctx.unconvertedDepMode == warnUnconvertedDeps {
						metrics.moduleWithMissingDepsMsgs = append(metrics.moduleWithMissingDepsMsgs, msg)
					} else if ctx.unconvertedDepMode == errorModulesUnconvertedDeps {
+1 −1
Original line number Diff line number Diff line
@@ -1032,7 +1032,7 @@ func TestModuleTypeBp2Build(t *testing.T) {
    ],
    bazel_module: { bp2build_available: true },
}`,
			ExpectedErr: fmt.Errorf(`"foobar" depends on unconverted modules: foo`),
			ExpectedErr: fmt.Errorf(`filegroup .:foobar depends on unconverted modules: foo`),
			Filesystem: map[string]string{
				"other/Android.bp": `filegroup {
    name: "foo",