(If you don't use Go protocol buffers, you can stop reading)
Hello gophers,
This is an announcement that we will be merging the dev branch of github.com/golang/protobuf into master on April 30th (approximately 3 months from now).
This merge will introduce several significant changes:
When tested inside Google, we discovered that these changes were more disruptive than expected. The cause of the issues are mostly due to additional fields added to generated messages by protoc-gen-go:
The semantic changes may also cause issues:
Note that the Go Protocol Buffer compatibility agreement reserves the right to make changes to internal XXX fields or due to specification errors without violating backwards compatibility. We are still making an announcement in advanced so that appropriate user-side changes can be made beforehand so that the eventual merge causes as little disruption as possible.
We recommend that you try vendoring the the dev branch to check whether your code works properly with the upcoming Go protobuf changes. If you experience failures, we recommend that you perform the appropriate fix as mentioned in the points above. If you discover any issues with the dev branch, feel free to file an issue on the golang/protobuf tracker.
Thanks,
JT (on behalf of the Go library team)
P.S. Note that this only affects golang/protobuf and not gogo/protobuf, which is a fork of the former.
Thank you, Walter, for your support.> gogo/protobuf is disappointed that golang/protobuf still thinks that runtime reflection is an efficient way of serializing structures.The table-driven implementation avoids reflect in the fast and common path. Instead, are you referring to the fact that we don't perform full-code generation of Marshal/Unmarshal like what gogo/protobuf does? We are aware that full-code generation will often out-perform the table-driven approach we took. However, full code-generation drastically bloats the binary size when you have many proto messages linked in. Keeping the binary size smaller was an important design decision for us and seemed to be a better default.
We are open to considering an option that allows user to specify full-code generation for select messages.
> gogo/protobuf is still open to being merged back into golang/protobuf and has been since its inception 5 years ago.That is good to hear. I have not yet gone through all of gogo/protobuf to determine what it would to merge, or what should be merged. This will be future work.
JTOn Wednesday, January 31, 2018 at 7:13:38 AM UTC-8, Walter Schulze wrote:gogo/protobuf is happy to be acknowledged by Google as an entity in the golang protobuf space.gogo/protobuf welcomes golang/protobuf to the community and is extremely happy to see this kind of transparency.gogo/protobuf will also merge these changes and as usual try to stay as close as possible to golang/protobuf,including also following the same version tagging.gogo/protobuf is disappointed that golang/protobuf still thinks that runtime reflection is an efficient way of serializing structures.go Green go GoGoProtobufPSgogo/protobuf is still open to being merged back into golang/protobuf and has been since its inception 5 years ago.gogo/protobuf feels for its users, especially those that are not acknowledged by grpc-gateway and grpc-go,and forced to employ work arounds, to preserve their missions of safety and efficiency.It knows that its existence is not something that anyone prefers, and it welcomes death,but only if it can preserve its legacy of fast serailization and generating the structures you want to use.
On Tuesday, 30 January 2018 23:44:37 UTC+1, joe...@google.com wrote:Done. I tagged v1.0.0. When we perform the merge in the future, it will be tagged as v1.1.0.
On Tuesday, January 30, 2018 at 9:37:23 AM UTC-8, Alexey Palazhchenko wrote:Hi,Can you please add tags to the repository before that? SemVer or even tags with _any_ semantic would greatly help to rollback to the latest working version when things break.–-–
Alexey «AlekSi» Palazhchenko
--
You received this message because you are subscribed to a topic in the Google Groups "golang-nuts" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/golang-nuts/F5xFHTfwRnY/unsubscribe.
To unsubscribe from this group and all its topics, send an email to golang-nuts...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Hi JT please see my inline replies.On Wed, 31 Jan 2018 at 19:05 <thebroke...@gmail.com> wrote:Thank you, Walter, for your support.> gogo/protobuf is disappointed that golang/protobuf still thinks that runtime reflection is an efficient way of serializing structures.The table-driven implementation avoids reflect in the fast and common path. Instead, are you referring to the fact that we don't perform full-code generation of Marshal/Unmarshal like what gogo/protobuf does? We are aware that full-code generation will often out-perform the table-driven approach we took. However, full code-generation drastically bloats the binary size when you have many proto messages linked in. Keeping the binary size smaller was an important design decision for us and seemed to be a better default.Yes, I was referring to the speed of code generation over runtime reflection.What I struggle to understand is why the optimize_for file option that is part of proto 2 and 3 is not considered by golang/protobuf as a way to specify when code generation should be used over runtime reflection.This seems to work for most other languages, including Java, which I heard is quite popular among real software developers.
Could we perhaps get a code snippet example that non java programmers can follow.
PS
When I previously referred to java programmers as real software developers, I didn't add some much needed context.
Sometimes in this java dominated world I personally don't feel like a real software developer.
Surely these issues already exist in gogo-protobuf? How are they handled there?
You received this message because you are subscribed to the Google Groups "golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts...@googlegroups.com.
I cannot recall that I have experienced these problems. The generated code has also been far easier to maintain than the runtime reflected code that is repeatedly patched by golang/protobuf. Except for import paths, this is probably one of the easiest projects a developer will get to work on. It is deterministic and you have awesome debugging output. The only thing that tires me is big patches like this one to the runtime reflected code and libraries that don't recognize gogoprotobuf and only import the golang/protobuf library.
I have seriously been pondering a protobuf generator that does not have a library as a dependency. It would be incredibly easy to maintain, since I don't have to merge golang/protobuf patches and get around the fact that grpc libraries only want a single protobuf library. I have one missing puzzle piece and then I just need time.
I don't get the argument for small binaries at all, but not importing a library will also decrease the binary size and given enough flexibility, which I intend to have, will also result in not generating the code you don't need.
A contract which expect your generated struct to have a marshal and unmarshal method is very simple to maintain.
I'll be at fosdem this weekend if anyone wants to chat in person and is there anyway.
--------
Hello gophers,
This is an announcement that we will be merging the dev branch of github.com/golang/protobuf into master on April 30th (approximately 3 months from now).
This merge will introduce several significant changes: