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 IndexError when codegen is missing expected python_requirement targets #16590

Merged

Conversation

Eric-Arellano
Copy link
Contributor

This code could result in calling softwrap(""), which causes an exception unnecessarily.

resolve_note = softwrap(
(
f"""
Note that because `[python].enable_resolves` is set, you must specifically have a
`python_requirement` target that uses the same resolve '{resolve}' as the target
{codegen_address}. Alternatively, update {codegen_address} to use a different
resolve.
"""
)
if resolves_enabled
else ""
)

[ci skip-rust]
[ci skip-build-wheels]

…` targets

# Rust tests and lints will be skipped. Delete if not intended.
[ci skip-rust]

# Building wheels and fs_util will be skipped. Delete if not intended.
[ci skip-build-wheels]
@Eric-Arellano Eric-Arellano added the category:bugfix Bug fixes for released features label Aug 19, 2022
@Eric-Arellano
Copy link
Contributor Author

Note that this is only on Pants 2.12 because 2.13 and 2.14 already had this change applied in an unrelated PR that we can't cherry-pick.

@Eric-Arellano Eric-Arellano merged commit 8774a88 into pantsbuild:2.12.x Aug 20, 2022
@Eric-Arellano Eric-Arellano deleted the fix-codegen-softwrap-bug branch August 20, 2022 00:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants