-
Notifications
You must be signed in to change notification settings - Fork 4.4k
Closed as not planned
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)Issues or PRs that are stale (no activity for 30 days)team-Rules-PythonNative rules for PythonNative rules for Pythontype: bug
Description
When a target depends on the same generated source file in both PY2 and PY3 modes, it's arbitrary which one wins in the runfiles. Here foobar depends on source file a.py and generated source file b.py through both PY2 and PY3 binary targets. In the runfiles, a.py symlinks to the source file, which is the same in both modes, but b.py symlinks to the file generated in the PY2 output root (the one without "-py3" in the path), silently ignoring the PY3 one.
genrule(
name = "b",
outs = [":b.py"],
cmd = "touch $(location :b.py)",
)
py_binary(
name = "foo",
srcs = ["a.py", ":b"],
main = "a.py",
default_python_version = "PY3",
)
py_binary(
name = "bar",
srcs = ["a.py", ":b"],
main = "a.py",
default_python_version = "PY2",
)
sh_binary(
name = "foobar",
srcs = [":script.sh"],
data = [":foo", ":bar"],
)Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P3We're not considering working on this, but happy to review a PR. (No assignee)We're not considering working on this, but happy to review a PR. (No assignee)staleIssues or PRs that are stale (no activity for 30 days)Issues or PRs that are stale (no activity for 30 days)team-Rules-PythonNative rules for PythonNative rules for Pythontype: bug