8000 0.18.0 breaks compatibility for Bazel 5 · Issue #1056 · bazel-contrib/rules_python · GitHub
[go: up one dir, main page]

Skip to content
0.18.0 breaks compatibility for Bazel 5 #1056
Closed
@faximan

Description

@faximan

🐞 bug report

Affected Rule

The issue is caused by the rule: python_register_toolchains

Is this a regression?

Yes, the previous version in which this bug was not present was: 0.17.3

Description

I think #977 broke the compatibility for Bazel versions <6 as the coverage_tool attribute on py_runtime was added in Bazel 6 .

I could not find it stated anywhere that this is WAI.

🔬 Minimal Reproduction

python_register_toolchains(
  name = "local_config_python",
  python_version = "3.9",
)
py_binary(
    name = "foo",
    srcs = ["foo.py"],
)

bazel-5.4.0 --bazelrc=/dev/null build //:foo

🔥 Exception or Error


ERROR: ~/.cache/bazel/_bazel_faximan/0920b5666e9ad52e0d97f6f97d994ed1/external/local_config_python_x86_64-unknown-linux-gnu/BUILD.bazel:62:11: @local_config_python_x86_64-unknown-linux-gnu//:py3_runtime: no such attribute 'coverage_tool' in 'py_runtime' rule

🌍 Your Environment

**Operating System: Debian

Output of bazel version:

  
Build label: 5.4.0
Build target: bazel-out/k8-opt/bin/src/main/java/com/google/devtools/build/lib/bazel/BazelServer_deploy.jar
Build time: Thu Dec 15 16:14:25 2022 (1671120865)
Build timestamp: 1671120865
Build timestamp as int: 1671120865
  

Rules_python version:

  
0.18.0
  

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0