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: keep import path values if Bazel-builtin PyInfo is removed #2415

Merged

Conversation

rickeylev
Copy link
Contributor

The collect_imports() function added import strings from BuiltinPyInfo if it was non-None.
However, operator precedence caused the if-else ternary to ignore both list comprehensions
(one for PyInfo and one for BuiltinPyInfo) if BuiltinPyInfo was None.

To fix, I rewrote the function as a regular for loop to eliminate the ambiguous looking
ternary expression.

Fixes: #2414

@rickeylev rickeylev force-pushed the fix.missing.builtinpyinfo.erases.imports branch from f16551b to ffc3176 Compare November 15, 2024 21:07
@aignas aignas added this pull request to the merge queue Nov 16, 2024
Merged via the queue into bazelbuild:main with commit b304fc6 Nov 16, 2024
4 checks passed
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.

Removal of PyInfo from Bazel causes semantic change
2 participants