Skip to content

No matching toolchains when using current_py_cc_headers with WORKSPACE. #1669

@lalten

Description

@lalten

🐞 bug report

Description

Can not use @rules_python//python/cc:current_py_cc_headers in WORKSPACE mode because the toolchain fails to resolve. The WORKSPACE file is setting up a hermetic interpreter via python_register_toolchains.

Note that the target works as expected when using a MODULE.bazel.

🔬 Minimal Reproduction

See repro repo: https://github.com/lalten/current_py_cc_headers

🔥 Exception or Error

@@rules_python//python/cc:current_py_cc_headers (5b7f3da): No matching toolchains found for types @@rules_python//python/cc:toolchain_type.

🌍 Your Environment

Operating System: ubuntu-latest
Output of bazel version: 7.0.0
Rules_python version: 0.27.1

Metadata

Metadata

Assignees

No one assigned

    Labels

    type: bugtype: toolchainRelated to the toolchains provided by rules_python

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions