-
Notifications
You must be signed in to change notification settings - Fork 15
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
Disable proto2 #11
Comments
How would the fallback look like? |
Most likely I'd fall back to this function from protoc-gen-go -> https://github.com/protocolbuffers/protobuf-go/blob/v1.27.1/cmd/protoc-gen-go/internal_gengo/main.go#L68 |
Basically anytime a message declares |
the fall back would be like -> if fileDescriptor.Syntax == "proto2" -> Protobuf does not allow extensions unless you declare at top level this:
Also for me failing is fine. |
Maybe an error is better for now since it's unintended usage? |
The only exception would be if we had to codegen for third-party files, but then you should just generate those separately |
for me its fine to throw an error and say we don't generate files defined with proto2 syntax |
Based on the discussion, since protov3 does not support extensions, which makes protoreflect fast paths implementation a lot more easier, we shoudl either disable proto2 support or fallback to the original codegen (and maybe output a warning?)
The text was updated successfully, but these errors were encountered: