summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2023-12-12 10:15:59 -0800
committer Cole Faust <colefaust@google.com> 2023-12-12 18:10:36 -0800
commit27609f15ffb53ab55c8ca27cb656b2011a97138e (patch)
tree37d426c0718ad5789084bd0598792ff4d0f5959b
parentfa6995f75ef324e4ede1a6f81c79dda2f6ea5359 (diff)
Update wording on depfile property error
Bug: 307824623 Test: Presubmits Change-Id: I25919150d2ee2483099e7cb710330dc259d57e66
-rw-r--r--genrule/genrule.go10
-rw-r--r--genrule/genrule_test.go2
2 files changed, 5 insertions, 7 deletions
diff --git a/genrule/genrule.go b/genrule/genrule.go
index ffdd8904b..0512c15b7 100644
--- a/genrule/genrule.go
+++ b/genrule/genrule.go
@@ -581,17 +581,15 @@ func (g *Module) generateCommonBuildActions(ctx android.ModuleContext) {
func (g *Module) GenerateAndroidBuildActions(ctx android.ModuleContext) {
// Allowlist genrule to use depfile until we have a solution to remove it.
- // TODO(b/235582219): Remove allowlist for genrule
+ // TODO(b/307824623): Remove depfile property
if Bool(g.properties.Depfile) {
sandboxingAllowlistSets := getSandboxingAllowlistSets(ctx)
- // TODO(b/283852474): Checking the GenruleSandboxing flag is temporary in
- // order to pass the presubmit before internal master is updated.
if ctx.DeviceConfig().GenruleSandboxing() && !sandboxingAllowlistSets.depfileAllowSet[g.Name()] {
ctx.PropertyErrorf(
"depfile",
- "Deprecated to ensure the module type is convertible to Bazel. "+
- "Try specifying the dependencies explicitly so that there is no need to use depfile. "+
- "If not possible, the escape hatch is to add the module to allowlists.go to bypass the error.")
+ "Deprecated because with genrule sandboxing, dependencies must be known before the action is run "+
+ "in order to add them to the sandbox. "+
+ "Please specify the dependencies explicitly so that there is no need to use depfile.")
}
}
diff --git a/genrule/genrule_test.go b/genrule/genrule_test.go
index d13e97609..fa0ee17c0 100644
--- a/genrule/genrule_test.go
+++ b/genrule/genrule_test.go
@@ -708,7 +708,7 @@ func TestGenruleAllowlistingDepfile(t *testing.T) {
depfile: true,
cmd: "cat $(in) > $(out) && cat $(depfile)",
`,
- err: "depfile: Deprecated to ensure the module type is convertible to Bazel",
+ err: "depfile: Deprecated because with genrule sandboxing, dependencies must be known before the action is run in order to add them to the sandbox",
},
{
name: `no error when module is allowlisted`,