grpc-go icon indicating copy to clipboard operation
grpc-go copied to clipboard

Grab comment from proto file, similar to protoc-gen-go

Open RedHawker opened this issue 3 years ago • 2 comments

Adding initial code. grabs the header comment from the FileDescriptor This code was copied from the main protoc-gen-go code

Attempts to address #5530

It's quick and dirty, but I'm going people who know better about the project can suggest a better way.

RedHawker avatar Jul 26 '22 23:07 RedHawker

CLA Signed

The committers listed above are authorized under a signed CLA.

  • :white_check_mark: login: RedHawker (c8b2ebef0d3face7f8600612b6c8a7ec37453dfe, 9ef49fc186cbde855ed984fd92ae0aee19de61ab, 3962abac0b66a2f2212613b7eafb59b5c1bdbdc9, bee0d735d4e98442a64cb62664f60dd6370fbdba)

This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

github-actions[bot] avatar Aug 04 '22 18:08 github-actions[bot]

The vet-proto step fails in the checks with the proposed changes, what needs to change to allow for them to work with the generated files now containing the additional comment(s)?

RedHawker avatar Aug 11 '22 16:08 RedHawker

The vet-proto step fails in the checks with the proposed changes, what needs to change to allow for them to work with the generated files now containing the additional comment(s)?

Changes to the code generator will require that you re-run ./regenerate.sh from the root of the repo. That will also give us a preview of how the generated code looks.

dfawley avatar Aug 11 '22 18:08 dfawley

The vet-proto step fails in the checks with the proposed changes, what needs to change to allow for them to work with the generated files now containing the additional comment(s)?

Changes to the code generator will require that you re-run ./regenerate.sh from the root of the repo. That will also give us a preview of how the generated code looks.

I ran regenerate.sh but it doesn't run in a container, so it uses my system's protoc version instead of 3.14.0 that's in the existing files.

RedHawker avatar Aug 11 '22 19:08 RedHawker

I ran regenerate.sh but it doesn't run in a container, so it uses my system's protoc version instead of 3.14.0 that's in the existing files.

Would you mind downloading that version and making sure it gets run instead?

      PROTOBUF_VERSION=3.14.0
      PROTOC_FILENAME=protoc-${PROTOBUF_VERSION}-linux-x86_64.zip
      pushd /home/travis
      wget https://github.com/google/protobuf/releases/download/v${PROTOBUF_VERSION}/${PROTOC_FILENAME}

dfawley avatar Aug 11 '22 21:08 dfawley

I don't know why those tests are failing, they seem unrelated to my changes as far as I can tell.

RedHawker avatar Aug 18 '22 15:08 RedHawker

This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

github-actions[bot] avatar Aug 26 '22 16:08 github-actions[bot]

This PR is labeled as requiring an update from the reporter, and no update has been received after 6 days. If no update is provided in the next 7 days, this issue will be automatically closed.

github-actions[bot] avatar Sep 05 '22 18:09 github-actions[bot]

I'm not sure what else needs to be done?

RedHawker avatar Sep 06 '22 15:09 RedHawker

Thank you for the PR !!

easwars avatar Sep 06 '22 19:09 easwars

Now that this is fixed, is there going to be a new version tag for protoc-gen-go-grpc?

andremarianiello avatar Feb 27 '23 16:02 andremarianiello

Now that this is fixed, is there going to be a new version tag for protoc-gen-go-grpc?

Yes, we will get that out soonish. Filed https://github.com/grpc/grpc-go/issues/6060 to track.

easwars avatar Feb 28 '23 01:02 easwars

Hi @andremarianiello, you should find the fix included in our latest release of proto-gen-go-gRPC. Please feel free to reach out if there are any concerns.

arvindbr8 avatar Mar 02 '23 00:03 arvindbr8