Add protobuf editions support
I added support for Protobuf Editions by updating the plugin.SupportedFeatures variable in cmd/protoc-gen-go-vproto/main.go.
I also updated the versions of all dependencies in go.mod to support this feature.
+1 for adding support for Editions
@vmg can you please review this change, or is there someone else who can? Thanks 🙏
Tagging contributors with recent activity who can hopefully help review and merge this: @nockty @howardjohn @evgfedotov @GiedriusS @coxley @dethi
I don’t have commit privileges, so my review benefit is low. :)
That being said, it would help if the PR included reproducible before/after test instructions to make it easier to validate. I’ve never used editions, and perhaps the others haven’t either. This means I don’t have anything easy off-hand to validate behavior prior and expectations after the change.
I don’t have commit privileges, so my review benefit is low. :)
That being said, it would help if the PR included reproducible before/after test instructions to make it easier to validate. I’ve never used editions, and perhaps the others haven’t either. This means I don’t have anything easy off-hand to validate behavior prior and expectations after the change.
Thanks for responding!
In short, editions replace syntax = "proto2" or syntax = "proto3". Instead of the hardcoded behaviors of the past, editions define a collection of features, each with a default behavior that can be overridden at multiple levels (e.g., file, message, field)
They shouldn’t affect the generated code unless a new feature is introduced in a later edition that vtproto doesn’t yet support. That said, I agree with you about adding a test to show the generated code matches expectations.
This is very neat and should help unblock some stuff I want to do on my end.
+1 for adding tests to this PR. Even just a simple test in https://github.com/planetscale/vtprotobuf/tree/main/testproto would help us prevent regression in the future.