-
Notifications
You must be signed in to change notification settings - Fork 554
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
0.18.0 breaks compatibility for Bazel 5 #1056
Comments
Sorry about that. Thanks for the report. This looks like an easy fix. edit: the workaround doesn't actually work. Upgrade to 0.18.1 |
Only set `py_runtime.coverage_tool` for Bazel 6 and higher. Avoid setting it in earlier version by checking `native.bazel_version` in the repository rule and disabling it if less than Bazel 6 is detected. A warning is also printed if coverage was requested, but the Bazel version check is ignoring it. Fixes #1056
@rickeylev I think that might not be the only problem? Even with
We should add to the 0.18.0 release notes whatever answer we come up with for Bazel 5 users as well. |
That's weird. I manually tested a couple targets with 5.4 and things were OK. The only place I see coverage_tool even mentioned is in python/repositories.bzl. The only code path I see that would cause this would be if |
hmm, I got past it with some change, probably related to getting gazelle targets from |
…ld#1061) Only set `py_runtime.coverage_tool` for Bazel 6 and higher. Avoid setting it in earlier version by checking `native.bazel_version` in the repository rule and disabling it if less than Bazel 6 is detected. A warning is also printed if coverage was requested, but the Bazel version check is ignoring it. Fixes bazelbuild#1056
Only set `py_runtime.coverage_tool` for Bazel 6 and higher. Avoid setting it in earlier version by checking `native.bazel_version` in the repository rule and disabling it if less than Bazel 6 is detected. A warning is also printed if coverage was requested, but the Bazel version check is ignoring it. Fixes #1056
I have run into this issue with Weirdly even if I add: |
Sorry, yes, the workaround I originally posted doesn't work. I updated that post to reflect this. 0.18.1 is now released with a fix for this: https://github.com/bazelbuild/rules_python/releases/tag/0.18.1 |
🐞 bug report
Affected Rule
The issue is caused by the rule: python_register_toolchainsIs this a regression?
Yes, the previous version in which this bug was not present was: 0.17.3Description
I think #977 broke the compatibility for Bazel versions <6 as the
coverage_tool
attribute onpy_runtime
was added in Bazel 6 .I could not find it stated anywhere that this is WAI.
🔬 Minimal Reproduction
bazel-5.4.0 --bazelrc=/dev/null build //:foo
🔥 Exception or Error
🌍 Your Environment
**Operating System: Debian
Output of
bazel version
:Rules_python version:
The text was updated successfully, but these errors were encountered: