-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Add descriptor package #131
Conversation
@@ -58,6 +59,7 @@ for up in "${!filename_map[@]}"; do | |||
cat $tmpdir/$UPSTREAM_SUBDIR/$up | | |||
# Adjust proto package. | |||
# TODO(dsymonds): Upstream the go_package option instead. | |||
grep -v '^\s*option\s\+go_package' | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This hack can similarly be removed once we consistently have go_package
set in the upstream .protof
files
Descriptor isn't really a "well-known type" like the others are. |
It's required when defining custom options: https://developers.google.com/protocol-buffers/docs/proto#customoptions When defining a custom option the generated code references either
|
That doesn't really address what I said. |
@dsymonds sorry, I didn't mean to suggest that the Rather that we could reuse the mechanism you have created for generating the well-known types for the Unless you had a different approach in mind for the |
Most people use https://github.com/golang/protobuf/tree/master/protoc-gen-go/descriptor, although it would be nice to add the descriptor.proto file there as well. |
I tested this PR out on a fork (https://github.com/Globegitter/protobuf) and to get it to work I had to add a Otherwise I would get Other than that it would be great to get this in to be on par with some of the other protobuf libraries where you don't need to specially add the descriptor proto and it just works. |
should the other descriptor.pb.go in protoc-gen-go/descriptor be removed? (this pull request is very old now, so at that time maybe the one in protoc-gen-go/descriptor didn't exist... but still, something to remember before merging) |
This already exists in |
Per 0dfe8f3 et al