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
What happened?
I was running
bazel cquery --skip_incompatible_explicit_targets
in my project which uses thepy_test
macro from this repository. In my project I have a target which has thetarget_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.0rc4Version of the Aspect rules, or other relevant rules from your
WORKSPACE
orMODULE.bazel
file: 1.0.0-rc0Language(s) and/or frameworks involved: python
How to reproduce
Any other information?
No response