Skip to content
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

fix(toolchains): register py cc toolchain for workspace builds #1670

Merged

Conversation

rickeylev
Copy link
Collaborator

The workspace python_register_toolchains() function only registered the plain Python toolchain by its specific name. The py cc toolchain wasn't also being named. This meant things like //python/cc:current_py_cc_headers couldn't find their toolchain. Bzlmod doesn't have this problem because it uses the :all pattern to register everything.

To fix, also register the py cc toolchain where the plain Python toolchain is registered, which makes it available.

Fixes #1669

The workspace `python_register_toolchains()` only registered the plain
Python toolchain by its specific name. The py cc toolchain wasn't also
being named. This meant things like `//python/cc:current_py_cc_headers`
couldn't find their toolchain. Bzlmod doesn't have this problem because
it uses the `:all` pattern to register everything.

To fix, also register the py cc toolchain where the plain Python
toolchain is registered, which makes it available.

Fixes bazelbuild#1669
@rickeylev rickeylev requested a review from aignas January 7, 2024 07:39
@rickeylev rickeylev requested a review from f0rmiga as a code owner January 7, 2024 07:39
@aignas aignas enabled auto-merge January 7, 2024 11:56
@aignas aignas added this pull request to the merge queue Jan 7, 2024
Merged via the queue into bazelbuild:main with commit ebd779e Jan 7, 2024
4 checks passed
@rickeylev rickeylev deleted the fix.register.cc.toolchain.workspace branch January 7, 2024 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

No matching toolchains when using current_py_cc_headers with WORKSPACE.
2 participants