Skip to content

fix: keep import path values if Bazel-builtin PyInfo is removed #2415

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

Merged

Conversation

rickeylev
Copy link
Collaborator

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 requested a review from aignas as a code owner November 15, 2024 21:03
@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 bazel-contrib:main with commit b304fc6 Nov 16, 2024
4 checks passed
@rickeylev rickeylev deleted the fix.missing.builtinpyinfo.erases.imports branch November 16, 2024 17:35
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
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy