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

internal/cmd/generate-alias: fix generator for lacking go_package options #1061

Merged
merged 1 commit into from Mar 20, 2020

Conversation

@dsnet
Copy link
Member

dsnet commented Mar 20, 2020

In https://golang.org/cl/219598, we removed patching the well-known types
with an explicit go_package option and instead relied on M flags.
The lack of updated go_package options broke generate-alias since it
appears as if the import public is trying to alias Go identifiers
within the same Go package (thus generating nothing).

We fix generate-alias by replicating the same approach here,
where we construct the M flag mapping and pass it to protoc-gen-go.

…ions

In https://golang.org/cl/219598, we removed patching the well-known types
with an explicit go_package option and instead relied on M flags.
The lack of updated go_package options broke generate-alias since it
appears as if the import public is trying to alias Go identifiers
within the same Go package (thus generating nothing).

We fix generate-alias by replicating the same approach here,
where we construct the M flag mapping and pass it to protoc-gen-go.
@neild
neild approved these changes Mar 20, 2020
@dsnet dsnet merged commit 7592abe into api-v1 Mar 20, 2020
3 checks passed
3 checks passed
cla/google All necessary CLAs are signed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
continuous-integration/travis-ci/push The Travis CI build passed
Details
@dsnet dsnet deleted the gen-alias branch Mar 20, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants
You can’t perform that action at this time.