Add the handle to artifact path requirement functions

Bug: 188079133
Test: go test
Change-Id: I320f4f14fb47414cb14ebb404efab4bceb1fa1e4
This commit is contained in:
Cole Faust
2022-03-21 17:50:05 -07:00
parent 2316240547
commit ea9db58de9
2 changed files with 4 additions and 4 deletions

View File

@@ -106,8 +106,8 @@ var knownFunctions = map[string]interface {
"my-dir": &myDirCallParser{}, "my-dir": &myDirCallParser{},
"patsubst": &substCallParser{fname: "patsubst"}, "patsubst": &substCallParser{fname: "patsubst"},
"product-copy-files-by-pattern": &simpleCallParser{name: baseName + ".product_copy_files_by_pattern", returnType: starlarkTypeList}, "product-copy-files-by-pattern": &simpleCallParser{name: baseName + ".product_copy_files_by_pattern", returnType: starlarkTypeList},
"require-artifacts-in-path": &simpleCallParser{name: baseName + ".require_artifacts_in_path", returnType: starlarkTypeVoid}, "require-artifacts-in-path": &simpleCallParser{name: baseName + ".require_artifacts_in_path", returnType: starlarkTypeVoid, addHandle: true},
"require-artifacts-in-path-relaxed": &simpleCallParser{name: baseName + ".require_artifacts_in_path_relaxed", returnType: starlarkTypeVoid}, "require-artifacts-in-path-relaxed": &simpleCallParser{name: baseName + ".require_artifacts_in_path_relaxed", returnType: starlarkTypeVoid, addHandle: true},
// TODO(asmundak): remove it once all calls are removed from configuration makefiles. see b/183161002 // TODO(asmundak): remove it once all calls are removed from configuration makefiles. see b/183161002
"shell": &shellCallParser{}, "shell": &shellCallParser{},
"strip": &simpleCallParser{name: baseName + ".mkstrip", returnType: starlarkTypeString}, "strip": &simpleCallParser{name: baseName + ".mkstrip", returnType: starlarkTypeString},

View File

@@ -755,8 +755,8 @@ def init(g, handle):
cfg = rblf.cfg(handle) cfg = rblf.cfg(handle)
rblf.enforce_product_packages_exist("") rblf.enforce_product_packages_exist("")
rblf.enforce_product_packages_exist("foo") rblf.enforce_product_packages_exist("foo")
rblf.require_artifacts_in_path("foo", "bar") rblf.require_artifacts_in_path(handle, "foo", "bar")
rblf.require_artifacts_in_path_relaxed("foo", "bar") rblf.require_artifacts_in_path_relaxed(handle, "foo", "bar")
rblf.mkdist_for_goals(g, "goal", "from:to") rblf.mkdist_for_goals(g, "goal", "from:to")
rblf.add_product_dex_preopt_module_config(handle, "MyModule", "disable") rblf.add_product_dex_preopt_module_config(handle, "MyModule", "disable")
`, `,