Skip to content

Commit 98e1a95

Browse files
committed
fix(bazel): use Label() for deps in py_itf_unittest
String labels in legacy macros resolve in the caller's repo context, making @itf_pip invisible to downstream consumers. Label() resolves in the defining module's context instead.
1 parent 6b27d41 commit 98e1a95

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

bazel/py_itf_unittest.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ def py_itf_unittest(name, srcs, deps = [], data = [], env = {}, pytest_config =
4444
"--show-capture=no",
4545
"--junitxml=$$XML_OUTPUT_FILE",
4646
] + ["$(location %s)" % x for x in srcs],
47-
deps = ["@score_itf//:itf", "@itf_pip//pytest_mock"] + deps,
47+
deps = [Label("@score_itf//:itf"), Label("@itf_pip//pytest_mock")] + deps,
4848
data = [pytest_config] + data,
4949
env = {"PYTHONDONOTWRITEBYTECODE": "1"} | env,
5050
**kwargs

0 commit comments

Comments
 (0)