-
-
Notifications
You must be signed in to change notification settings - Fork 594
refactor(gazelle) Export module as a public struct #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
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this 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.
@dougthor42 There may be gazelle extensions that generate other macros that have python dependencies and requires resolving Python imports. |
@@ -41,7 +41,7 @@ const ( | |||
|
|||
type ParserOutput struct { | |||
FileName string | |||
Modules []module | |||
Modules []Module | |||
Comments []comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: I think that all of the types in this public ParserOutput
type should be public if the value can be accessed, hence I think the comment
should be also exposed.
Could you please do that as well? This is a non-functional change and having a git history where such refactors are grouped together may make it easier to read. Having in the CHANGELOG a line that says something like:
(gazelle) Types for exposed members of
python.ParserOutput
are now all public.
Export the
module
struct to make it publicly accessible. This allows otherpy
extensions to leverage the Python resolver logic for resolving Python imports, instead of have to duplicate the resolving logic.