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
{{ message }}
This repository has been archived by the owner on Apr 18, 2019. It is now read-only.
In order to write unit tests for pyz_binary content, my team wants to be able to add pyz_test rules that have deps on pyz_binary targets.
Unfortunately, that triggers an error because pyz_binary rules do not have the mandatory provider PyZProvider. That is also different behavior than the native rules where py_binary rules do have the py provider.
Interesting! Mostly because I didn't consider this case. I thought the Python rules should work the way that C++, Java, and Go rules work: if you want to share code, it needs to be in a *_library rule. The *_binary rules only produce an executable. However, you make a good point that it would be good to be similar to the py_binary rule.
We've decided to not use Bazel, so this is basically unmaintained. I am unlikely to have time to look into this, sorry. :(
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
In order to write unit tests for
pyz_binary
content, my team wants to be able to addpyz_test
rules that havedeps
onpyz_binary
targets.Unfortunately, that triggers an error because
pyz_binary
rules do not have the mandatory providerPyZProvider
. That is also different behavior than the native rules wherepy_binary
rules do have thepy
provider.Simply updating this line to
return [provider, DefaultInfo(
seems to make it work as desired:https://github.com/TriggerMail/rules_pyz/blob/master/rules_python_zip/rules_python_zip.bzl#L243
My question is, why is the provider omitted from
pyz_binary
rules? Can it be added?The text was updated successfully, but these errors were encountered: