Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: py_test macro doesn't propagate target_compatible_with to _py_venv when building targets #437

Open
RoyShulman opened this issue Nov 14, 2024 · 0 comments · May be fixed by #438
Open
Labels
bug Something isn't working

Comments

@RoyShulman
Copy link

What happened?

I was running bazel cquery --skip_incompatible_explicit_targets in my project which uses the py_test macro from this repository.
In my project I have a target which has the target_compatible_with set to "platforms//os:linux and since I am running on mac I would expect bazel to skip this target, and it does when I use the macro from bazelbuild/rules_python. When I change to the macro from this repository it fails.
I tried to debug the issue and saw that if I add the attribute here everything works.

Version

Development (host) and target OS/architectures:

Output of bazel --version:
bazel 7.4.0rc4

Version of the Aspect rules, or other relevant rules from your
WORKSPACE or MODULE.bazel file:
1.0.0-rc0

Language(s) and/or frameworks involved:
python

How to reproduce

Create a target that is only compatible with a specific platform, and try to run it on a different platform

Any other information?

No response

@RoyShulman RoyShulman added the bug Something isn't working label Nov 14, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant