-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
feat: add aliasfix to fix migrated import paths #6502
Conversation
Once merged in a future PR, it may be a good idea to move the mapping file elsewhere or make it public so gapicgen can rely on it too. That way the tools can stay in-sync. |
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.
FWIW, the GAPIC generator already does this in that if we give it an "import path override" for the protos its generating, it will know to generate request/response/stub types using the "overridden" import path. This of course does not help with manual clients.
I do realize though that there has to be a time where we generate the stubs in google-cloud-go without changing the type in the signature for the GAPIC, while we do the alias/release dance. Perhaps we need to toggle when the GAPIC generator is made aware of he import path override e.g. decouple it from configuring gapicgen to generate stubs in google-cloud-go. Right now it is coupled (see storage) in that if we want to provide an override, the GAPIC will respect it rather than deferring to go-genproto still.
@noahdietz This is supposed to be more of an equivalent to For example:
|
You are right. We may be able to accomplish them by just having a toggle in gapicgen to regen in both locations in two different invocations of protoc |
Oh! cool! awesome. |
This will assist us in the migration effort and is also a tool our users can use.
The tool is allowlisted to only migrate specific imports, and only if we have
made a configuration change to say the code has been migrated.