xolstice / protobuf-maven-plugin

Maven Plugin that executes the Protocol Buffers (protoc) compiler
https://www.xolstice.org/protobuf-maven-plugin/
Other
232 stars 76 forks source link

Use pb instead of protobin for binary descriptors #51

Closed clehene closed 5 years ago

clehene commented 5 years ago

Description gcloud endpoints currently expects ['.pb', '.descriptor', '.proto.bin'] extensions or otherwise will fail with

UnicodeDecodeError: 'utf8' codec can't decode byte 0xae in position 1: invalid start byte
ERROR: gcloud crashed (UnicodeDecodeError): 'utf8' codec can't decode byte 0xae in position 1: invalid start byte

I've spent hours trying to figure how the file gets 'corrupted'..

I've also made a PR to look at the mime-type but it would probably be best to go with the "more default" extensions for descriptors. https://github.com/google-cloud-sdk/google-cloud-sdk/pull/4

sergei-ivanov commented 5 years ago

protobin was a rather arbitrary choice back in the day, mainly because it did not clash with any other file extensions. At the time when we implemented support for generating binary protobuf descriptors, we could not find any guidelines on the file naming. This PR contains changes that can potentially break backwards compatibility, but the next release is going to contain a number of breaking changes anyway. While we are at it, I'd like to split off descriptor set generation into a goal of its own. Any objections to that?

sergei-ivanov commented 5 years ago

@clehene your PR to google-cloud-sdk/google-cloud-sdk#4 is probably not going to go far, because, as I understand, it is not an official repo for gcloud SDK. I suggest that you raise an issue in Google's issue tracker instead: https://issuetracker.google.com/issues?q=protobuf You can reference your PR from there.

clehene commented 5 years ago

@sergei-ivanov thank you!

While we are at it, I'd like to split off descriptor set generation into a goal of its own. Any objections to that?

I think that may be useful

@clehene your PR to google-cloud-sdk/google-cloud-sdk#4 is probably not going to go far, because, as I understand, it is not an official repo for gcloud SDK.

Yes, I did notice it's just an automated mirror, but hoped they'd check the issues / PRs there too. I'll ask around and see what's the best place to push that.

sergei-ivanov commented 5 years ago

54