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

adds protoprint package, for generating proto source code from a descriptor #84

Merged
merged 1 commit into from
Nov 8, 2017

Conversation

jhump
Copy link
Owner

@jhump jhump commented Nov 8, 2017

This addresses #66. The implementation tries very hard to preserve all source comments. However, it turns out that protoc does not even bother putting all source comments into the file descriptor's source_code_info field. So I haven't been able to test some of the comment-formatting logic, which I guess is moot. (I have left it in place so, in the event I add source_code_info support to the protoparse package, this protoprint package could potentially preserve more comments than is possible with protoc.)

This branch also makes json and text format of dynamic message always sort map keys prior to serialization (previously, it depended on unexported flag that was only set for tests). It now mirrors the golang/protobuf packages -- binary serialization does not sort map keys, but json and text formats do.

…ptor

- also makes json and text format of dynamic message always
  sort map keys prior to serialization
@jhump jhump merged commit a5d2f16 into master Nov 8, 2017
@jhump jhump deleted the protoprint branch November 8, 2017 03:52
@jhump jhump changed the title adds protoprint package, for generate proto source code from a descriptor adds protoprint package, for generating proto source code from a descriptor Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant