protobuf icon indicating copy to clipboard operation
protobuf copied to clipboard

Add version to header comment of generated source.

Open jenstroeger opened this issue 3 years ago • 10 comments

What language does this apply to?

I’m raising it for Python but this change would probably be useful for all supported languages.

Describe the problem you are trying to solve.

Frequent version changes of the gRPC tools require generated code to keep in step with tools changes. That can be difficult to maintain.

Describe the solution you'd like

Generated code should contain the version number of the protoc it was built with, e.g. for generated Python code:

# Generated by the protocol buffer compiler: libprotoc 3.19.5.  DO NOT EDIT! 

Describe alternatives you've considered

I currently wrap the protoc invocation in a shell script and use sed to inject that version number.

Additional context

Related issue https://github.com/grpc/grpc/issues/31765

jenstroeger avatar Nov 29 '22 19:11 jenstroeger

Hi @jenstroeger, this is actually something we've been wanting to do. Are you interested in adding this feature as a contributor?

esorot avatar Nov 30 '22 21:11 esorot

@esorot happy to contribute, if you could please point me into the right directtion?

jenstroeger avatar Nov 30 '22 22:11 jenstroeger

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar Dec 27 '23 10:12 github-actions[bot]

@esorot looks like PR https://github.com/protocolbuffers/protobuf/pull/11408 addresses this, but was automatically closed?

jenstroeger avatar Jan 08 '24 03:01 jenstroeger

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar Apr 08 '24 10:04 github-actions[bot]

I’d like to see this addressed.

jenstroeger avatar Apr 08 '24 10:04 jenstroeger

We triage inactive PRs and issues in order to make it easier to find active work. If this issue should remain active or becomes active again, please add a comment.

This issue is labeled inactive because the last activity was over 90 days ago.

github-actions[bot] avatar Jul 09 '24 10:07 github-actions[bot]

I’d like to see this addressed.

jenstroeger avatar Jul 11 '24 13:07 jenstroeger