Skip to content

refactor(gazelle) Types for exposed members of python.ParserOutput are now all public #2959

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
merged 2 commits into from
Jun 18, 2025

Conversation

yushan26
Copy link
Contributor

@yushan26 yushan26 commented Jun 5, 2025

Export the members of python.ParserOutput struct to make it publicly accessible. This allows other py extensions to leverage the Python resolver logic for resolving Python imports, instead of have to duplicate the resolving logic.

@yushan26 yushan26 changed the title refactor(gazelle) change module into a public struct refactor(gazelle) Export module as a public struct Jun 5, 2025
@yushan26 yushan26 requested a review from rickeylev as a code owner June 5, 2025 20:29
Copy link
Collaborator

@dougthor42 dougthor42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

allows other py extensions to leverage the Python resolver logic

Can you elaborate on what these extensions are or might be?

TBH I'm hesitant to make any more of the gazelle go code truly public. I already am not a fan of the existing public items haha.

I'm hesitant because we don't have many maintainers for the gazelle stuff, and adding more public things means that changes need to be more careful.

I'll defer to @aignas on this, but otherwise the code changes are mostly fine. It's a very mechanical change.

@yushan26
Copy link
Contributor Author

yushan26 commented Jun 6, 2025

@dougthor42 There may be gazelle extensions that generate other macros that have python dependencies and requires resolving Python imports.
In Go, it's quite common for extensions like to reuse the Go resolver, so it would be nice to be able to use the Python resolver too, instead of duplicating the Python resolver logic.

@yushan26 yushan26 changed the title refactor(gazelle) Export module as a public struct refactor(gazelle) Types for exposed members of python.ParserOutput are now all public. Jun 16, 2025
@yushan26 yushan26 changed the title refactor(gazelle) Types for exposed members of python.ParserOutput are now all public. refactor(gazelle) Types for exposed members of python.ParserOutput are now all public Jun 16, 2025
@yushan26
Copy link
Contributor Author

@aignas Yes good point, just update to make them all public.

Copy link
Collaborator

@dougthor42 dougthor42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Merge conflict but otherwise LGTM.

yushan8 added 2 commits June 17, 2025 09:40
Update

Update

Update cchangelog

Update struct
@dougthor42 dougthor42 added this pull request to the merge queue Jun 18, 2025
Merged via the queue into bazel-contrib:main with commit 175a336 Jun 18, 2025
2 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.

4 participants