You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
py_binary from rules_py seems to ignore non-existent dependencies, resulting in no error being raised if you try to use a py_library in the 'deps' field when the dependency doesn't actually exist
Version
Development (host) and target OS/architectures:
Linux
Output of bazel --version:
bazel 7.1.0
Version of the Aspect rules, or other relevant rules from your WORKSPACE or MODULE.bazel file:
bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "aspect_rules_py", version = "0.7.1")
bazel run //:old
INFO: Invocation ID: 2e19ba83-6202-4fe0-a2f3-10cf2474e919
ERROR: /home/michael/code/rules_py_bug_repro/BUILD.bazel:4:14: in deps attribute of py_binary rule //:old: rule '//:dldfk' does not exist. Since this rule was created by the macro 'py_binary', the error might have been caused by the macro implementation
ERROR: /home/michael/code/rules_py_bug_repro/BUILD.bazel:4:14: Analysis of target '//:old' failed
Remove the `allow_files = True` from the `deps` attr of `py_libaray`
(they are inherited by `py_binary`). This allowed users to place
non-existent targets into `deps`.
Closes#316
What happened?
py_binary from rules_py seems to ignore non-existent dependencies, resulting in no error being raised if you try to use a py_library in the 'deps' field when the dependency doesn't actually exist
Version
Development (host) and target OS/architectures:
Linux
Output of
bazel --version
:bazel 7.1.0
Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file:bazel_dep(name = "rules_python", version = "0.31.0")
bazel_dep(name = "aspect_rules_py", version = "0.7.1")
Language(s) and/or frameworks involved:
Just Python
How to reproduce
Reproduction repo here: https://github.com/mboulton-fathom/rules_py_bug_repro
With this build file:
Using py_binary from rules_python:
Using py_binary from rules_py:
This causes all kinds of confusion if you have a typo in a dependency
Any other information?
No response
The text was updated successfully, but these errors were encountered: