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

Update protoc-gen-connect-go to preserve more comments #470

Closed
pkwarren opened this issue Mar 3, 2023 · 2 comments
Closed

Update protoc-gen-connect-go to preserve more comments #470

pkwarren opened this issue Mar 3, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@pkwarren
Copy link
Contributor

pkwarren commented Mar 3, 2023

Is your feature request related to a problem? Please describe.
When converting .proto files to .go files, some comments for the file and the package are lost. A recent update to grpc-go fixed a similar problem, and protobuf-go has addressed this for some time.

Describe the solution you'd like
Preserve more comments from the original .proto file in the generated .go source.

Describe alternatives you've considered
n/a

Additional context
n/a

@pkwarren pkwarren added the enhancement New feature or request label Mar 3, 2023
akshayjshah added a commit that referenced this issue Mar 18, 2023
If the source schema has leading or leading detached comments on the
protobuf syntax or package declarations, propagate them to the generated
code. This matches the behavior of protoc-gen-go and protoc-gen-go-grpc,
with one small change: we keep protobuf package comments adjacent to the
Go package declaration, so that they appear as the package-level
documentation in GoDoc.

Fixes #470.
@VoyTechnology
Copy link

I am also affected by this issue. In my case, the copyright header is not automatically copied over from the .proto file.

@akshayjshah
Copy link
Member

@VoyTechnology we've already merged support for this, so your issue should be solved in the next release!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants