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: skip precompiling if using Bazel-builtin PyRuntimeInfo #2394

Merged
merged 1 commit into from
Nov 12, 2024

Conversation

rickeylev
Copy link
Contributor

When the @bazel_tools//python/tools:python_autodetecting toolchain is used, it returns
the Bazel-builtin PyRuntimeInfo provider. Because this provider doesn't support the
additional fields needed for precompiling (pyc_tag, among others), it would result in
an attribute error.

To fix, detect the absence of the pyc_tag attribute and return early, as is done when
the pyc_tag field is empty.

Fixes #2364

@rickeylev rickeylev added this pull request to the merge queue Nov 12, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Nov 12, 2024
@aignas aignas added this pull request to the merge queue Nov 12, 2024
Merged via the queue into bazelbuild:main with commit 2f6ca17 Nov 12, 2024
4 checks passed
@rickeylev rickeylev deleted the fix.precompile.builtin.pyinfo branch November 13, 2024 00:14
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.

Error: 'PyRuntimeInfo' value has no field or method 'pyc_tag' when using platforms
2 participants